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, SetLocationOriginalArticleItemIdsOperation, InventoryAdjustmentCauseClass_OriginalArticleItemId, LocationOriginalArticleItemId, SetLocationOriginalArticleItemIdsHandling, SetLocationOriginalArticleItemIdsResponse, 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 string(50) Req. Your username
Password string(50) Req. Your password
Operation SetLocationOriginalArticleItemIdsOperation Req. The operation object
SetLocationOriginalArticleItemIdsOperation
Location string(50) Req. The location where you want to set the article quantities.
InventoryNumber string(50) A reference number for the inventory transactions which may be made to fulfil the API call.
InventoryAdjustmentCause InventoryAdjustmentCauseClass_OriginalArticleItemId If you want the inventory transactions to have a specific adjustment cause, send it in this field.
OriginalArticleItemIds LocationOriginalArticleItemId[] Req. A list of LocationOriginalArticleItemIds. Each object contains information about the article, the original article item ID, and the quantity.
Handling SetLocationOriginalArticleItemIdsHandling An object of type SetLocationOriginalArticleItemIdsHandling. Allows you to customize how you want to Ongoing WMS to handle your request.
GoodsOwnerId int Goods owner id.
DryRun boolean 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.
InventoryAdjustmentCauseClass_OriginalArticleItemId
Code string
LocationOriginalArticleItemId
ArticleDefId int Req. Ongoing WMS internal id for the article.
OriginalArticleItemId int Original article item ID.
NumberOfItems decimal Number of items.
SetLocationOriginalArticleItemIdsHandling
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: true
RemoveByInventoryOriginalArticleItemIdsNotSpecified boolean If the location contains a batch number which was NOT sent OriginalArticleItemIds, should Ongoing WMS remove it from the location? Default: true.
AllowIncreaseNumberOfItems boolean Is Ongoing WMS allowed to increase the number of items in stock? Default: true

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>
    <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

SetLocationOriginalArticleItemIdsResponse
SetLocationOriginalArticleItemIdsResult SetLocationOriginalArticleItemIdsResult
SetLocationOriginalArticleItemIdsResult
Errors SetLocationLocationOriginalArticleItemIdsError[] A list of SetLocationLocationOriginalArticleItemIdsError objects
Success boolean True if successful, false otherwise.
DryRun boolean True if this was only a dry run, false otherwise.
Differences LocationOriginalArticleItemIdDifference[] 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 string Message explaining the error.
ErrorType enum 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.
OriginalNumberOfItems int
OriginalArticleItemId int Original article item id.