GetInventoryChanges
This function returns any stock-taking transactions which have been performed in the warehouse. The transactions are grouped by article.
Note that the function (despite its name) does not return all transactions for an article. It only returns the stock-taking transactions.
Tags: GetInventoryChanges, query, GetInventoryChangesResponse, InventoryChangeLine, InventoryTransaction
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/GetInventoryChanges"
<?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>
<GetInventoryChanges xmlns="http://ongoingsystems.se/WSI">
<GoodsOwnerCode>string</GoodsOwnerCode>
<UserName>string</UserName>
<Password>string</Password>
<query>
<FromDate>dateTime</FromDate>
<ToDate>dateTime</ToDate>
<InventoryId>int</InventoryId>
<UnReported>boolean</UnReported>
</query>
</GetInventoryChanges>
</soap:Body>
</soap:Envelope>
+
Request specification
GetInventoryChanges |
GoodsOwnerId |
int |
Req. |
The id of the client |
UserName |
str(50) |
Req. |
Your username |
Password |
str(50) |
Req. |
Your password |
query |
object |
Req. |
Defines the query, what to filter for |
query |
FromDate |
datetime |
|
Inventory date must be bigger than this. |
ToDate |
datetime |
|
Inventory date must be less than this. |
InventoryId |
int |
|
The unique ID of the inventory transaction. |
UnReported |
bool |
|
If True, only shows those inventory transactions which have not yet been marked as "reported". |
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>
<GetInventoryChangesResponse xmlns="http://ongoingsystems.se/WSI">
<GetInventoryChangesResult>
<GoodsOwnerId>int</GoodsOwnerId>
<InventoryChangeLines>
<InventoryChangeLine>
<Article xsi:nil="true" />
<InventoryChangesNumberOfItems>decimal</InventoryChangesNumberOfItems>
<InventoryTransactions>
<InventoryTransaction>
<InventoryChangesNumberOfItems>decimal</InventoryChangesNumberOfItems>
<InventoryTime>dateTime</InventoryTime>
<InventoryId>int</InventoryId>
<Comment>string</Comment>
<InventoryItemComment>string</InventoryItemComment>
<Location>string</Location>
<LocationIsLocked>boolean</LocationIsLocked>
<InventoryAdjustmentCauseCode>string</InventoryAdjustmentCauseCode>
<InventoryAdjustmentCauseName>string</InventoryAdjustmentCauseName>
<Batch>string</Batch>
<ArticleItemStatusCode>string</ArticleItemStatusCode>
<ArticleItemStatusName>string</ArticleItemStatusName>
<Serial>string</Serial>
<ExpiryDate>dateTime</ExpiryDate>
</InventoryTransaction>
<InventoryTransaction>
<InventoryChangesNumberOfItems>decimal</InventoryChangesNumberOfItems>
<InventoryTime>dateTime</InventoryTime>
<InventoryId>int</InventoryId>
<Comment>string</Comment>
<InventoryItemComment>string</InventoryItemComment>
<Location>string</Location>
<LocationIsLocked>boolean</LocationIsLocked>
<InventoryAdjustmentCauseCode>string</InventoryAdjustmentCauseCode>
<InventoryAdjustmentCauseName>string</InventoryAdjustmentCauseName>
<Batch>string</Batch>
<ArticleItemStatusCode>string</ArticleItemStatusCode>
<ArticleItemStatusName>string</ArticleItemStatusName>
<Serial>string</Serial>
<ExpiryDate>dateTime</ExpiryDate>
</InventoryTransaction>
</InventoryTransactions>
</InventoryChangeLine>
<InventoryChangeLine>
<Article xsi:nil="true" />
<InventoryChangesNumberOfItems>decimal</InventoryChangesNumberOfItems>
<InventoryTransactions>
<InventoryTransaction>
<InventoryChangesNumberOfItems>decimal</InventoryChangesNumberOfItems>
<InventoryTime>dateTime</InventoryTime>
<InventoryId>int</InventoryId>
<Comment>string</Comment>
<InventoryItemComment>string</InventoryItemComment>
<Location>string</Location>
<LocationIsLocked>boolean</LocationIsLocked>
<InventoryAdjustmentCauseCode>string</InventoryAdjustmentCauseCode>
<InventoryAdjustmentCauseName>string</InventoryAdjustmentCauseName>
<Batch>string</Batch>
<ArticleItemStatusCode>string</ArticleItemStatusCode>
<ArticleItemStatusName>string</ArticleItemStatusName>
<Serial>string</Serial>
<ExpiryDate>dateTime</ExpiryDate>
</InventoryTransaction>
<InventoryTransaction>
<InventoryChangesNumberOfItems>decimal</InventoryChangesNumberOfItems>
<InventoryTime>dateTime</InventoryTime>
<InventoryId>int</InventoryId>
<Comment>string</Comment>
<InventoryItemComment>string</InventoryItemComment>
<Location>string</Location>
<LocationIsLocked>boolean</LocationIsLocked>
<InventoryAdjustmentCauseCode>string</InventoryAdjustmentCauseCode>
<InventoryAdjustmentCauseName>string</InventoryAdjustmentCauseName>
<Batch>string</Batch>
<ArticleItemStatusCode>string</ArticleItemStatusCode>
<ArticleItemStatusName>string</ArticleItemStatusName>
<Serial>string</Serial>
<ExpiryDate>dateTime</ExpiryDate>
</InventoryTransaction>
</InventoryTransactions>
</InventoryChangeLine>
</InventoryChangeLines>
</GetInventoryChangesResult>
</GetInventoryChangesResponse>
</soap:Body>
</soap:Envelope>
+
Response specification
GetInventoryChangesResponse |
GoodsOwnerId |
int |
System id of the goods owner |
InventoryChangeLines |
object |
Containing elements of InventoryChangeLine |
InventoryChangeLine |
Article |
object |
Basic article data. See here for a specification. |
InventoryChangesNumberOfItems |
decimal |
Sum of all InventoryChangesNumberOfItems in the InventoryTransactions tags |
InventoryTransactions |
object |
Containing elements of InventoryTransaction |
InventoryTransaction |
InventoryChangesNumberOfItems |
dec |
The number of items changed in stock balance due to this inventory transaction. |
InventoryTime |
datetime |
The time when the inventory transaction was performed. |
InventoryId |
int |
The unique ID of this inventory transaction. |
Comment |
str(400) |
Comment on article item. |
InventoryItemComment |
str(100) |
The comment for this inventory transation. |
Location |
str(50) |
The location where the inventory transaction was perofmed. |
LocationIsLocked |
bool |
Whether or not the location is currently locked. |
InventoryAdjustmentCauseCode |
str(50) |
The inventory adjustment cause code. |
InventoryAdjustmentCauseName |
str(50) |
The inventory adjustment cause name. |
Batch |
str(50) |
Batch number of the inventoried item. |
ArticleItemStatusCode |
str(50) |
The status code of the article item. |
ArticleItemStatusName |
str(100) |
The status name of the article item. |
Serial |
str(128) |
Serial number of the inventoried item. |
ExpiryDate |
datetime |
The expiry date of the inventoried item. |