---
title: Delete a product list
slug: docs/demo/delete-a-product-list
description: Learn how to use the curl command to send a DELETE request to a specific URL with custom headers in this informative document. Enhance your coding skills and master the art of making HTTP requests effortlessly.
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "FpGdZR19oYmvY8p5biLVz",
  "data": {
    "url": "https://api.fictive.com/REST/api/product-lists/{productListReference}",
    "name": "Delete a product list",
    "method": "DELETE",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "productListReference",
          "type": "string",
          "description": "Reference of the product list to delete"
        }
      ],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "isExpanded": true,
        "statusCode": "204",
        "description": "NoContent",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "Request is invalid.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Product list cannot be found",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error.",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will delete an existing product list from your instance of eSuite and disassociate any products that have previously been added.",
    "examples": {
      "languages": [
        {
          "id": "4MaAoh4zDFAQrFUTcnwNS",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://api.fictive.com/REST/api/product-lists/{productListReference} \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "Xo90a5dEJzbAF3g0jaSUG",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/product-lists/{productListReference}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "wwjwWAdSUnLS1TTVlcCL9",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/product-lists/{productListReference}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "WWTWCx1zgABx3QPGdoB1Z",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/product-lists/{productListReference}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "4MaAoh4zDFAQrFUTcnwNS"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-204",
          "language": "204",
          "code": "// NoContent\n"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Request is invalid.\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// Product list cannot be found\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal Server Error.\n"
        }
      ],
      "selectedLanguageId": "response-0-204"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}