Ongoing Warehouse logo

Ongoing Warehouse Developer

GetInventoryByQuery

This function returns two things:

The difference between this function and GetInventory, is that this function allows you to specify which article numbers you are interested in.

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

Tags: GetInventoryByQuery, GetInventoryQuery

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/GetInventoryByQuery"

<?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>
      <GetInventoryByQuery xmlns="http://ongoingsystems.se/WSI">
         <GoodsOwnerCode>string</GoodsOwnerCode>
         <UserName>string</UserName>
         <Password>string</Password>
         <GetInventoryQuery>
            <ArticleNumbersToGet>
               <string>string</string>
               <string>string</string>
            </ArticleNumbersToGet>
            <StockInfoChangedFrom>dateTime</StockInfoChangedFrom>
            <ArticlesBelowStockLimit>boolean</ArticlesBelowStockLimit>
         </GetInventoryQuery>
      </GetInventoryByQuery>
   </soap:Body>
</soap:Envelope>
+

Request specification

GetInventoryByQuery
GoodsOwnerCode str(400) Req. The name/code of your client
UserName str(50) Req. Your username
Password str(50) Req. Your password
GetInventoryQuery object Req. Defines the query, what to filter for
GetInventoryQuery
ArticleNumbersToGet object Containing elements of string, defining which article numbers to get
> string str(50)[] Req.* Article number to get
StockInfoChangedFrom datetime If True, only return articles where the stock balance has changed after this date
ArticlesBelowStockLimit bool If True, only return articles where the stock balance is below the stock limit set on the article, or where the article does not have a stock limit set

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>
      <GetInventoryByQueryResponse xmlns="http://ongoingsystems.se/WSI">
         <GetInventoryByQueryResult>
            <InventoryLines>
               <InventoryLine>
                  <Article xsi:nil="true" />
                  <NumberOfBookedItems>int</NumberOfBookedItems>
                  <NumberOfItems>int</NumberOfItems>
                  <NumberOfLockedItems>decimal</NumberOfLockedItems>
                  <LastInDate>dateTime</LastInDate>
                  <ToReceiveNumberOfItems>decimal</ToReceiveNumberOfItems>
                  <AllocatedNumberOfItems>decimal</AllocatedNumberOfItems>
                  <LockedForSaleNumberOfItems>decimal</LockedForSaleNumberOfItems>
                  <NumberOfItemsDecimal>decimal</NumberOfItemsDecimal>
                  <NumberOfBookedItemsDecimal>decimal</NumberOfBookedItemsDecimal>
                  <PickedToBeCollectedNumberOfItems>decimal</PickedToBeCollectedNumberOfItems>
                  <ReceivedToBeFinishedNumberOfItems>decimal</ReceivedToBeFinishedNumberOfItems>
               </InventoryLine>
               <InventoryLine>
                  <Article xsi:nil="true" />
                  <NumberOfBookedItems>int</NumberOfBookedItems>
                  <NumberOfItems>int</NumberOfItems>
                  <NumberOfLockedItems>decimal</NumberOfLockedItems>
                  <LastInDate>dateTime</LastInDate>
                  <ToReceiveNumberOfItems>decimal</ToReceiveNumberOfItems>
                  <AllocatedNumberOfItems>decimal</AllocatedNumberOfItems>
                  <LockedForSaleNumberOfItems>decimal</LockedForSaleNumberOfItems>
                  <NumberOfItemsDecimal>decimal</NumberOfItemsDecimal>
                  <NumberOfBookedItemsDecimal>decimal</NumberOfBookedItemsDecimal>
                  <PickedToBeCollectedNumberOfItems>decimal</PickedToBeCollectedNumberOfItems>
                  <ReceivedToBeFinishedNumberOfItems>decimal</ReceivedToBeFinishedNumberOfItems>
               </InventoryLine>
            </InventoryLines>
            <GoodsOwnerId>int</GoodsOwnerId>
         </GetInventoryByQueryResult>
      </GetInventoryByQueryResponse>
   </soap:Body>
</soap:Envelope>
+

Response specification

GetInventoryByQueryResult has the same specification as GetInventoryResult in GetInventory.