Delete Products (Bulk) API

Overview

Deletes multiple products from a catalog in a single request. This API removes products by their identity values and reports per-product failures without failing the entire request. This operation permanently removes the specified products from the catalog. Unlike single product deletion, which marks products as inactive, bulk deletion cannot be undone.

Method

DELETE

Endpoint

DELETE /v2/catalogs/{catalogId}/products/bulk

Base URL

https://in1.api.clevertap.com/v2/catalogs/{catalogId}/products/bulk

Region

Refer Region for more details.

Headers

These headers must be included with every API request to ensure authentication and correct request handling.

HeaderDescriptionRequired
Content-TypeContent type of the request. Must be application/json.Yes
X-CleverTap-Account-IdCleverTap account ID associated with the catalog.Yes
X-CleverTap-PasscodeAPI passcode used to authenticate the request.Yes

Path Parameter

The following path parameter is required to identify the catalog:

ParameterTypeRequiredDescription
catalogIdNumberYesUnique identifier of the catalog from which products are deleted.

Request Parameters

The following request body parameters define the products to be deleted:

ParameterTypeRequiredDescription
identitiesarrayYesList of product identities to be deleted.
identities[]stringYesUnique identifier of each product within the catalog.

Example Request

This example deletes multiple products from the catalog:

{
  "identities": [
    "SKU-12345",
    "SKU-12346",
    "SKU-12347"
  ]
}
📘

Note
If an identity does not exist, it is returned as an error entry while other valid deletions continue to be processed.

Example Response

This example response indicates that the delete request was processed successfully.

{
  "successCount": 3,
  "failedCount": 0,
  "products": [],
  "errors": []
}

Partial Response

When some products fail to be deleted, the response includes the number of successful deletions and details for the products that could not be deleted.

{
  "successCount": 2,
  "failedCount": 1,
  "products": [],
  "errors": [
    {
      "identity": "SKU-12347",
      "errorMessage": "Product with identity SKU-12347 not found",
      "errorType": "NOT_FOUND"
    }
  ]
}

Response Parameters

The response includes the results of the bulk operation for the delete request.

ParameterTypeDescription
successCountintegerNumber of products successfully deleted.
failedCountintegerNumber of products that failed to be deleted.
productsarrayList of successfully processed products. This may be empty for delete operations.
errorsarrayList of products that failed to be deleted, along with error details.
errors.identitystringIdentity of the product that failed to be deleted.
errors.errorMessagestringDescription of why the deletion failed.
errors.errorTypestringError category indicating the reason for failure, for example, NOT_FOUND.

Limitations

  • Maximum 100 identities per request
  • Maximum payload size: 500KB (512,000 bytes)

Error Codes

This API returns a standard HTTP status code along with a plain-text message describing the issue. Common status codes include:

HTTP StatusDescription
400The request is invalid, missing required fields, or exceeds a bulk limit (product count or payload size).
403The caller lacks permission, or the catalog feature is not enabled for this account.
404The specified catalog or product does not exist.
409A conflicting resource already exists.
413The request payload exceeds the maximum allowed size.
500An unexpected server-side error occurred.

Did this page help you?
CleverTap Ask AI Widget (CSP-Safe)