Stock Query
The GetStockInfo endpoint returns product stock information from the MIMS system.
How to query product stock information
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/GetStockInfo |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"GetStockInfo" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ProductList | GetStockInfoProductList | No | List of all products that will be returned in the search result |
📝 GetStockInfoProductList Object
The GetStockInfoProductList object represents the list of products to be queried.
Input Parameters
Parameter Type Required Description ProductNo String(25) Yes External code of the product
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| StockInfoDataList | GetStockInfoDataList | Yes | List of objects with stock information |
📝 GetStockInfoDataList Object
The GetStockInfoDataList object represents stock information for a product.
Return Parameters
Parameter Type Required Description ProductCode String(4) Yes Product production code ProductNo String(25) Yes External code of the product AvailableUnits Integer Yes Available units AvailableWeight Float Yes Available weight UnavailableUnits Integer Yes Unavailable units UnavailableWeight Float Yes Unavailable weight TotalUnits Integer Yes Total units TotalWeight Float Yes Total weight ProductionOrderUnits Integer Yes Units scheduled for production ProductionOrderWeight Float Yes Weight scheduled for production ProductionUnits Integer Yes Produced units ProductionWeight Float Yes Produced weight SalesOrderUnits Integer Yes Sold units SalesOrderWeight Float Yes Sold weight QAHoldUnits Integer Yes Sequestrated units QAHoldWeight Float Yes Sequestrated weight DistributionCenterNo String(25) Yes External code of the product distribution center
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"GetStockInfo"' \
--header 'Content-Type: application/json' \
--data '{
"ProductList": [
{
"ProductNo": "PROD123"
},
{
"ProductNo": "PROD456"
}
]
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"StockInfoDataList": [
{
"ProductCode": "P001",
"ProductNo": "PROD123",
"AvailableUnits": 100,
"AvailableWeight": 250.5,
"UnavailableUnits": 20,
"UnavailableWeight": 50.0,
"TotalUnits": 120,
"TotalWeight": 300.5,
"ProductionOrderUnits": 50,
"ProductionOrderWeight": 125.0,
"ProductionUnits": 80,
"ProductionWeight": 200.0,
"SalesOrderUnits": 30,
"SalesOrderWeight": 75.0,
"QAHoldUnits": 10,
"QAHoldWeight": 25.0,
"DistributionCenterNo": "DC001"
}
]
}