ODS - Get the stock calendar for the requested product

New endpoint: GET https://api.twinbru.com/stock/{productId}/calendar[?quantity][&includeMaxLeadTime] (Try it)
Previous endpoints: BulkGetStockCalendar, BulkGetStockCalendarWithInfiniteStock, GetStockCalendar & GetStockCalendarWithInfiniteStock

Stock calendar info can be retrieved from the Get the stock calendar for the requested product API endpoint. This endpoint will return multiple results.
The new endpoint support only single product stock calendar information. Bulk stock calendar information is not possible anymore.

Parameter

Example value

Meaning

productId

300

Product you want to fetch information from

quantity

50

The minimum quantity for which you want to generate the calendar
Optional parameter

includeMaxLeadTime

true or false

Whether to include the infinite stock date in the calendar (if available)
Optional parameter

Example

URL: https://api.twinbru.com/stock/300/calendar?quantity=50&includeMaxLeadTime=true

Method: GET

Parameters:

  • quantity: 50

  • includeMaxLeadTime: true

Headers:

  • Api-version: v1

  • Authorization: Bearer {jwt-token}

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

Result

{
"parameters": null,
"results": [
{
"item": {
"productId": 300,
"company": "BRU",
"salesOrganization": "2510",
"isDeleted": false,
"territoryId": "BRU_GLO",
"stockDate": "2020-11-20",
"stockDateUnix": 1605830400,
"stockQuantity": 500.5,
"isMaxLeadTime": false
}
},
{
"item": {
"productId": 300,
"company": "BRU",
"salesOrganization": "2510",
"isDeleted": false,
"territoryId": "BRU_GLO",
"stockDate": "2021-11-13",
"stockDateUnix": 1636761600,
"stockQuantity": 99999,
"isMaxLeadTime": true
}
}
],
"facets": [],
"filters": [
{
"name": "productId",
"displayName": "productId",
"keyValue": "300",
"displayValue": "300"
}
],
"filter": "productId.eq.300",
"page": 1,
"pageSize": 1,
"totalPageCount": 1,
"totalItemCount": 1
}