Skip to main content

Get Price List

The GET endpoint retrieves details of a specific price list specified by priceList_id.

Endpoint

  • URL: /priceList/{priceList_id}
  • Method: GET

Authentication

  • Header: accessToken
  • Type: Bearer Token
  • Value: <ACCESS-TOKEN>

Path Parameters

ParameterTypeDescription
priceList_idstringThe unique identifier of the price list to retrieve.

Request Headers

HeaderTypeDescription
accessTokenstringAccess token for authentication. (required)

Response

  • Status Code: 200 OK

Sample Response Body

{
"success": true,
"data": {
"_id": "66ad153dbf8641f96544341d",
"name": "Arun Price List",
"status": true,
"products": [
{
"product": "663a0cbe516313e5bc94aa8c",
"variants": [],
"discount": 10,
"price": 58.5,
"tierPrice": [],
"_id": "66fe7afb32aceb199725ae1c"
},
{
"product": "663a0cbe516313e5bc94aa90",
"variants": [],
"discount": 10,
"price": 36,
"tierPrice": [],
"_id": "66fe7afb32aceb199725ae1d"
}
],
"createdAt": "2024-08-02T17:19:57.270Z",
"updatedAt": "2024-10-03T11:07:39.081Z",
"id": "66ad153dbf8641f96544341d"
}
}

Success Response Fields

FieldTypeDescription
successbooleanIndicates the success status of the request, typically true for a successful operation.
dataobjectContains details of the price list.

Data Object

FieldTypeDescription
idstringUnique identifier of the price list.
namestringThe name of the price list.
statusbooleanCurrent status of the price list.
productsarrayList of products included in the price list.
createdAtstringTimestamp when the price list was created.
updatedAtstringTimestamp when the price list was last updated.

Products Array:

Each item in the products array represents a product and can include the following fields:

FieldTypeDescription
productstringUnique identifier of the product.
variantsarrayVariants associated with the product.
discountnumberDiscount applied to the product.
pricenumberPrice of the product.
tierPricearrayTier pricing details associated with the product.
_idstringUnique identifier of the product entry.

Tier Price Array:

Each item in the tierPrice array provides tier pricing details with the following fields:

FieldTypeDescription
quantitynumberMinimum quantity required for this tier pricing.
discountnumberDiscount percentage or amount for this tier.
pricenumberTier-specific price for the product.
tierPricingTypestringType of tier pricing, e.g., "discount" or "fixed".

Error Responses

Status CodeDescription
400Bad Request: Invalid input data.
401Unauthorized: Access token is invalid or missing.
404Not Found: The specified price list could not be found.
500Internal Server Error: An error occurred on the server.

Notes

  • Ensure you replace {priceList_id} in the URL with the actual unique identifier of the price list being retrieved.
  • Provide a valid and active access token in the request header to authenticate your request.