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.
| Field | Type | Required | Description |
|---|---|---|---|
id | String | Yes | ID of the price list. Each ID can appear only once. |
products | Array | No | Product prices to add or update. See below. |
Product Object
| Field | Type | Required | Description |
|---|---|---|---|
product | String | Yes | ID of the product. |
price | Number | No | Price of the product in this price list. |
tierPrice | Array | No | Quantity-based prices for the product. |
variants | Array | No | Variant 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,
successisfalseandmessageisSome 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
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the request succeeded. |
message | String | Result message. |