Bulk Delete Products from Price List
The DELETE endpoint removes specified products from a price list.
Endpoint
- URL:
/priceList/bulk - Method:
DELETE
Authentication
- Header:
accessToken - Type: Bearer Token
- Value:
<ACCESS-TOKEN>
Request Headers
| Header | Type | Description |
|---|---|---|
Content-Type | string | Must be application/json. |
accessToken | string | Access token for authentication. (required) |
Request Body
The request body should include an array of price list references with products to be deleted. Below are the fields required:
| Field | Type | Description |
|---|---|---|
id | string | The unique identifier of the price list. |
products | array | List of products identifiers to be removed. |
Product Object:
Each item in the products array should include:
| Field | Type | Description |
|---|---|---|
product | string | The unique identifier of the product to delete. |
Sample Request Body
[
{
"id": "675a966b3cb7c7674fde7cd4",
"products": [
{
"product": "65b0d13f98539a33577ac4ec"
}
]
}
]
Response
- Status Code: 200 OK
Sample Response Body
{
"success": true,
"message": "Price List Products deleted successfully"
}
Success Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates the success status of the request. |
message | string | A message conveying the outcome of the operation, e.g., "Price List Products deleted successfully". |
Error Responses
| Status Code | Description |
|---|---|
| 400 | Bad Request: Invalid input data. |
| 401 | Unauthorized: Access token is invalid or missing. |
| 500 | Internal Server Error: An error occurred on the server. |
Notes
- Ensure your request body is formatted according to the specified structure.
- Provide a valid and active access token in the request header to authenticate your request.