Skip to main content

API - View stock levels

Written by Tom Higgs
Updated over 2 weeks ago

This guide is intended for customers with custom-built third-party API integrations. It provides an additional method for viewing stock levels, rather than the standard approach.

You can get stock levels for products using the GET /api/Product/StockLevels call. You need to supply the API key and WarehouseID. There's also an optional parameter called Breakdown. If you want a breakdown of the stock held, for example, best before dates, batch number or serial number, set this to true.

With the breakdown parameter not set

[   {     "ProductId": 1,     "WarehouseId": 3,     "ClientId": 3,     "SKU": "MY-SKU",     "Level": 10,     "PreOrderable": true,     "Bundle": false,     "LowStockLevel": 0,     "Breakdown": []   }   ]

With the breakdown parameter set to true

[   {     "ProductId": 1,     "WarehouseId": 3,     "ClientId": 3,     "SKU": "MY-SKU",     "Level": 10,     "PreOrderable": true,     "Bundle": false,     "LowStockLevel": 0,     "Breakdown": [ {         "Quantity": 5,         "BatchNo": "BATCH-1",         "SerialNo": "SERIAL1234",         "BestBefore": "05-May-2019",         "Type": "Allocation"       },{         "Quantity": 5,         "BatchNo": "BATCH-2",         "SerialNo": "SERIAL123",         "BestBefore": "01-June-2019",         "Type": "Allocation"       }]   }]

Key Information

Within the API response,

API "Level" = MINTSOFT "OnHand".

API "Total Stock Level" = MINTSOFT "Stock Level".

Quarantined stock is not included in the total stock level, just like in the Mintsoft front-end, however if you include the breakdown in the API call you can identify quarantined stock totals from there.


Related API Stock Level Call

In addition to the above API call, we have /api/Product/StockLevels/UpdatedSince which is used to check for updates to products' stock levels without pulling the full product list. This can improve performance and reduce processing time after a full stock record has been established.

Did this answer your question?