Skip to main content

Get Price Lists by Products

Returns, for each product you send, the price lists that contain it and the prices they set.

HTTP Request​

  • URL: /priceList/products/query
  • Method: POST
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: READ_PRICELIST or READ_WRITE_PRICELIST

Request Body​

Send the IDs of the products to look up.

FieldTypeRequiredDescription
productIdsArrayYesIDs of the products. Send at least one ID.

cURL Example​

curl --location '<BASE_URL>/priceList/products/query' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"productIds": ["663a0cbe516313e5bc94aa8c", "65b0d13f98539a33577ac4ec"]
}'

Response​

  • 200 OK: The price lists were returned successfully.
  • 400 Bad Request: The access token is missing or invalid, productIds is missing or empty, or a product ID is not valid.

Sample JSON Response​

{
"success": true,
"data": [
{
"id": "663a0cbe516313e5bc94aa8c",
"pricelists": [
{
"id": "66ad153dbf8641f96544341d",
"name": "Wholesale Tier A",
"status": true,
"price": 58.5,
"discount": 0,
"tierPrice": [
{
"_id": "66fe7afb32aceb199725ae1f",
"quantity": 10,
"discount": 0,
"price": 55,
"tierPricingType": "fixed"
}
],
"variants": [],
"createdAt": "2024-08-02T17:19:57.270Z",
"updatedAt": "2024-10-03T11:07:39.081Z"
}
]
},
{
"id": "65b0d13f98539a33577ac4ec",
"pricelists": []
}
]
}

Response Details​

Product Data​

FieldTypeDescription
idStringID of the product you sent.
pricelistsArrayPrice lists that contain the product. Empty if there are none.

Price List Object​

FieldTypeDescription
idStringID of the price list.
nameStringName of the price list.
statusBooleanWhether the price list is active.
priceNumberPrice of the product in this price list.
discountNumberDiscount percentage for the product.
tierPriceArrayQuantity-based prices. See Get Price List.
variantsArrayVariant prices. See Get Price List.
createdAtStringDate and time the price list was created (ISO 8601).
updatedAtStringDate and time the price list was last updated (ISO 8601).

Notes​

  • Results are returned in the same order as productIds.
  • Both active and inactive price lists are included. Check status to tell them apart.