---
title: Batch delete collections.
slug: api-documentation/batch-delete-collections
docTags: 
createdAt: 2026-08-27T17:01:40.499Z
---

{
  "id": "1g9vVuxM4r8HyTATJszaB",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://api.upstartcommerce.com/pim/batch/collections/delete",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/pim/batch/collections/delete"
      }
    ],
    "name": "Batch delete collections.",
    "description": "<p>Deletes multiple collection drafts. For published-only collections, stages removal via ProductLine draft. Per-item result returned for each id.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "BatchDeleteCollectionsRequest.json",
          "schema": [],
          "modelRef": "schemas/Collection/BatchDeleteCollectionsRequest.json",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "NoChannelPortalAccess",
          "name": "NoChannelPortalAccess",
          "kind": "optional",
          "type": "http",
          "description": "<p>(DEPRECATED) This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "scheme": "bearer"
        },
        {
          "id": "ApiKeyAccess",
          "name": "X-Upstart-Api-Key",
          "kind": "optional",
          "type": "apiKey",
          "description": "Api key based authorization.",
          "in": "header"
        },
        {
          "id": "SessionIdAccess",
          "name": "X-Upstart-Session-Id",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Session based authorization. This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "All collections deleted successfully.",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "Allow",
            "description": ""
          },
          {
            "kind": "optional",
            "name": "Cache-Control",
            "description": ""
          },
          {
            "kind": "optional",
            "name": "Content-Type",
            "description": ""
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "207",
        "description": "<p>Some collections deleted (partial success).</p>",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "Allow",
            "description": ""
          },
          {
            "kind": "optional",
            "name": "Cache-Control",
            "description": ""
          },
          {
            "kind": "optional",
            "name": "Content-Type",
            "description": ""
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "_ytvK4D0HigfAGMgH7bpf",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://api.upstartcommerce.com/pim/batch/collections/delete \\\n     --header 'accept: application/json'"
        },
        {
          "id": "WHLHIxP_5ymYVNOlsp5kn",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/pim/batch/collections/delete\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "qsKh6x6xPCszx6qBgHEs6",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/pim/batch/collections/delete\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "lRLilR8gq1Ap-7HpNTcjg",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://api.upstartcommerce.com/pim/batch/collections/delete\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "_ytvK4D0HigfAGMgH7bpf"
    },
    "results": {
      "languages": [
        {
          "id": "yGj0SyDEy6zXUXZzqE8iU",
          "language": "200",
          "code": "// All collections deleted successfully.\n{}"
        },
        {
          "id": "pXffF9arkzK6BxqIc2iC8",
          "language": "207",
          "code": "// Some collections deleted (partial success).\n"
        }
      ],
      "selectedLanguageId": "yGj0SyDEy6zXUXZzqE8iU"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}