GetInventoryChangesByQuery

This function lets you retrieve inventory changes.

Tags: GetInventoryChangesByQuery, Query, GetInventoryChangesByQueryResult, InventoryChangeLine_GetInventoryChanges, GoodsOwner, Article, InventoryTransaction_GetInventoryChanges, InventoryAdjustmentCause, Warehouse, ByUser, ArticleItemStatus, Location, Inventory, Error

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

<?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>
    <GetInventoryChangesByQuery xmlns="http://ongoingsystems.se/Automation">
      <UserName>string</UserName>
      <Password>string</Password>
      <Query>
        <From>dateTime</From>
        <To>dateTime</To>
        <InventoryIdFrom>int</InventoryIdFrom>
        <OnlyUnReported>boolean</OnlyUnReported>
        <WarehouseId>int</WarehouseId>
        <OnlyLiveGoodsOwners>boolean</OnlyLiveGoodsOwners>
        <GoodsOwnerId>int</GoodsOwnerId>
        <ExportTimeFrom>dateTime</ExportTimeFrom>
        <ArticleDefIdFrom>int</ArticleDefIdFrom>
      </Query>
    </GetInventoryChangesByQuery>
  </soap:Body>
</soap:Envelope>

Request specification

GetInventoryChangesByQuery
UserName str(50) Req. Your username.
Password str(50) Req. Your password.
Query object Req. See Query.
Query
From datetime The from date. Information will be retrieved of inventory changes between the from date and to date. Filter inventory changes to changes that occur after this time.
To datetime Filter inventory changes to changes that occur before this time.
InventoryIdFrom int Filter inventory changes from this inventory id, i.e. see the changes made by a specific inventory.
OnlyUnReported boolean If only unreported inventory changes should be retrieved.
WarehouseId int The id of the warehouse to retrieve inventory changes from.
OnlyLiveGoodsOwners boolean If only inventory changes from live goods owners should be retrieved.
GoodsOwnerId int The id of the goods owner from which inventory changes should be retrieved.
ExportTimeFrom datetime Filter inventory changes to those whose ExportTime is the same as or later than this value.
ArticleDefIdFrom int Filter inventory changes to those whose ArticleDefId is the same as or larger than this value.
MaxArticlesToGet int Max number of inventory changes to retrieve with this query.

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>
    <GetInventoryChangesByQueryResponse xmlns="http://ongoingsystems.se/Automation">
      <GetInventoryChangesByQueryResult>
        <Success>boolean</Success>
        <InventoryChangeLines>
          <InventoryChangeLine_GetInventoryChanges>
            <GoodsOwner>
              <GoodsOwnerId>int</GoodsOwnerId>
            </GoodsOwner>
            <Article>
              <ArticleDefId>int</ArticleDefId>
              <ArticleNumber>string</ArticleNumber>
            </Article>
            <InventoryChangesNumberOfItems>decimal</InventoryChangesNumberOfItems>
            <InventoryTransactions>
              <InventoryTransaction_GetInventoryChanges>
                <InventoryChangesNumberOfItems>decimal</InventoryChangesNumberOfItems>
                <Comment>string</Comment>
                <Container>string</Container>
                <Batch>string</Batch>
                <Serial>string</Serial>
                <ExpiryDate>dateTime</ExpiryDate>
                <InventoryAdjustmentCause>
                  <Code>string</Code>
                  <Name>string</Name>
                </InventoryAdjustmentCause>
                <Warehouse>
                  <Id>int</Id>
                  <Name>string</Name>
                  <Code>string</Code>
                </Warehouse>
                <ByUser>
                  <UserId>int</UserId>
                  <UserName>string</UserName>
                </ByUser>
                <ArticleItemStatus>
                  <ArticleItemStatusCode>string</ArticleItemStatusCode>
                  <ArticleItemStatusName>string</ArticleItemStatusName>
                </ArticleItemStatus>
                <Location>
                  <Location>string</Location>
                  <LocationId>int</LocationId>
                  <IsLocked>boolean</IsLocked>
                </Location>
                <Inventory>
                  <InventoryId>int</InventoryId>
                  <ByInventoryCountTask>boolean</ByInventoryCountTask>
                  <InventoryTime>dateTime</InventoryTime>
                  <InventoryItemComment>string</InventoryItemComment>
                </Inventory>
              </InventoryTransaction_GetInventoryChanges>
            </InventoryTransactions>
          </InventoryChangeLine_GetInventoryChanges>
          <InventoryChangeLine_GetInventoryChanges>
            <GoodsOwner>
              <GoodsOwnerId>int</GoodsOwnerId>
            </GoodsOwner>
            <Article>
              <ArticleDefId>int</ArticleDefId>
              <ArticleNumber>string</ArticleNumber>
            </Article>
            <InventoryChangesNumberOfItems>decimal</InventoryChangesNumberOfItems>
            <InventoryTransactions>
              <InventoryTransaction_GetInventoryChanges>
                <InventoryChangesNumberOfItems>decimal</InventoryChangesNumberOfItems>
                <Comment>string</Comment>
                <Container>string</Container>
                <Batch>string</Batch>
                <Serial>string</Serial>
                <ExpiryDate>dateTime</ExpiryDate>
                <InventoryAdjustmentCause>
                  <Code>string</Code>
                  <Name>string</Name>
                </InventoryAdjustmentCause>
                <Warehouse>
                  <Id>int</Id>
                  <Name>string</Name>
                  <Code>string</Code>
                </Warehouse>
                <ByUser>
                  <UserId>int</UserId>
                  <UserName>string</UserName>
                </ByUser>
                <ArticleItemStatus>
                  <ArticleItemStatusCode>string</ArticleItemStatusCode>
                  <ArticleItemStatusName>string</ArticleItemStatusName>
                </ArticleItemStatus>
                <Location>
                  <Location>string</Location>
                  <LocationId>int</LocationId>
                  <IsLocked>boolean</IsLocked>
                </Location>
                <Inventory>
                  <InventoryId>int</InventoryId>
                  <ByInventoryCountTask>boolean</ByInventoryCountTask>
                  <InventoryTime>dateTime</InventoryTime>
                  <InventoryItemComment>string</InventoryItemComment>
                </Inventory>
              </InventoryTransaction_GetInventoryChanges>
            </InventoryTransactions>
          </InventoryChangeLine_GetInventoryChanges>
        </InventoryChangeLines>
        <Error>
          <ErrorType>Unknown or LogonError</ErrorType>
          <Message>string</Message>
        </Error>
      </GetInventoryChangesByQueryResult>
    </GetInventoryChangesByQueryResponse>
  </soap:Body>
