ODS - Get stock information for the requested products

Get stock information for the requested products

New endpoint: POST https://api.twinbru.com/stock (Try it)
Previous endpoints: BulkGet & BulkGetWithIndividualQuantity

Stock info can be retrieved from the Get stock information for the requested products API endpoint.
This endpoint will return a single stock result for each product that is requested and expect a collection of products in the body.
Each product should always contain a specific productId and quantity.
So the new endpoint merged both endpoints (BulkGet & BulkGetWithIndividualQuantity). From now on we expect always an individual quantity.

Parameter

Example value

Meaning

Products

{
    "products": [
        {
            "productId": 300,
            "quantity": 600
        },
        {
            "productId": 301,
            "quantity": 50
        }
    ]
}

The list of products that to request stock
information for.


Example

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

Method: POST

Headers:

  • Api-version: v1

  • Authorization: Bearer {jwt-token}

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

Body:

{
    "products": [
        {
            "productId": 300,
            "quantity": 600
        },
        {
            "productId": 301,
            "quantity": 50
        }
    ]
}

Result

{
    "parameters": null,
    "results": [
        {
            "item": {
                "itemId": "300",
                "localized": [],
                "id": "300",
                "productId": 300,
                "salesOrganization": "2510",
                "company": "BRU",
                "lastUpdateDate": "2021-06-23",
                "stockDateUnix": 1629590400,
                "isMaxLeadTime": true,
                "stockDate": "2021-08-22",
                "stockQuantity": 600.0,
                "territoryId": "BRU_GLO"
            }
        },
        {
            "item": {
                "itemId": "301",
                "localized": [],
                "id": "301",
                "productId": 301,
                "salesOrganization": "2510",
                "company": "BRU",
                "lastUpdateDate": "2021-06-23",
                "stockDateUnix": 1629590400,
                "isMaxLeadTime": true,
                "stockDate": "2021-08-22",
                "stockQuantity": 50.0,
                "territoryId": "BRU_GLO"
            }
        }
    ],
    "facets": [],
    "filters": [
        {
            "name": "productId",
            "displayName": "productId",
            "value": 300,
            "keyValue": "300",
            "displayValue": "300"
        },
        {
            "name": "productId",
            "displayName": "productId",
            "value": 301,
            "keyValue": "301",
            "displayValue": "301"
        }
    ],
    "filter": "productId.eq.any(300,301)",
    "page": 1,
    "pageSize": 2,
    "totalPageCount": 1,
    "totalItemCount": 2
}