Skip to main content

Remove Price List products

The DELETE endpoint remove the product of an price list specified by priceList_id.

Endpoint

  • URL: /priceList/{priceList_id}/product
  • Method: DELETE

Authentication

  • Header: accessToken
  • Type: Bearer Token
  • Value: <ACCESS-TOKEN>

Path Parameters

ParameterTypeDescription
priceList_idstringThe unique identifier of the price list to update.

Request Headers

HeaderTypeDescription
Content-TypestringMust be application/json.
accessTokenstringAccess token for authentication. (required)

Request Body

The request body should include remove the product id of the price list. Below are the fields that can be updated:

Sample Request Body

// Remove complete products
["productId1", "productId2", "productId3"]

or

[
"productId1", // Remove entire product
{
product: "productId2",
variants: ["variantId1", "variantId2"] // Remove only these variants
},
"productId3" // Remove entire product
]

Response

  • Status Code: 200 OK

Sample Response Body

{
"success": true,
"message": "Product removed from price list successfully",
"data": {
// Details of the updated price list, e.g., ID, name, etc.
}
}

Success Response Fields

FieldTypeDescription
successbooleanIndicates the success status of the request, typically true for a successful operation.
messagestringA message conveying the outcome of the operation, e.g., "Price list updated successfully".
dataobjectContains details of the updated price list, defined in See Price list Data

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 you replace {priceList_id} in the URL with the actual unique identifier of the price list being updated.
  • Provide a valid and active access token in the request header to authenticate your request.