Matching prices for session context
POST {{api-url}}/price/{{tenant}}/matchPriceByContext
preview endpoint - the endpoint is not fully operated yet.
AVAILABLE for Price Service v2 only
This endpint allows to match the best available price for the provided item. The details about target currency, site and user/group identifier will be retrieved from the session context service.
### Required scopes
* price.price_match_own
Request Body
{"items"=>[{"itemId"=>{"itemType"=>"PRODUCT", "id"=>"{{productId}}"}, "quantity"=>{"quantity"=>1, "unitCode"=>"pc"}}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
[{"priceId":"62321e9951bbbc22501aec91","itemId":{"itemType":"PRODUCT","id":"5f5a39d95bac380024b93c24"},"siteCode":"1111","currency":"USD","originalValue":"1.199","effectiveValue":"1.089","totalValue":"1.089","quantity":{"quantity":1,"unitCode":"kg"},"salePrice":{"discountAmount":0.1},"includesTax":false,"metadata":{"version":1,"createdAt":"2022-03-16T17:30:01.030Z","modifiedAt":"2022-03-16T17:30:01.030Z"}}]