Bulk Delete Products from Price List
Removes products from one or more price lists in a single request. The price lists themselves are kept.
HTTP Request
- URL:
/priceList/bulk(also available at/priceList/bulk/products) - Method:
DELETE - Headers:
accessToken: Required. Your API access token.Content-Type:application/json
- Required scope:
READ_WRITE_PRICELIST
Request Body
Send an array of price lists, each with the products to remove.
| Field | Type | Required | Description |
|---|---|---|---|
id | String | Yes | ID of the price list. Each ID can appear only once. |
products | Array | Yes | Products to remove from this price list. See below. |
Product Object
| Field | Type | Required | Description |
|---|---|---|---|
product | String | Yes | ID of the product to remove. |
cURL Example
curl --location --request DELETE '<BASE_URL>/priceList/bulk' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '[
{
"id": "66ad153dbf8641f96544341d",
"products": [
{ "product": "65b0d13f98539a33577ac4ec" },
{ "product": "67ade7af5bc93d43bdce0fc4" }
]
}
]'
Response
- 200 OK: The request was processed. If any price list ID was not found, nothing is deleted,
successisfalseandmessageisSome PriceList not found. - 401 Unauthorized: The access token is missing or invalid.
- 403 Forbidden: The access token does not have the required scope.
Sample JSON Response
{
"success": true,
"message": "Price List Products deleted successfully"
}
Response Details
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the request succeeded. |
message | String | Result message. |