e-računi navodila za up... | > | Spletne storitve in int... | > | API Reference | > | Warehouse and inventory... |
Get number of items on stock.
Parameters
queryType | Type of query. Possible values are:
|
warehouseCode | Warehouse code. If this parameter is missing, answer result depending on value of parameter "queryType". If "queryType" is missing or is "cumulativeForAllWarehouses" or "availableForAllWarehouses", return total quantity on stock for all warehouses, otherwise return quantities per warehouse. |
stockDate | The date on which the stock quantity is calculated. |
productCode | Product code(-s) for items that are being queried. Multiple occurrences of this parameter are allowed. If this parameter is missing then the first 50 000 records will be reported. |
productStatus | Product status, possible values: "active" or: "inactive". |
allStockTrackingProducts | Get results for all product that stock is and will be tracked (in case some new products are added in program but there is still no stock tracking record), possible values: "true", 1. |
Example request and response
Example 1.
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WarehouseGetArticleStockQuantity">
<parameter name="warehouseCode" value="01" />
<parameter name="stockDate" type="Date" value="2009-01-01" />
<parameter name="productCode" type="String" value="123" />
<parameter name="productCode" type="String" value="003" />
<parameter name="productCode" type="String" value="005" />
</method>
</request>
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 Apr 2009 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
<StockQuantityInfo productCode="123" productDescription="Mobitel Sony Ericsson GTX10000" quantityOnStock="11.00">
<StockQuantityInfo productCode="003" productDescription="Mobitel LG 2000" quantityOnStock="0.00">
<StockQuantityInfo productCode="005" productDescription="USB Charger" quantityOnStock="-5.00">
</response>
Example 2. For company with two warehouses 0001 and 0002. Request is for getting quantities on stock for articles 003 and 005 from all warehouses.
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WarehouseGetArticleStockQuantity">
<parameter name="stockDate" type="Date" value="2009-01-01" />
<parameter name="queryType" value="perWarehouse" />
<parameter name="productCode" type="String" value="003" />
<parameter name="productCode" type="String" value="005" />
</method>
</request>
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 Apr 2009 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
<StockQuantityInfo productCode="003" productDescription="Mobitel Sony Ericsson GTX10000" warehouse="0001" quantityOnStock="11.00">
<StockQuantityInfo productCode="005" productDescription="USB Charger" warehouse="0001" quantityOnStock="-5.00">
<StockQuantityInfo productCode="003" productDescription="Mobitel LG 2000" warehouse="0002" quantityOnStock="8.00">
<StockQuantityInfo productCode="005" productDescription="USB Charger" warehouse="0002" quantityOnStock="-5.00">
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description=""><error/> <!-- Invalid search keys, invalid values, no privileges,
</response>