Skip to main content

Get Price List

Retrieves a single price list together with all of its product prices, including variant and tier prices.

HTTP Request​

  • URL: /priceList/{id}
  • Method: GET
  • Headers:
    • accessToken: Required. Your API access token.
  • Required scope: READ_PRICELIST or READ_WRITE_PRICELIST

Path Parameters​

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

cURL Example​

curl --location '<BASE_URL>/priceList/66ad153dbf8641f96544341d' \
--header 'accessToken: <ACCESS_TOKEN>'

Response​

  • 200 OK: The price list was returned successfully.
  • 400 Bad Request: The access token is missing or invalid, or the price list ID is not valid.

Sample JSON Response​

{
"success": true,
"data": {
"id": "66ad153dbf8641f96544341d",
"name": "Wholesale Tier A",
"status": true,
"createdAt": "2024-08-02T17:19:57.270Z",
"updatedAt": "2024-10-03T11:07:39.081Z",
"products": [
{
"_id": "66fe7afb32aceb199725ae1c",
"priceList": "66ad153dbf8641f96544341d",
"product": "663a0cbe516313e5bc94aa8c",
"variants": [
{
"_id": "66fe7afb32aceb199725ae1e",
"variantId": "663a0cbe516313e5bc94aa8d",
"discount": 10,
"price": 45,
"tierPrice": [
{
"_id": "66fe7afb32aceb199725ae1f",
"quantity": 10,
"discount": 20,
"price": 36,
"tierPricingType": "percentage"
}
]
}
],
"discount": 0,
"price": 58.5,
"tierPrice": [],
"createdAt": "2024-10-03T11:07:39.081Z",
"updatedAt": "2024-10-03T11:07:39.081Z",
"id": "66fe7afb32aceb199725ae1c"
}
]
}
}

Response Details​

Price List Data​

FieldTypeDescription
idStringUnique identifier of the price list.
nameStringName of the price list.
statusBooleanWhether the price list is active. Default is true.
productsArrayProduct prices in this price list. See below.
createdAtStringDate and time the price list was created (ISO 8601).
updatedAtStringDate and time the price list was last updated (ISO 8601).

Product Object​

FieldTypeDescription
idStringUnique identifier of this price entry.
priceListStringID of the price list the entry belongs to.
productStringID of the product. See Get Product.
priceNumberPrice of the product in this price list.
discountNumberDiscount percentage for the product.
tierPriceArrayQuantity-based prices for the product. See below.
variantsArrayVariant prices for the product. See below.
createdAtStringDate and time the entry was created (ISO 8601).
updatedAtStringDate and time the entry was last updated (ISO 8601).

Variant Object​

FieldTypeDescription
variantIdStringID of the product variant.
priceNumberPrice of the variant in this price list.
discountNumberDiscount percentage for the variant.
tierPriceArrayQuantity-based prices for the variant.

Tier Price Object​

FieldTypeDescription
quantityNumberMinimum quantity for this tier.
priceNumberUnit price at this tier.
discountNumberDiscount percentage at this tier.
tierPricingTypeStringfixed, percentage or discount. Default is fixed.

Notes​

  • If no price list matches the ID, data is an empty object.