Get merchant inventory prices
Endpoint for fetching prices for given merchant inventory IDs and date time. This is a protected route, which means that authorization token with PUBLIC API full permissions is needed to access this route. Beside “Authorization” header, we must forward twomore parameters –dateFrom and merchantInventoryIds.
Request
Request:HTTP Method | GET | |||||||
URL | Stage | https://api.svc.stage.ananastest.com/payment/api/v1/merchant-integration/prices | ||||||
Production | https://api.ananas.rs/payment/api/v1/merchant-integration/prices | |||||||
HTTP Headers |
| |||||||
URL Parameters |
|
Response Body:
Fields name | Type | Description |
merchantInventoryId | Long | Merchant inventory ID |
basePrice | BigDecimal | Merchant inventory price without discount on given date |
sellablePrice | BigDecimal | Merchant inventory price with discount on given date |
discountId | String | End date of discount |
Example of request:
url--location--requestGET'https://api.svc.stage.ananastest.com/payment/api/v1/merchant-integration/prices?dateFrom=20/07/2022&merchantInventoryIds=1776331, 1776332'\--header'Authorization: Bearer eyJraWQiOiJvY1ZZbHpcL3E1RDlNZnh4TGtHODZFYzVFQmp5WkN3MjMxaUt1a0h2Y1ZMbz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIyNnZqamMzbnBkaDBiMG1qcTJsMzFwN3MxaiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoicHVibGljX2FwaVwvZnVsbF9hY2Nlc3MiLCJhdXRoX3RpbWUiOjE2NTgzMzQ3MTYsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS1jZW50cmFsLTEuYW1hem9uYXdzLmNvbVwvZXUtY2VudHJhbC0xX0pvMVZnTkR2SyIsImV4cCI6MTY1ODMzNTYxNiwiaWF0IjoxNjU4MzM0NzE2LCJ2ZXJzaW9uIjoyLCJqdGkiOiIyZmMxYmU2Zi0xOGIxLTRiZjAtOTRiNS05NzM3MzcxMTY5YjUiLCJjbGllbnRfaWQiOiIyNnZqamMzbnBkaDBiMG1qcTJsMzFwN3MxaiJ9.idjWDhMehfBLyvTTDxp1ymTSApYNW972X5bdeakm5npXUgWtTu1P0Kh5PVcPvbRHRqoznCm1jpKxGWztHhtcn5QHDsnWzPdIuUZP5tczVyXz5SIMnQJJHK8CmgBhx-pRtvSZUrA7p_r5dSK2w8MkrgVO3-a65AJKeL9wINlNEEHRUjzriPg0YHZp5fqBE7wt8PxKM4myI8TGIpTI74AzIqoHukeImKH1Sr-InT3fcnjxIqKV1B5ZUlqFuyxLYa1e4rFLN3kRKNQkh-nw1WeWexV_X63ELLCwMKIFeeOL0U13-SDgUGRQI0dsJJPMSQOcFL4D1CP7b35VTTjS4RC_zA'
Example of response:
[
{
merchantInventoryId: 1776331,
basePrice: 24000,
sellablePrice: 18000,
discountId: "b8a14bba-a504-46d4-a627-c8eb5eb262af",
},
];