Skip to main content

Bulk Update Price List Products

The PUT endpoint updates multiple products within a price list with the specified details.

Endpoint

  • URL: /priceList/bulk
  • Method: PUT

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 updates. Below are the fields required for each update:

FieldTypeDescription
idstringThe unique identifier of the price list.
productsarrayList of products and their updated details.

Products Object:

Each item in the products array should include:

FieldTypeDescription
productstringThe unique identifier of the product.
variantsarrayList of variant objects for the product (optional)
discountnumberDiscount applied to the product.
pricenumberBase price of the product.
tierPricearrayList of updated tier pricing objects for the product.

Variant Object (Optional):

FieldTypeDescription
variantIdstringThe unique identifier of the product variant.
discountnumberDiscount applied to the variant.
pricenumberPrice of the variant.
tierPricearrayList of tier pricing objects for the variant.

Tier Price Object:

FieldTypeDescription
quantitynumberMinimum quantity for tier pricing.
pricenumberPrice at this tier.
tierPricingTypestringType of tier pricing (e.g., "fixed").

Sample Request Body

[
{
"id": "675a966b3cb7c7674fde7cd4",
"products": [
{
"tierPrice": [
{
"quantity": 1.0,
"tierPricingType": "fixed",
"price": 26.03
},
{
"quantity": 10.0,
"tierPricingType": "fixed",
"price": 18.13
}
],
"variants": [
{
"variantId": "67add68161145c61b8efc049",
"discount": 0,
"price": 0,
"tierPrice": []
}
],
"discount": 0,
"price": 0,
"product": "67ade7af5bc93d43bdce0fc4"
},
{
"tierPrice": [
{
"quantity": 1.0,
"tierPricingType": "fixed",
"price": 26.03
},
{
"quantity": 10.0,
"tierPricingType": "fixed",
"price": 18.13
}
],
"product": "65b0d13f98539a33577ac4ec"
}
]
}
]

Response

  • Status Code: 200 OK

Sample Response Body

{
"success": true,
"message": "Price List Products updated 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 updated 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.