---
title: Deletes a product from the specified bundle
slug: docs/demo/deletes-a-product-from-the-specified-bundle
description: Learn how to use cURL to delete data from a specific URL endpoint with this code example. This document includes headers for accepting and sending JSON data, ensuring a smooth and efficient process.
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "-BfIE6A2jmsaKQvTR8boq",
  "data": {
    "url": "https://api.fictive.com/REST/api/bundles/{bundleReference}/products/{productReference}",
    "name": "Deletes a product from the specified bundle",
    "method": "DELETE",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "bundleReference",
          "type": "string",
          "description": "The reference of the bundle to delete from"
        },
        {
          "kind": "required",
          "name": "productReference",
          "type": "string",
          "description": "The reference of the product to delete from the bundle"
        }
      ],
      "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": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "name",
                "type": "string",
                "example": "",
                "description": "The bundle name"
              },
              {
                "kind": "optional",
                "name": "description",
                "type": "string",
                "example": "",
                "description": "The bundle description"
              },
              {
                "kind": "optional",
                "name": "tag",
                "type": "string",
                "example": "",
                "description": "The optional bundle tag"
              },
              {
                "kind": "optional",
                "name": "status",
                "type": "string<Active | Inactive | Archived>",
                "example": "",
                "description": "The bundle's status"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Bundle.Bundle",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Bundle.Bundle",
            "isExpanded": true,
            "description": "The Dto of a bundle"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "{\n  \"bundleReference\": \"001PB4PI6KTXCYR8R4\",\n  \"carts\": [\n    {\n      \"cartReference\": \"0010K4PI6KTXCYFT82\",\n      \"active\": true,\n      \"contractReference\": \"0010C4PI6KTXCYB8R9\",\n      \"lineItems\": [\n        {\n          \"lineItemReference\": \"0010I4PI6KTEVRY8R2\",\n          \"description\": \"The first line item in the cart\",\n          \"pricing\": {\n            \"grossAmount\": 2.5,\n            \"netAmount\": 2.08,\n            \"taxAmount\": 0.42,\n            \"currency\": \"GBP\"\n          },\n          \"quantity\": 1,\n          \"productInfo\": {\n            \"title\": \"Example Product\",\n            \"productReference\": \"0010B4PI6KTXCYR8R4\"\n          },\n          \"customLineItemParameters\": {}\n        }\n      ]\n    }\n  ],\n  \"name\": \"Third Bundle (With Tag & Cart)\",\n  \"description\": \"The third bundle, featuring a tag & single cart\",\n  \"tag\": \"A002\",\n  \"status\": \"Active\"\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Not Found\r\n            <br />• No bundle found\r\n            <br />• No product found",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "examples": {
      "languages": [
        {
          "id": "o6qjSHBP40N_0zO5VWMEm",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://api.fictive.com/REST/api/bundles/{bundleReference}/products/{productReference} \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "nxhxWD1G8aqLMRFtwvBTN",
          "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/bundles/{bundleReference}/products/{productReference}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "8A8vb_36bbir1Bzu-pH__",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/bundles/{bundleReference}/products/{productReference}\")\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": "7pQOTXCkZrxLkZvdBI8KI",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/bundles/{bundleReference}/products/{productReference}\"\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": "o6qjSHBP40N_0zO5VWMEm"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"bundleReference\": \"001PB4PI6KTXCYR8R4\",\n  \"carts\": [\n    {\n      \"cartReference\": \"0010K4PI6KTXCYFT82\",\n      \"active\": true,\n      \"contractReference\": \"0010C4PI6KTXCYB8R9\",\n      \"lineItems\": [\n        {\n          \"lineItemReference\": \"0010I4PI6KTEVRY8R2\",\n          \"description\": \"The first line item in the cart\",\n          \"pricing\": {\n            \"grossAmount\": 2.5,\n            \"netAmount\": 2.08,\n            \"taxAmount\": 0.42,\n            \"currency\": \"GBP\"\n          },\n          \"quantity\": 1,\n          \"productInfo\": {\n            \"title\": \"Example Product\",\n            \"productReference\": \"0010B4PI6KTXCYR8R4\"\n          },\n          \"customLineItemParameters\": {}\n        }\n      ]\n    }\n  ],\n  \"name\": \"Third Bundle (With Tag & Cart)\",\n  \"description\": \"The third bundle, featuring a tag & single cart\",\n  \"tag\": \"A002\",\n  \"status\": \"Active\"\n}"
        },
        {
          "id": "response-1-404",
          "language": "404",
          "code": "// Not Found\r\n            • No bundle found\r\n            • No product found\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}