SetInventoryChangesToReported

When the warehouse performs an inventory adjustment (that is, when they correct a mistake in the stock balance), the resulting transaction has a boolean called Reported.

When using GetInventoryChanges, you can query for only those inventory adjustments where Reported = False. When you have processed the inventory transactions in your own system, you can use this function (SetInventoryChangesToReported) to update the transactions so that Reported = True. This means that the transactions will not be returned in your next call to GetInventoryChanges.

When calling this function, you must specify an InventoryId (representing the transaction) and an ArticleSystemId (representing an article). You will find these values in the response of GetInventoryChanges. It is possible for an inventory transaction to involve more than one article, so you may have to call SetInventoryChangesToReported multiple times for the same InventoryId, specifying a different ArticleSystemId each call.

Tags: GetInventoryChanges, Operation, SetInventoryChangesToReportedResult, SetInventoryChangesToReportedResultError, UpdatedInventoryArticleItem

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

<?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>
    <SetInventoryChangesToReported xmlns="http://ongoingsystems.se/WSI">
      <GoodsOwnerCode>string</GoodsOwnerCode>
      <UserName>string</UserName>
      <Password>string</Password>
      <Operation>
        <ArticleSystemId>int</ArticleSystemId>
        <InventoryId>int</InventoryId>
      </Operation>
    </SetInventoryChangesToReported>
  </soap:Body>
</soap:Envelope>
+

Request specification

SetInventoryChangesToReported
GoodsOwnerCode str(400) Req. The code of the client
UserName str(50) Req. Your username
Password str(50) Req. Your password
Operation object Req. Defines which article and inventory to update the Reported flag for
Operation
ArticleSystemId int Req. The article system id.
InventoryId int Req. The inventory id.

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>
    <SetInventoryChangesToReportedResponse xmlns="http://ongoingsystems.se/WSI">
      <SetInventoryChangesToReportedResult>
        <Errors>
          <SetInventoryChangesToReportedResultError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError or InventoryNotFound or ArticleNotFound</ErrorType>
          </SetInventoryChangesToReportedResultError>
          <SetInventoryChangesToReportedResultError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError or InventoryNotFound or ArticleNotFound</ErrorType>
          </SetInventoryChangesToReportedResultError>
        </Errors>
        <UpdatedInventoryArticleItems>
          <UpdatedInventoryArticleItem>
            <InventoryArticleItemId>int</InventoryArticleItemId>
            <ArticleItemId>int</ArticleItemId>
          </UpdatedInventoryArticleItem>
          <UpdatedInventoryArticleItem>
            <InventoryArticleItemId>int</InventoryArticleItemId>
            <ArticleItemId>int</ArticleItemId>
          </UpdatedInventoryArticleItem>
        </UpdatedInventoryArticleItems>
        <Success>boolean</Success>
      </SetInventoryChangesToReportedResult>
    </SetInventoryChangesToReportedResponse>
  </soap:Body>
</soap:Envelope>
+

Response specification

SetInventoryChangesToReportedResult
Errors object A list of SetInventoryChangesToReportedResultError objects
Success bool True if successful, false otherwise.
Message string A message.
UpdatedInventoryArticleItems object An list of objects of type UpdatedInventoryArticleItem, telling you which article items were updated.
SetInventoryChangesToReportedResultError
Message str(*) Message explaining the error.
ErrorType string The type of error:
- UnknownError
- LogonError
- InventoryNotFound
- ArticleNotFound
UpdatedInventoryArticleItem
InventoryArticleItemId int The inventory article item id which was updated.
ArticleItemId int The article item id which was updated.