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
| Parameter | Type | Description |
|---|---|---|
priceList_id | string | The unique identifier of the price list to retrieve. |
Request Headers
| Header | Type | Description |
|---|---|---|
accessToken | string | Access 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
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates the success status of the request, typically true for a successful operation. |
data | object | Contains details of the price list. |
Data Object
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier of the price list. |
name | string | The name of the price list. |
status | boolean | Current status of the price list. |
products | array | List of products included in the price list. |
createdAt | string | Timestamp when the price list was created. |
updatedAt | string | Timestamp when the price list was last updated. |
Products Array:
Each item in the products array represents a product and can include the following fields:
| Field | Type | Description |
|---|---|---|
product | string | Unique identifier of the product. |
variants | array | Variants associated with the product. |
discount | number | Discount applied to the product. |
price | number | Price of the product. |
tierPrice | array | Tier pricing details associated with the product. |
_id | string | Unique identifier of the product entry. |
Tier Price Array:
Each item in the tierPrice array provides tier pricing details with the following fields:
| Field | Type | Description |
|---|---|---|
quantity | number | Minimum quantity required for this tier pricing. |
discount | number | Discount percentage or amount for this tier. |
price | number | Tier-specific price for the product. |
tierPricingType | string | Type of tier pricing, e.g., "discount" or "fixed". |
Error Responses
| Status Code | Description |
|---|---|
| 400 | Bad Request: Invalid input data. |
| 401 | Unauthorized: Access token is invalid or missing. |
| 404 | Not Found: The specified price list could not be found. |
| 500 | Internal 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.