Ongoing WMS logo

Ongoing WMS 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, ReportedPerArticleAndWarehouse

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>
        <MaxArticlesToGet>int</MaxArticlesToGet>
        <ArticleSystemIdFrom>int</ArticleSystemIdFrom>
        <ProductCodesToGet>
          <string>string</string>
          <string>string</string>
        </ProductCodesToGet>
        <GetInventoryForWarehouseIds>
          <int>int</int>
          <int>int</int>
        </GetInventoryForWarehouseIds>
      </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
MaxArticlesToGet int Max number of articles to return in response
ArticleSystemIdFrom int If specified, the API will only respond with articles whose system Ids are greater than or equal to (>=) the specified id. In conjunction with MaxArticlesToGet this allows you to request articles in batches of e.g. 100, rather than having to request all articles at once.
ProductCodesToGet object Containing elements of string, defining which product codes to get
GetInventoryForWarehouseIds object Contains a list of warehouse IDs. If specified, the call will only return the inventory values for the specified warehouse IDs.

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 Ongoing WMS internal 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.
Reported obj Object of type ReportedPerArticleAndWarehouse.
ReportedPerArticleAndWarehouse
PickedToBeReportedNumberOfItems dec Number of items which have been picked but not reported. See Reported number of items.
ReturnedToBeReportedNumberOfItems dec Number of items which have been returned but not reported. See Reported number of items.
ReceivedToBeReportedNumberOfItems dec Number of items which have been received but not reported. See Reported number of items.