SetLocationOriginalArticleItemIds

This function allows you to set the stock balance at a single location for several articles, at the same time. It is similar to SetLocationBatches, but this function uses the OriginalArticleItemId to figure out which item to perform the inventory on.

If you specify DryRun = true, then Ongoing WMS will not actually perform any inventory transactions. We will simply return the stock balance differences.

By default, any article which is not included in your list, will be set to quantity 0. If don't want this to happen, specify RemoveByInventoryOriginalArticleItemIdsNotSpecified = false.

Tags: SetLocationOriginalArticleItemIds, Operation, LocationOriginalArticleItemId, Handling, SetLocationOriginalArticleItemIdsResult, SetLocationLocationOriginalArticleItemIdsError, LocationOriginalArticleItemIdDifference

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

<?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>
    <SetLocationOriginalArticleItemIds xmlns="http://ongoingsystems.se/Automation">
      <UserName>string</UserName>
      <Password>string</Password>
      <Operation>
        <Location>string</Location>
        <InventoryNumber>string</InventoryNumber>
        <InventoryAdjustmentCause>
          <Code>string</Code>
        </InventoryAdjustmentCause>
        <OriginalArticleItemIds>
          <LocationOriginalArticleItemId>
            <ArticleDefId>int</ArticleDefId>
            <OriginalArticleItemId>int</OriginalArticleItemId>
            <NumberOfItems>decimal</NumberOfItems>
          </LocationOriginalArticleItemId>
          <LocationOriginalArticleItemId>
            <ArticleDefId>int</ArticleDefId>
            <OriginalArticleItemId>int</OriginalArticleItemId>
            <NumberOfItems>decimal</NumberOfItems>
          </LocationOriginalArticleItemId>
        </OriginalArticleItemIds>
        <Handling>
          <AllowDeAllocationOfOrders>boolean</AllowDeAllocationOfOrders>
          <RemoveByInventoryOriginalArticleItemIdsNotSpecified>boolean</RemoveByInventoryOriginalArticleItemIdsNotSpecified>
          <AllowIncreaseNumberOfItems>boolean</AllowIncreaseNumberOfItems>
        </Handling>
        <GoodsOwnerId>int</GoodsOwnerId>
        <DryRun>boolean</DryRun>
      </Operation>
    </SetLocationOriginalArticleItemIds>
  </soap:Body>
</soap:Envelope>

Request specification

