Skip to main content

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_PRICELIST or READ_WRITE_PRICELIST

Query Parameters​

ParameterTypeDescription
pageIntegerPage number to return. Default is 1.
limitIntegerNumber 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​

FieldTypeDescription
idStringUnique identifier of the price list.
nameStringName of the price list.
statusBooleanWhether the price list is active.
productCountNumberNumber of products in the price list.
createdAtStringDate and time the price list was created (ISO 8601).
updatedAtStringDate and time the price list was last updated (ISO 8601).

Pagination Details​

FieldTypeDescription
pageNumberCurrent page number.
totalNumberTotal number of price lists.
countNumberNumber of price lists on this page.