XM

Retrieve Price by Item and Price List IDs

Path:

POST /v2/price/get

This API works for B2B and subscription scenarios, to fetch the offers and price details based on the specified item IDs and price-list IDs.

Headers

Content-Type : application/json

x-site-context : {"stage":"dev02","account":"5f328bf0b7c15700071233b9","date":"","channel":12}

Consumes

  • application/json

Produces

  • application/json

Parameters

Type: body

Name: price-request

Description: The criteria to retrieve price details - a list of item ID and Price List ID.

Required: true

Sample Request

{
"items": [
{
"itemId": 1000012000,
"priceListId": 100013
}
]
}

Response

HTTP Code: 200 Message: OK

Sample:

[
{
"_id": "600f065d6bd18f0007ee9a33",
"priceListId": 100013,
"itemId": 1000012000,
"offers": [
{
"price": {
"sale": 31.5,
"cost": 35,
"currency": "USD",
"base": 35
},
"_id": "60144d5695297d0007dd875a",
"kind": "Promotion",
"channel": 12,
"startDate": "2021-01-29T22:00:00.000Z",
"endDate": "2021-02-04T22:00:00.000Z",
"offerCode": 4165995
}
]
}
]

HTTP Code: 400 Message: Client Error

HTTP Code: 500 Message: Server Error

Changelog

*Last updated - March 2021