Skip to main content

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

HeaderTypeDescription
Content-TypestringMust be application/json.
accessTokenstringAccess 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:

FieldTypeDescription
idstringThe unique identifier of the price list.
productsarrayList of products identifiers to be removed.

Product Object:

Each item in the products array should include:

FieldTypeDescription
productstringThe 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

FieldTypeDescription
successbooleanIndicates the success status of the request.
messagestringA message conveying the outcome of the operation, e.g., "Price List Products deleted successfully".

Error Responses

Status CodeDescription
400Bad Request: Invalid input data.
401Unauthorized: Access token is invalid or missing.
500Internal 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.