SetLocationNumberOfItems

This function allows you set the number of items in stock on a certain location for an article.

Tags: SetLocationNumberOfItems, SetLocationNumberOfItemsOperation, SetLocationNumberOfItemsHandling, SetLocationNumberOfItemsResponse, SetLocationNumberOfItemsResult, SetLocationNumberOfItemsError

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

<?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>
    <SetLocationNumberOfItems xmlns="http://ongoingsystems.se/Automation">
      <UserName>string</UserName>
      <Password>string</Password>
      <Operation>
        <InventoryNumber>string</InventoryNumber>
        <AllowIncreasingNumberOfItems>boolean</AllowIncreasingNumberOfItems>
        <Location>string</Location>
        <LocationNumberOfItems>decimal</LocationNumberOfItems>
        <ArticleDefId>int</ArticleDefId>
        <Batch>string</Batch>
        <Handling>
          <AllowDeAllocationOfOrders>boolean</AllowDeAllocationOfOrders>
        </Handling>
      </Operation>
    </SetLocationNumberOfItems>
  </soap:Body>
</soap:Envelope>

Request specification

SetLocationNumberOfItems
UserName string(50) Req. Your username
Password string(50) Req. Your password
Operation SetLocationNumberOfItemsOperation Req. The operation object
SetLocationNumberOfItemsOperation
InventoryNumber string(50) Custom identifier for this adjustment.
AllowIncreasingNumberOfItems boolean Set to false to avoid increasing stock balance. The value will be true as default.
Location string(50) Req. The location to set stock balance on.
LocationNumberOfItems decimal Req. The value to set the stock balance of the specified article and location to.
ArticleDefId int Req. The article id of the article for which to adjust stock balance.
Batch string(50) Filter by batch. The stock balance will be set for this batch on the selected location.
Handling SetLocationNumberOfItemsHandling An object of type SetLocationNumberOfItemsHandling. Allows you to customize how you want to Ongoing WMS to handle your request.
SetLocationNumberOfItemsHandling
AllowDeAllocationOfOrders boolean If the location contains items which are allocated, is Ongoing WMS allowed to deallocate them? This may be necessary in order to fulfil the API call. Default: false

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>
    <SetLocationNumberOfItemsResponse xmlns="http://ongoingsystems.se/Automation">
      <SetLocationNumberOfItemsResult>
        <SetLocationNumberOfItemsErrors>
          <SetLocationNumberOfItemsError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError or LocationNotFound or InventoryNumberAlreadyExists or ArticleNotFound or ErrorSavingInventory or BelowZeroTransaction or ArticleIsDeleted or GoodsOwnerIsDeleted or LocationNumberOfItemsWouldBeIncreased or ErrorDeallocatingOrders</ErrorType>
          </SetLocationNumberOfItemsError>
          <SetLocationNumberOfItemsError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError or LocationNotFound or InventoryNumberAlreadyExists or ArticleNotFound or ErrorSavingInventory or BelowZeroTransaction or ArticleIsDeleted or GoodsOwnerIsDeleted or LocationNumberOfItemsWouldBeIncreased or ErrorDeallocatingOrders</ErrorType>
          </SetLocationNumberOfItemsError>
        </SetLocationNumberOfItemsErrors>
        <Success>boolean</Success>
      </SetLocationNumberOfItemsResult>
    </SetLocationNumberOfItemsResponse>
  </soap:Body>
</soap:Envelope>

Response specification

SetLocationNumberOfItemsResponse
SetLocationNumberOfItemsResult SetLocationNumberOfItemsResult
SetLocationNumberOfItemsResult
SetLocationNumberOfItemsErrors SetLocationNumberOfItemsError[] A list of SetLocationNumberOfItemsError objects
Success boolean True if successful, false otherwise.
SetLocationNumberOfItemsError
Message string Message explaining the error.
ErrorType enum The type of error:
- UnknownError
- LogonError
- LocationNotFound
- InventoryNumberAlreadyExists
- BelowZeroTransaction
- ArticleNotFound
- ErrorSavingInventory
- ArticleIsDeleted
- LocationNumberOfItemsWouldBeIncreased
- GoodsOwnerIsDeleted