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, GetInventoryTasksQuery, GetInventoryTasksByQueryResponse, GetInventoryTasksResult, InventoryTaskInfo, GetInventoryTasksErrorResult, GoodsOwner_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 string(50) Req. Your username
Password string(50) Req. Your password
Query GetInventoryTasksQuery Req. The query object
GetInventoryTasksQuery
OnlyActiveTasks boolean 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 boolean 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
GetInventoryTypesSpecified boolean
GetInventoryTypes enum "OnlyCountType" or "OnlyAdjustmentType" or "All".
MaxInventoryTasksToGet int Max number of inventory tasks to return in response

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>
    <GetInventoryTasksByQueryResponse xmlns="http://ongoingsystems.se/Automation">
      <GetInventoryTasksByQueryResult>
        <Success>boolean</Success>
        <InventoryTasks>
          <InventoryTaskInfo>
            <GoodsOwner>
              <GoodsOwnerId>int</GoodsOwnerId>
              <GoodsOwnerName>string</GoodsOwnerName>
              <IsLiveGoodsOwner>boolean</IsLiveGoodsOwner>
            </GoodsOwner>
            <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>
              <GoodsOwnerId>int</GoodsOwnerId>
              <GoodsOwnerName>string</GoodsOwnerName>
              <IsLiveGoodsOwner>boolean</IsLiveGoodsOwner>
            </GoodsOwner>
            <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

GetInventoryTasksByQueryResponse
GetInventoryTasksByQueryResult GetInventoryTasksResult
GetInventoryTasksResult
Success boolean
InventoryTasks InventoryTaskInfo[]
Error GetInventoryTasksErrorResult An element of type GetInventoryTasksErrorResult.
InventoryTaskInfo
GoodsOwner GoodsOwner_InventoryTaskInfo An element of type GoodsOwner_InventoryTaskInfo.
InventoryId int Inventory id
Comment string 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 boolean 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 boolean Whether or not it is a count inventory
InventoryNumber string Custom identifier for this task
GetInventoryTasksErrorResult
ErrorType enum An element of type GetInventoryTasksErrorType.
Message string
GoodsOwner_InventoryTaskInfo
GoodsOwnerId int
GoodsOwnerName string
IsLiveGoodsOwner boolean