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_PRICELISTorREAD_WRITE_PRICELIST
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | Required. 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
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier of the price list. |
name | String | Name of the price list. |
status | Boolean | Whether the price list is active. Default is true. |
products | Array | Product prices in this price list. See below. |
createdAt | String | Date and time the price list was created (ISO 8601). |
updatedAt | String | Date and time the price list was last updated (ISO 8601). |
Product Object
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier of this price entry. |
priceList | String | ID of the price list the entry belongs to. |
product | String | ID of the product. See Get Product. |
price | Number | Price of the product in this price list. |
discount | Number | Discount percentage for the product. |
tierPrice | Array | Quantity-based prices for the product. See below. |
variants | Array | Variant prices for the product. See below. |
createdAt | String | Date and time the entry was created (ISO 8601). |
updatedAt | String | Date and time the entry was last updated (ISO 8601). |
Variant Object
| Field | Type | Description |
|---|---|---|
variantId | String | ID of the product variant. |
price | Number | Price of the variant in this price list. |
discount | Number | Discount percentage for the variant. |
tierPrice | Array | Quantity-based prices for the variant. |
Tier Price Object
| Field | Type | Description |
|---|---|---|
quantity | Number | Minimum quantity for this tier. |
price | Number | Unit price at this tier. |
discount | Number | Discount percentage at this tier. |
tierPricingType | String | fixed, percentage or discount. Default is fixed. |
Notes
- If no price list matches the ID,
datais an empty object.