Ongoing Warehouse logo

Ongoing Warehouse Developer

GetInventoryPerWarehouse

It is possible for a goods owner to keep goods in several different warehouses. This function returns detailed information about the available number of items in each warehouse.

The functions GetInventory and GetInventoryByQuery return similar information, but they only return the total values for all warehouses.

See also our article Stock balances and inventory for more information on how to interpret the stock balance numbers returned by this function.

Tags: GetInventoryPerWarehouse, InventoryPerWarehouseQuery, GetInventoryResult, PerWarehouseArticleLines, PerWarehouseStockLine

Request XML

POST /xxx/service.asmx HTTP/1.1
Host: api.ongoingsystems.se
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ongoingsystems.se/WSI/GetInventoryPerWarehouse"

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetInventoryPerWarehouse xmlns="http://ongoingsystems.se/WSI">
      <GoodsOwnerCode>string</GoodsOwnerCode>
      <UserName>string</UserName>
      <Password>string</Password>
      <InventoryPerWarehouseQuery>
        <ArticleNumbersToGet>
          <string>string</string>
          <string>string</string>
        </ArticleNumbersToGet>
        <ArticleGroupCodesToGet>
          <string>string</string>
          <string>string</string>
        </ArticleGroupCodesToGet>
      </InventoryPerWarehouseQuery>
    </GetInventoryPerWarehouse>
  </soap:Body>
</soap:Envelope>
+

Request specification

GetInventoryPerWarehouse
GoodsOwnerCode str(400) Req. The name/code of your client
UserName str(50) Req. Your username
Password str(50) Req. Your password
InventoryPerWarehouseQuery object Req. Defines the query, what to filter for
InventoryPerWarehouseQuery
ArticleNumbersToGet object Containing elements of string, defining which article numbers to get
string str(50)[] Article number to get
ArticleGroupCodesToGet object Containing elements of string, defining which article group codes to get
string str(50)[] Article group code to get

Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetInventoryPerWarehouseResponse xmlns="http://ongoingsystems.se/WSI">
      <GetInventoryPerWarehouseResult>
        <Success>boolean</Success>
        <PerWarehouseArticleLines>
          <PerWarehouseArticleLine>
            <Article xsi:nil="true" />
            <NumberOfLockedItems>decimal</NumberOfLockedItems>
            <NumberOfItems>decimal</NumberOfItems>
            <NumberOfBookedItems>decimal</NumberOfBookedItems>
            <PerWarehouseStockLines xsi:nil="true" />
          </PerWarehouseArticleLine>
          <PerWarehouseArticleLine>
            <Article xsi:nil="true" />
            <NumberOfLockedItems>decimal</NumberOfLockedItems>
            <NumberOfItems>decimal</NumberOfItems>
            <NumberOfBookedItems>decimal</NumberOfBookedItems>
            <PerWarehouseStockLines xsi:nil="true" />
          </PerWarehouseArticleLine>
        </PerWarehouseArticleLines>
        <GetInventoryPerWarehouseErrors>
          <GetInventoryPerWarehouseError>
            <Message>string</Message>
            <ErrorType>LogonError or UnknownError</ErrorType>
          </GetInventoryPerWarehouseError>
          <GetInventoryPerWarehouseError>
            <Message>string</Message>
            <ErrorType>LogonError or UnknownError</ErrorType>
          </GetInventoryPerWarehouseError>
        </GetInventoryPerWarehouseErrors>
      </GetInventoryPerWarehouseResult>
    </GetInventoryPerWarehouseResponse>
  </soap:Body>
</soap:Envelope>
+

Response specification

GetInventoryPerWarehouseResult
Success bool Whether or not the call was successful
PerWarehouseArticleLines object Containing elements of PerWarehouseArticleLine
GetInventoryPerWarehouseErrors object If the call was not succesfull, this will contain elements of GetInventoryPerWarehouseError, giving more details about why the call was not successful
PerWarehouseArticleLines
Article object Defines the article
NumberOfLockedItems decimal Number of items in stock which are locked (in total, for all warehouses).
NumberOfItems decimal Number of items in stock (in total, for all warehouses).
NumberOfBookedItems decimal Number of items booked (in total, for all warehouses).
PerWarehouseStockLines object Containing elements of type PerWarehouseStockLine, which in turn contains the stock balance figures for a specific warehouse
PerWarehouseStockLine
WarehouseId int The Ongoing system id for the warehouse
WarehouseCode str(50) The code for the warehouse
NumberOfLockedItems decimal Number of items in stock which are locked (for this specific warehouse).
NumberOfItems decimal Number of items in stock (for this specific warehouse).
NumberOfBookedItems decimal Number of items which are booked but not yet picked (for this specific warehouse).
AvailableForSaleNumberOfItems decimal Number of items which are not locked for sale (in this specific warehouse).
SellableNumberOfItems decimal Number of items which can still be sold (from this specific warehouse). In other words, this value is AvailableForSaleNumberOfItems minus the number of booked articles.