Domů 
Předchozí stránka 
Následující stránka 
Historie změn 
 Kopírovat URL stránky 
 
Vytisknout tuto stránkuVytisknout tuto stránku  
Web services - API  >  API Reference  >  Warehouse and inventory...

Warehouse and inventory API

WarehouseGetArticleStockQuantity

Get number of items on stock.

Parameters

queryTypeType of query. Possible values are:
  • cumulativeForAllWarehouses Can be used only if parameter "warehouseCode" is not specified. In that case answer will contain total (cumulative) quantity on stock for all warehouses. Same result is achieved if parameter "queryType" is omitted.
  • perWarehouse If parameter "warehouseCode" is not specified, answer non-zero quantity on stock for each warehouse.
  • perWarehousePositiveStockOnly  Answer only positive quantity on stock. if parameter "warehouseCode" is not specified, answer quantity on stock for each warehouse.
  • perWarehouseNegativeStockOnly  Answer only negative quantity on stock. if parameter "warehouseCode" is not specified, answer quantity on stock for each warehouse.
  • perWarehousePositiveOrNegativeStockOnly  Answer only positive and negative quantity on stock. if parameter "warehouseCode" is not specified, answer quantity on stock for each warehouse.
  • perWarehouseZeroStock  Answer only zero quantity on stock. if parameter "warehouseCode" is not specified, answer quantity on stock for each warehouse.
  • perWarehouseBelowMinimalStock  Answer only products below minimum stoc with their current stock.
  • availableForAllWarehouses  Can be used only if parameter "warehouseCode" is not specified. In that case answer will contain total aveliable quantity on stock for all warehouses. Aveliable stock is quantity on stock minus reserved quantity that means the quantity on the sales orders which has not been shipped/delivered yet.
  • perWarehouseAvailableStock  Answer aveliable quantity on stock. if parameter "warehouseCode" is not specified, answer aveliable quantity on stock for each warehouse
  • reservedForAllWarehouses  Can be used only if parameter "warehouseCode" is not specified. In that case answer will contain total reserved stock quantity for all warehouses. Reserved stock is quantity on the sales orders which has not been shipped/delivered yet.
  • perWarehouseReservedStock  Answer reserved stock quantity. if parameter "warehouseCode" is not specified, answer reserved stock quantity for each warehouse.
warehouseCodeWarehouse 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.
stockDateThe date on which the stock quantity is calculated.
productCodeProduct 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.
productStatusProduct status, possible values: "active" or: "inactive".
allStockTrackingProductsGet 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 /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" 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: eurofaktura.cz 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="Mobil Sony Ericsson GTX10000" quantityOnStock="11.00">
       <StockQuantityInfo productCode="003" productDescription="Mobil 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 /WebServicesCZ/API HTTP/1.1
Host: eurofaktura.cz
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="petr" 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: eurofaktura.cz 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="Mobil Sony Ericsson GTX10000" warehouse="0001" quantityOnStock="11.00">
       <StockQuantityInfo productCode="005" productDescription="USB Charger" warehouse="0001" quantityOnStock="-5.00">
       <StockQuantityInfo productCode="003" productDescription="Mobil LG 2000" warehouse="0002" quantityOnStock="0.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>

Odkazy na tuto stránku

---
Datum a čas poslední úpravy 20.04.2021 12:47:12
© Eurofaktura s.r.o. 2003-2024