SetLocationOriginalArticleItemIds
UserName str(50) Req. Your username
Password str(50) Req. Your password
Operation object Req. An element of type Operation.
Operation
Location str(50) Req. The location where you want to set the article quantities.
InventoryNumber str(50) A reference number for the inventory transactions which may be made to fulfil the API call.
InventoryAdjustmentCause object If you want the inventory transactions to have a specific adjustment cause, send it in this field.
OriginalArticleItemIds object[] Req. A list of LocationOriginalArticleItemIds. Each object contains information about the article, the original article item ID, and the quantity.
Handling object An object of type Handling. Allows you to customize how you want to Ongoing WMS to handle your request.
GoodsOwnerId int Goods owner id.
DryRun bool If true, then Ongoing WMS will perform a dry run, that is, Ongoing WMS will compute the necessary inventory transactions which need to be performed, and return them to you, but Ongoing WMS will not actually execute the inventory transactions.
LocationOriginalArticleItemId
ArticleDefId int Req. Ongoing WMS internal id for the article.
OriginalArticleItemId int Original article item ID.
NumberOfItems decimal Number of items.
Handling
AllowDeAllocationOfOrders bool 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: true
RemoveByInventoryOriginalArticleItemIdsNotSpecified bool If the location contains a batch number which was not sent in OriginalArticleItemIds, should Ongoing WMS remove it from the location? Default: true.
AllowIncreaseNumberOfItems bool Is Ongoing WMS allowed to increase the number of items in stock? Default: true

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>
    <SetLocationOriginalArticleItemIdsResponse xmlns="http://ongoingsystems.se/Automation">
      <SetLocationOriginalArticleItemIdsResult>
        <Errors>
          <SetLocationLocationOriginalArticleItemIdsError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError or LocationNotFound or InventoryNumberAlreadyExists or ArticleNotFound or ErrorSavingInventory or BelowZeroTransaction or ArticleIsDeleted or GoodsOwnerIsDeleted or OriginalArticleItemIdNumberOfItemsWouldBeIncreased or GoodsOwerIdNotFound or ArticleDefIdDoesNotMatchExistingOriginalArticleItems</ErrorType>
          </SetLocationLocationOriginalArticleItemIdsError>
          <SetLocationLocationOriginalArticleItemIdsError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError or LocationNotFound or InventoryNumberAlreadyExists or ArticleNotFound or ErrorSavingInventory or BelowZeroTransaction or ArticleIsDeleted or GoodsOwnerIsDeleted or OriginalArticleItemIdNumberOfItemsWouldBeIncreased or GoodsOwerIdNotFound or ArticleDefIdDoesNotMatchExistingOriginalArticleItems</ErrorType>
          </SetLocationLocationOriginalArticleItemIdsError>
        </Errors>
        <Success>boolean</Success>
        <DryRun>boolean</DryRun>
        <Differences>
          <LocationOriginalArticleItemIdDifference>
            <OngoingNumberOfItems>decimal</OngoingNumberOfItems>
            <ExternalNumberOfItems>decimal</ExternalNumberOfItems>
            <ArticleDefId>int</ArticleDefId>
            <GoodsOwnerId>int</GoodsOwnerId>
            <OriginalNumberOfItems>int</OriginalNumberOfItems>
            <OriginalArticleItemId>int</OriginalArticleItemId>
          </LocationOriginalArticleItemIdDifference>
          <LocationOriginalArticleItemIdDifference>
            <OngoingNumberOfItems>decimal</OngoingNumberOfItems>
            <ExternalNumberOfItems>decimal</ExternalNumberOfItems>
            <ArticleDefId>int</ArticleDefId>
            <GoodsOwnerId>int</GoodsOwnerId>
            <OriginalNumberOfItems>int</OriginalNumberOfItems>
            <OriginalArticleItemId>int</OriginalArticleItemId>
          </LocationOriginalArticleItemIdDifference>
        </Differences>
      </SetLocationOriginalArticleItemIdsResult>
    </SetLocationOriginalArticleItemIdsResponse>
  </soap:Body>
</soap:Envelope>

Response specification

SetLocationOriginalArticleItemIdsResult
Errors object A list of SetLocationLocationOriginalArticleItemIdsError objects
Success bool True if successful, false otherwise.
DryRun bool True if this was only a dry run, false otherwise.
Differences object[] A list of LocationOriginalArticleItemIdDifference objects, specifying what differences were found between Ongoing WMS and the list which was sent in the API call.
SetLocationLocationOriginalArticleItemIdsError
Message str(*) Message explaining the error.
ErrorType string The type of error:
- UnknownError
- LogonError
- LocationNotFound
- InventoryNumberAlreadyExists
- ArticleNotFound
- ErrorSavingInventory
- BelowZeroTransaction
- ArticleIsDeleted
- GoodsOwnerIsDeleted
- OriginalArticleItemIdNumberOfItemsWouldBeIncreased
- GoodsOwerIdNotFound
- ArticleDefIdDoesNotMatchExistingOriginalArticleItems
LocationOriginalArticleItemIdDifference
OngoingNumberOfItems decimal The number of items in Ongoing WMS.
ExternalNumberOfItems decimal The number of items which was specified in the API call.
ArticleDefId int Ongoing WMS internal id of the article.
GoodsOwnerId int Goods owner id.
OriginalArticleItemId int Original article item id.