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 MethodGET
URLStagehttps://api.svc.stage.ananastest.com/payment/api/v1/merchant-integration/prices
Productionhttps://api.ananas.rs/payment/api/v1/merchant-integration/prices
HTTP Headers
Header nameHeader value
AuthorizationBearer {access_token}
URL Parameters
Parameter nameParameter description
dateFromPresent or future date for which price should be returned
merchantInventoryIdsList of merchant inventory IDs for which price should be returned with a limit of max 100 IDs

Response Body:

Fields nameTypeDescription
merchantInventoryIdLongMerchant inventory ID
basePriceBigDecimalMerchant inventory price without discount on given date
sellablePriceBigDecimalMerchant inventory price with discount on given date
discountIdStringEnd date of discount

Example of request:

Click to copy
Success!
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:

Click to copy
Success!
[
  {
    merchantInventoryId: 1776331,
    basePrice: 24000,
    sellablePrice: 18000,
    discountId: "b8a14bba-a504-46d4-a627-c8eb5eb262af",
  },
];
Copyright © Ananas 2023. All right reserved.