You can display an overview of the stock status across all warehouses in which a given price list item is stored. Previously, it was only possible to check the overall warehouse status, or to obtain individual information from stock cards.
Calling method
You can obtain the stock status using the method GET at the price list item's address, supplemented with the summary sub-resource $sum:
GET https://demo.flexibee.eu/c/demo/cenik/(id=13)/$sum.xml
You can also use a different identifier, such as the item code:
GET https://demo.flexibee.eu/c/demo/cenik/(id='code:XR G19507002')/$sum.xml
The stock status can also be obtained in JSON format simply by replacing the .xml extension with .json in the URL.
Result
The result is a summary overview of the stock status across all warehouses for the given item.
XML
<?xml version="1.0" encoding="utf-8"?>
<winstrom version="1.0">
<sum>
<stavyCenikGroupStavy>
<id>stavyCenikGroupStavy</id>
<stavyCenikGroupStavy>
<type>stavyCenikGroupStavy</type>
<msg>Stavy skladů:</msg>
</stavyCenikGroupStavy>
<values>
<PLZEŇ>
<msg>PLZEŇ</msg>
<unit>KS</unit>
<value>52.0</value>
</PLZEŇ>
<LIBEREC>
<msg>LIBEREC</msg>
<unit>KS</unit>
<value>0.0</value>
</LIBEREC>
<LBC>
<msg>LBC</msg>
<unit>KS</unit>
<value>1.0</value>
</LBC>
<celkem>
<msg>Celkem</msg>
<unit>KS</unit>
<value>53.0</value>
</celkem>
</values>
</stavyCenikGroupStavy>
</sum>
</winstrom>
JSON
{
"winstrom": {
"@version": "1.0",
"sum": {
"stavyCenikGroupStavy": {
"id": "stavyCenikGroupStavy",
"stavyCenikGroupStavy": {
"type": "stavyCenikGroupStavy",
"msg": "Stavy skladů:"
},
"values": {
"PLZEŇ": { "msg": "PLZEŇ", "unit": "KS", "value": "52.0" },
"LIBEREC": { "msg": "LIBEREC", "unit": "KS", "value": "0.0" },
"LBC": { "msg": "LBC", "unit": "KS", "value": "1.0" },
"celkem": { "msg": "Celkem", "unit": "KS", "value": "53.0" }
}
}
}
}
}
The result therefore shows individual stock levels — warehouse PLZEŇ 52 pcs, warehouse LIBEREC 0 pcs, warehouse LBC 1 pcs, and a total of 53 pcs.
FAQ
Can the summary be obtained for multiple price list items at once?
No, the summary can only be displayed when a single record is selected.
Can the summary be obtained for multiple warehouses within a single item at once?
No, the warehouse is not an attribute of the price list, so it cannot be used as a filter.
How can I find out the stock status as of a specific date?
There is a separate service for this, described in the article Stock status as of a date - API.
