Get All Price Lists
Retrieves all price lists, one page at a time. Each price list shows how many products it contains. To see the product prices of a price list, use Get Price List.
HTTP Request
- URL:
/priceList/all - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_PRICELISTorREAD_WRITE_PRICELIST
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | Integer | Page number to return. Default is 1. |
limit | Integer | Number of price lists per page. Default is 10. |
cURL Example
curl --location '<BASE_URL>/priceList/all?page=1&limit=10' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The price lists were returned successfully.
- 400 Bad Request: The access token is missing or invalid, or does not have the required scope.
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",
"productCount": 42,
"id": "66ad153dbf8641f96544341d"
},
{
"_id": "66d0f6973560dad7cf821e95",
"name": "Distributor Pricing",
"status": false,
"createdAt": "2024-08-29T22:30:47.429Z",
"updatedAt": "2024-09-06T10:00:01.593Z",
"productCount": 0,
"id": "66d0f6973560dad7cf821e95"
}
],
"pagination": {
"page": 1,
"total": 2,
"count": 2
}
}
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. |
productCount | Number | Number of products in the price list. |
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). |
Pagination Details
| Field | Type | Description |
|---|---|---|
page | Number | Current page number. |
total | Number | Total number of price lists. |
count | Number | Number of price lists on this page. |