AdjustLocationNumberOfItems
This function allows you to adjust the number of items in stock for an article on a certain location.
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/AdjustLocationNumberOfItems"
<?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>
<AdjustLocationNumberOfItems xmlns="http://ongoingsystems.se/Automation">
<UserName>string</UserName>
<Password>string</Password>
<Operation>
<InventoryNumber>string</InventoryNumber>
<ArticleDefId>int</ArticleDefId>
<Location>string</Location>
<TransactionNumberOfItems>decimal</TransactionNumberOfItems>
<Batch>string</Batch>
<ExpiryDate>datetime</ExpiryDate>
<InventoryAdjustmentCause>
<Code>string</Code>
</InventoryAdjustmentCause>
<Comment>string</Comment>
<OriginalArticleItemId>int</OriginalArticleItemId>
</Operation>
</AdjustLocationNumberOfItems>
</soap:Body>
</soap:Envelope>
Request specification
AdjustLocationNumberOfItems | |||
---|---|---|---|
UserName | str(50) | Req. | Your username |
Password | str(50) | Req. | Your password |
Operation | object | Req. | An element of type Operation. |
Operation | |||
---|---|---|---|
InventoryNumber | str(50) | Optional | Custom identifier for this adjustment. |
ArticleDefId | int | Req. | The article id of the article for which to adjust stock balance. |
Location | str(50) | Req. | The location to adjust stock balance on. |
TransactionNumberOfItems | decimal | Req. | How much to adjust the stock balance. A negative value will decrease the stock balance and a positive value will increase it. |
Batch | str(50) | Optional | Filter by batch. The adjustment will be made for this batch. |
ExpiryDate | datetime | Optional | Filter by expiry date. The adjustment will be made for this expiry date. |
InventoryAdjustmentCause | object | Adjustment cause. | |
Comment | str | Transaction comment. | |
OriginalArticleItemId | int | Filter by OriginalArticleItemId. |
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>
<AdjustLocationNumberOfItemsResponse xmlns="http://ongoingsystems.se/Automation">
<AdjustLocationNumberOfItemsResult>
<AdjustLocationNumberOfItemsErrors>
<AdjustLocationNumberOfItemsError>
<Message>string</Message>
<ErrorType>UnknownError or LogonError or LocationNotFound or InventoryNumberAlreadyExists or BelowZeroTransaction or ArticleNotFound or ErrorSavingInventory or ActiveCountInventoryExists or LockedGoods or TransactionRowAlreadyExists or GoodsOwnerIsDeleted</ErrorType>
</AdjustLocationNumberOfItemsError>
<AdjustLocationNumberOfItemsError>
<Message>string</Message>
<ErrorType>UnknownError or LogonError or LocationNotFound or InventoryNumberAlreadyExists or BelowZeroTransaction or ArticleNotFound or ErrorSavingInventory or ActiveCountInventoryExists or LockedGoods or TransactionRowAlreadyExists or GoodsOwnerIsDeleted</ErrorType>
</AdjustLocationNumberOfItemsError>
</AdjustLocationNumberOfItemsErrors>
<Success>boolean</Success>
</AdjustLocationNumberOfItemsResult>
</AdjustLocationNumberOfItemsResponse>
</soap:Body>
</soap:Envelope>
Response specification
AdjustLocationNumberOfItemsResult | ||
---|---|---|
AdjustLocationNumberOfItemsErrors | object | A list of AdjustLocationNumberOfItemsError objects |
Success | bool | True if successful, false otherwise. |
AdjustLocationNumberOfItemsError | ||
---|---|---|
Message | str(*) | Message explaining the error. |
ErrorType | string |
The type of error: - UnknownError - LogonError - LocationNotFound - InventoryNumberAlreadyExists - BelowZeroTransaction - ArticleNotFound - ErrorSavingInventory - ActiveCountInventoryExists - LockedGoods - TransactionRowAlreadyExists - GoodsOwnerIsDeleted - InventoryAdjustmentCauseNotFound |