Skip to main content

Bulk Update Price List Products

Adds or updates product prices in one or more price lists in a single request. A product that is not yet in a price list is added; a product that is already there is updated.

HTTP Request​

  • URL: /priceList/bulk
  • Method: PUT
  • 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 update.

FieldTypeRequiredDescription
idStringYesID of the price list. Each ID can appear only once.
productsArrayNoProduct prices to add or update. See below.

Product Object​

FieldTypeRequiredDescription
productStringYesID of the product.
priceNumberNoPrice of the product in this price list.
tierPriceArrayNoQuantity-based prices for the product.
variantsArrayNoVariant prices. When sent, replaces the product's variant prices. Leave out to keep them.

The variant and tier price objects are the same as in Create Price List. Prices in this request are saved exactly as sent.

cURL Example​

curl --location --request PUT '<BASE_URL>/priceList/bulk' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '[
{
"id": "66ad153dbf8641f96544341d",
"products": [
{
"product": "67ade7af5bc93d43bdce0fc4",
"price": 26.03,
"tierPrice": [
{ "quantity": 10, "price": 18.13, "tierPricingType": "fixed" }
]
}
]
},
{
"id": "66d0f6973560dad7cf821e95",
"products": [
{
"product": "65b0d13f98539a33577ac4ec",
"price": 12.5,
"variants": [
{ "variantId": "67add68161145c61b8efc049", "price": 11.75, "discount": 6 }
]
}
]
}
]'

Response​

  • 200 OK: The request was processed. If any price list ID was not found, nothing is updated, success is false and message is Some 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 updated successfully"
}

Response Details​

FieldTypeDescription
successBooleanWhether the request succeeded.
messageStringResult message.