Migrate the stock calendar endpoint

Get the stock calendar for multiple products

New endpoint: POST https://api.twinbru.com/stock/calendar (Try it)
Previous endpoints: BulkGetStockCalendar & BulkGetStockCalendarWithInfiniteStock

The new stock calendar endpoint provides a search result with multiple items containing the stock calendar for each requested product. As this endpoint is based on a search endpoint, it is possible to provide paging and filtering settings through the query parameters in the request. The endpoint expects a simple version of the query so it is only possible to use one of the following parameters:

Parameter

Example value

Meaning

page

1

The page number to fetch

pageSize

1

The number of products that should be returned per page.

filter

productid.eq.any(123,456,789)

The filter to use on the stock calendar. The regular query language is used: documentation

includeMaxLeadTime

false

Whether the theoretical stock date should be included in the result.

Example

URL: https://api.twinbru.com/stock/calendar

Method: GET

Headers:

  • Api-version: v1

  • Authorization: Bearer {jwt-token}

  • Ocp-Apim-Subscription-Key: {subscription-key}

Query parameters: ?page=1&pageSize=5&filter=productid.eq.any(123)&includeMaxLeadTime=false

Result

{
"parameters": null,
"results": [
{
"item": {
"itemId": "75904",
"localized": [],
"id": "75904",
"productId": 75904,
"salesOrganization": "2510",
"company": "BRU",
"stock": []
}
}
],
"facets": [],
"filters": [
{
"name": "productId",
"displayName": "productId",
"value": 75904,
"keyValue": "75904",
"displayValue": "75904"
}
],
"filter": "productId.eq.75904",
"page": 1,
"pageSize": 5,
"totalPageCount": 1,
"totalItemCount": 1
}