Logo
Emporix Digital Commerce Platform API Documentation

Retrieving price by id

GET {{api-url}}/price/{{tenant}}/prices/{{priceId}}?extendWithPriceModel=true

Retrieves a specific price by price ID.
The endpoint is available in the following versions: v1 and v2.
The second version of the endpoint introduces new fields in the response. Moreover, some fields known from version v1 become deprecated. In order to check details of changes for version v2 check data schema of the response body.

 

Body PARAM

Key Datatype Required Description 
extendWithPriceModel
boolean If set to true then the price will also include the price model definition. By default the value is set as false.



HEADERS

Key Datatype Required Description 
X-Version
string The version of the schema that should be used in the request/response payload
Accept
string




RESPONSES

status OK

{ "id": "622f436e51b949194bdf6191", "productId": "53a358901b2e9dd2718b5c4e", "itemId": { "itemType": "PRODUCT", "id": "53a358901b2e9dd2718b5c4e" }, "siteCode": "1111", "currency": "USD", "country": "USA", "originalAmount": 99.99, "measurementUnit": { "quantity": 1, "unitCode": "kg" }, "salePrice": { "discountRate": 20, "description": "20% OFF, Amazing!" }, "wholesale": { "minQuantity": 2, "maxQuantity": 10 }, "priceModelId": "622f11d76825075ab563ed79", "restrictions": { "principals": [ { "type": "USER", "id": "4a1c3058b9ce48459daca560915549c5" } ], "validity": { "from": "2021-08-31T00:07:42.518Z", "to": "2022-08-31T00:07:42.518Z" }, "siteCodes": [ "1111" ] }, "tierValues": [ { "priceValueWithMarkup": "13.34", "priceValueWithoutMarkup": "13.34" } ], "priceModel": { "id": "622f11d76825075ab563ed79", "name": { "en": "astring" }, "description": { "en": "string" }, "includesTax": true, "includesMarkup": true, "measurementUnit": { "quantity": 0, "unitCode": "string" }, "tiersDefinition": { "tierType": "TIER", "tiers": [ { "minQuantity": { "quantity": 0, "unitCode": "kg" } } ] } }, "mixins": { "test2": { "atr1": "test", "atr2": "test2" }, "test1": { "atr1": "test", "atr2": "test2" } }, "metadata": { "version": 1, "createdAt": "2022-03-14T13:30:22.032Z", "modifiedAt": "2022-03-14T13:30:22.032Z", "mixins": { "test2": "url2", "test1": "url1" } } }



Curl
curl -X GET 'api-url/price/api-url/prices/api-url?extendWithPriceModel=true?extendWithPriceModel=true' -H 'X-Version: v2' -H 'Accept: application/json'

ENDPOINTS