GetHistoricalInventoryByQuery

This function returns stock information for a specified date. The response will contain both the total stock balance for each article that was in stock, and additionally more detailed information concerning exactly which batches or serial numbers that were in stock.

Note that if an article was not in stock on the specified date, then it will not be returned in the response.

Tags: GetHistoricalInventoryByQuery, GetHistoricalInventoryQuery, GetHistoricalInventoryByQueryResponse, GetHistoricalInventoryResult, HistoricalInventoryArticleRow, HistoricalInventoryArticle, HistoricalInventoryArticleItem

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

<?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>
    <GetHistoricalInventoryByQuery xmlns="http://ongoingsystems.se/WSI">
      <GoodsOwnerCode>string</GoodsOwnerCode>
      <UserName>string</UserName>
      <Password>string</Password>
      <GetHistoricalInventoryQuery>
        <StockDate>dateTime</StockDate>
        <OutboundDateType>PickingTime</OutboundDateType>
        <WarehouseCode>string</WarehouseCode>
      </GetHistoricalInventoryQuery>
    </GetHistoricalInventoryByQuery>
  </soap:Body>
</soap:Envelope>

Request specification

GetHistoricalInventoryByQuery
GoodsOwnerCode string(400) Req. The name/code of your client
UserName string(50) Req. Your username
Password string(50) Req. Your password
GetHistoricalInventoryQuery GetHistoricalInventoryQuery Req. Defines the query, what to filter for.
GetHistoricalInventoryQuery
StockDate dateTime Req. The date for which you want stock balance information.
OutboundDateType enum Req. Must be the fixed string "PickingTime".
WarehouseCode string Filter for a specific warehouse. If this is not specified, the response will contain the total stock figures for all warehouses.

Response XML

<?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>
    <GetHistoricalInventoryByQueryResponse xmlns="http://ongoingsystems.se/WSI">
      <GetHistoricalInventoryByQueryResult>
        <Success>boolean</Success>
        <Message>string</Message>
        <Rows>
          <HistoricalInventoryArticleRow>
            <Article>
              <SystemId>int</SystemId>
              <ArticleNumber>string</ArticleNumber>
              <ArticleName>string</ArticleName>
              <ProductCode>string</ProductCode>
              <NumberOfItems>decimal</NumberOfItems>
              <Price>decimal</Price>
            </Article>
            <Items>
              <HistoricalInventoryArticleItem>
                <NumberOfItems>decimal</NumberOfItems>
                <Serial>string</Serial>
                <BatchNo>string</BatchNo>
                <InOrderId>int</InOrderId>
                <InOrderNumber>string</InOrderNumber>
                <InOrderLineUnitPrice>decimal</InOrderLineUnitPrice>
                <InDate>dateTime</InDate>
              </HistoricalInventoryArticleItem>
              <HistoricalInventoryArticleItem>
                <NumberOfItems>decimal</NumberOfItems>
                <Serial>string</Serial>
                <BatchNo>string</BatchNo>
                <InOrderId>int</InOrderId>
                <InOrderNumber>string</InOrderNumber>
                <InOrderLineUnitPrice>decimal</InOrderLineUnitPrice>
                <InDate>dateTime</InDate>
              </HistoricalInventoryArticleItem>
            </Items>
          </HistoricalInventoryArticleRow>
          <HistoricalInventoryArticleRow>
            <Article>
              <SystemId>int</SystemId>
              <ArticleNumber>string</ArticleNumber>
              <ArticleName>string</ArticleName>
              <ProductCode>string</ProductCode>
              <NumberOfItems>decimal</NumberOfItems>
              <Price>decimal</Price>
            </Article>
            <Items>
              <HistoricalInventoryArticleItem>
                <NumberOfItems>decimal</NumberOfItems>
                <Serial>string</Serial>
                <BatchNo>string</BatchNo>
                <InOrderId>int</InOrderId>
                <InOrderNumber>string</InOrderNumber>
                <InOrderLineUnitPrice>decimal</InOrderLineUnitPrice>
                <InDate>dateTime</InDate>
              </HistoricalInventoryArticleItem>
              <HistoricalInventoryArticleItem>
                <NumberOfItems>decimal</NumberOfItems>
                <Serial>string</Serial>
                <BatchNo>string</BatchNo>
                <InOrderId>int</InOrderId>
                <InOrderNumber>string</InOrderNumber>
                <InOrderLineUnitPrice>decimal</InOrderLineUnitPrice>
                <InDate>dateTime</InDate>
              </HistoricalInventoryArticleItem>
            </Items>
          </HistoricalInventoryArticleRow>
        </Rows>
      </GetHistoricalInventoryByQueryResult>
    </GetHistoricalInventoryByQueryResponse>
  </soap:Body>
</soap:Envelope>

Response specification

GetHistoricalInventoryByQueryResponse
GetHistoricalInventoryByQueryResult GetHistoricalInventoryResult
GetHistoricalInventoryResult
Success boolean True if the call succeeded, false otherwise.
Message string An error message (if applicable).
Rows HistoricalInventoryArticleRow[] Containing elements of HistoricalInventoryArticleRow.
HistoricalInventoryArticleRow
Article HistoricalInventoryArticle Contains elements of HistoricalInventoryArticle, which gives information about the article/SKU.
Items HistoricalInventoryArticleItem[] Contains elements of HistoricalInventoryArticleItem, which gives detailed stock information for this particular article/SKU.
HistoricalInventoryArticle
SystemId int Ongoing WMS' internal id for this article.
ArticleNumber string(100) Article number.
ArticleName string(200) Article name.
ProductCode string(200) Product code.
NumberOfItems decimal Total stock balance for this article on the specified date.
Price decimal The stock valuation price for the article.
HistoricalInventoryArticleItem
NumberOfItems decimal The quantity contained in this item.
Serial string(128) The serial number of the item.
BatchNo string(50) The batch number of the item.
InOrderId int The id of the inorder which the item was received on (or null, if the item was not received on an inorder).
InOrderNumber string(50) The name of the inorder which the item was received on (or null, if the item was not received on an inorder).
InOrderLineUnitPrice decimal The unit price of this particular item, computed from the unit price which was entered on the inorder line.
InDate dateTime The time when the item was received.