---
title: Deletes a contract from the specified bundle
slug: docs/demo/deletes-a-contract-from-the-specified-bundle
description: Learn how to make a DELETE request to a specific endpoint using curl with this code example. Ensure successful HTTP communication as the code includes headers for accepting and sending JSON data. Accelerate your development process now.
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "7dm0rF3ftCkzu6q58uBR6",
  "data": {
    "url": "https://api.fictive.com/REST/api/bundles/{bundleReference}/contracts/{contractReference}",
    "name": "Deletes a contract 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": "contractReference",
          "type": "string",
          "description": "The reference of the contract 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": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Not Found\r\n            <br />• No bundle found\r\n            <br />• No contract found",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "409",
        "description": "The contract is not assigned to existing subscribers",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "412",
        "description": "Cannot amend or delete a cart that has been purchased",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "examples": {
      "languages": [
        {
          "id": "zBNe2W2Y2hxTpI-lhoNdl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://api.fictive.com/REST/api/bundles/{bundleReference}/contracts/{contractReference} \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "_PeAnbqxA1cOppfFbIvd7",
          "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}/contracts/{contractReference}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "tH0u3HF_JOkr1JZNK1ugd",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/bundles/{bundleReference}/contracts/{contractReference}\")\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": "0Ez8XMl33ZMiDG9YIQwDy",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/bundles/{bundleReference}/contracts/{contractReference}\"\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": "zBNe2W2Y2hxTpI-lhoNdl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"tag\": \"\",\n  \"status\": \"\"\n}"
        },
        {
          "id": "response-1-404",
          "language": "404",
          "code": "// Not Found\r\n            • No bundle found\r\n            • No contract found\n"
        },
        {
          "id": "response-2-409",
          "language": "409",
          "code": "// The contract is not assigned to existing subscribers\n"
        },
        {
          "id": "response-3-412",
          "language": "412",
          "code": "// Cannot amend or delete a cart that has been purchased\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}