Skip to main content

Update Price List

Updates the details of an existing price list. You can also set new prices for selected products in the same request. Products you don't send keep their current prices.

HTTP Request​

  • URL: /priceList/update/{id}
  • Method: PUT
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: READ_WRITE_PRICELIST

Path Parameters​

ParameterTypeDescription
idStringRequired. The ID of the price list to update.

Request Body​

Send only the fields you want to change.

FieldTypeRequiredDescription
nameStringNoNew name of the price list.
statusBooleanNoWhether the price list is active.
productsArrayNoProduct prices to set. Each product you send replaces its existing prices.

The product, variant and tier price objects are the same as in Create Price List.

cURL Example​

curl --location --request PUT '<BASE_URL>/priceList/update/66ad153dbf8641f96544341d' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Wholesale Tier A (2025)",
"products": [
{
"product": "663a0cbe516313e5bc94aa8c",
"price": 54,
"tierPrice": [
{ "quantity": 25, "price": 50, "tierPricingType": "fixed" }
]
}
]
}'

Response​

  • 200 OK: The request was processed. If the price list was not found, success is false and message is PriceList not found.
  • 400 Bad Request: The access token is missing or invalid, the request body is empty or not valid, or a product or variant was not found.

Sample JSON Response​

{
"success": true,
"message": "PriceList updated Successfully",
"data": {
"_id": "66ad153dbf8641f96544341d",
"name": "Wholesale Tier A (2025)",
"status": true,
"createdAt": "2024-08-02T17:19:57.270Z",
"updatedAt": "2024-10-17T09:02:44.511Z",
"products": [
{
"_id": "6710cdf4a1b2c3d4e5f60720",
"priceList": "66ad153dbf8641f96544341d",
"product": "663a0cbe516313e5bc94aa8c",
"variants": [],
"discount": 0,
"price": 54,
"tierPrice": [
{
"_id": "6710cdf4a1b2c3d4e5f60721",
"quantity": 25,
"discount": 0,
"price": 50,
"tierPricingType": "fixed"
}
],
"createdAt": "2024-10-17T09:02:44.530Z",
"updatedAt": "2024-10-17T09:02:44.530Z",
"id": "6710cdf4a1b2c3d4e5f60720"
}
],
"id": "66ad153dbf8641f96544341d"
}
}

Response Details​

FieldTypeDescription
successBooleanWhether the request succeeded.
messageStringResult message.
dataObjectThe updated price list with all of its product prices. See Get Price List.

Notes​

  • Each product in products replaces that product's existing prices, including its variant and tier prices. Send the full set of prices for each product.