GetInventoryTasksByQuery

This function lets you retrieve inventory tasks. It only includes very basic information about each task. To get detailed information about which items are being inventoried, call GetInventoryTaskArticleItems.

Tags: GetInventoryTasksByQuery, Query, InventoryTaskInfo

Request XML

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

<?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>
    <GetInventoryTasksByQuery xmlns="http://ongoingsystems.se/Automation">
      <UserName>string</UserName>
      <Password>string</Password>
      <Query>
        <OnlyActiveTasks>boolean</OnlyActiveTasks>
        <ArticleDefId>int</ArticleDefId>
        <LocationId>int</LocationId>
        <InventoryIdFrom>int</InventoryIdFrom>
        <CreatedTimeFrom>dateTime</CreatedTimeFrom>
        <OnlyLiveGoodsOwners>boolean</OnlyLiveGoodsOwners>
        <GoodsOwnerId>int</GoodsOwnerId>
        <GetInventoryTypesSpecified>boolean</GetInventoryTypesSpecified>
        <GetInventoryTypes>OnlyCountType or OnlyAdjustmentType or All</GetInventoryTypes>
        <MaxInventoryTasksToGet>int</MaxInventoryTasksToGet>
      </Query>
    </GetInventoryTasksByQuery>
  </soap:Body>
</soap:Envelope>
+

Request specification

GetInventoryTasksByQuery
UserName str(50) Req. Your username.
Password str(50) Req. Your password.
Query object Req. Specifies the query/search criteria
Query
OnlyLiveGoodsOwners bool If true, then the API will only return inventory tasks which are active.
ArticleDefId int Only return tasks which contain this article.
LocationId int Only return tasks which contain this location.
InventoryIdFrom int Only return tasks whose ID is greater than or equal to this.
CreatedTimeFrom dateTime Only return tasks which were created after this time.
OnlyLiveGoodsOwners bool If true, then the API will only return inventory tasks which belong to goods owners which have been marked as "live".
GoodsOwnerId int Only get inventory tasks for this goods owner
GetInventoryTypes enum OnlyCountType or OnlyAdjustmentType or All.
MaxInventoryTasksToGet obj Max number of inventory tasks to return in response

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>
    <GetInventoryTasksByQueryResponse xmlns="http://ongoingsystems.se/Automation">
      <GetInventoryTasksByQueryResult>
        <Success>boolean</Success>
        <InventoryTasks>
          <InventoryTaskInfo>
            <GoodsOwner xsi:nil="true" />
            <InventoryId>int</InventoryId>
            <Comment>string</Comment>
            <InventoryCountNumber>int</InventoryCountNumber>
            <IsActive>boolean</IsActive>
            <Created>dateTime</Created>
            <CreatedBy>int</CreatedBy>
            <IsCountInventory>boolean</IsCountInventory>
            <InventoryNumber>string</InventoryNumber>
          </InventoryTaskInfo>
          <InventoryTaskInfo>
            <GoodsOwner xsi:nil="true" />
            <InventoryId>int</InventoryId>
            <Comment>string</Comment>
            <InventoryCountNumber>int</InventoryCountNumber>
            <IsActive>boolean</IsActive>
            <Created>dateTime</Created>
            <CreatedBy>int</CreatedBy>
            <IsCountInventory>boolean</IsCountInventory>
            <InventoryNumber>string</InventoryNumber>
          </InventoryTaskInfo>
        </InventoryTasks>
        <Error>
          <ErrorType>Unknown or LogonError</ErrorType>
          <Message>string</Message>
        </Error>
      </GetInventoryTasksByQueryResult>
    </GetInventoryTasksByQueryResponse>
  </soap:Body>
</soap:Envelope>
+

Response specification

InventoryTaskInfo
GoodsOwner object Which goods owner the inventory task belongs to
InventoryId int Inventory id
Comment str Comment
InventoryCountNumber int Which count the task is currently on. I.e. when the task starts, it begins with count 1. If there are any discrepancies which the warehouse wants to count again, they can start a new count, resulting in count 2, and so on.
IsActive bool Whether or not the inventory task is active.
Created dateTime The time when the inventory task was created
CreatedBy int The user id of the user who created the task
IsCountInventory bool Whether or not it is a count inventory
InventoryNumber str(50) Custom identifier for this task