</soap:Envelope>

Response specification

GetInventoryChangesByQueryResult
Success boolean If the operation was successful. If not, check Error for more details on what went wrong.
InventoryChangeLines object List of inventory changes.
Error object Error details, see Error.
InventoryChangeLine_GetInventoryChanges
GoodsOwner object See GoodsOwner.
Article object See Article.
InventoryChangesNumberOfItems decimal The number of inventory changes retrieved.
InventoryTransactions object[] See InventoryTransaction_GetInventoryChanges.
GoodsOwner
GoodsOwnerId int The id of the goods owner.
Article
ArticleDefId int The id of the article.
ArticleNumber str(100) The article number.
InventoryTransaction_GetInventoryChanges
InventoryChangesNumberOfItems decimal The amount adjusted in terms of number of items.
Comment str(400) A comment belonging to the change made.
Container str(50) Container for the changed item.
Batch str(50) Batch of the changed item.
Serial str(128) Serial of the changed item.
ExpiryDate datetime The expiry date and time of the changed items.
InventoryAdjustmentCause object See InventoryAdjustmentCause.
Warehouse object See Warehouse.
ByUser object See ByUser.
ArticleItemStatus object See ArticleItemStatus.
Location object See Location.
Inventory object See Inventory.
InventoryAdjustmentCause
Code str(50) Adjustment cause code.
Name str(50) Adjustment cause name.
Warehouse
Id int The id of the warehouse where the transaction took place.
Name str(200) The name of the warehouse.
Code str(50) The warehouse code.
ByUser
UserId int The id of the user who made the transaction.
UserName str(50) The name of the user who made the transaction.
ArticleItemStatus
ArticleItemStatusCode str(50) The status code of the article items.
ArticleItemStatusName str(100) The status name of the article items.
Location
Location str(50) The name of the location.
LocationId int The location's id.
IsLocked boolean Wheter or not the location is locked.
Inventory
InventoryId int The id of the inventory.
ByInventoryCountTask boolean True if the inventory change was made by an inventory task.
InventoryTime datetime The time when the inventory was started.
InventoryItemComment str(400) A comment belonging to the inventory item.
Error
ErrorType enum LogonError: Failed to log in.
Unknown: Something else went wrong, see message.
Message str(400) A message describing the error.