GetOrderChanges

This function lets you retrieve changes which have been made to orders.

Tags: GetOrderChanges, AutomationGetOrderChangesQuery, GetOrderChangesQueryPaging, GetOrderChangesResponse, GetOrderChangesResult, ChangedOrder, Order_GetOrderChanges, OrderVersion, ChangeInfo, NewOrderVersion, PreviousOrderVersion

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

<?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>
    <GetOrderChanges xmlns="http://ongoingsystems.se/Automation">
      <UserName>string</UserName>
      <Password>string</Password>
      <Query>
        <GoodsOwnerId>int</GoodsOwnerId>
        <OnlyLiveGoodsOwners>boolean</OnlyLiveGoodsOwners>
        <GetChangesFrom>dateTime</GetChangesFrom>
        <GetChangesTo>dateTime</GetChangesTo>
        <Paging>
          <MaxOrdersToGet>int</MaxOrdersToGet>
          <OrderIdFrom>int</OrderIdFrom>
        </Paging>
        <OrderNumbers>
          <string>string</string>
          <string>string</string>
        </OrderNumbers>
        <OrderIds>
          <int>int</int>
          <int>int</int>
        </OrderIds>
        <OnlyGetChanges>
          <OrderChangeType>OrderCreated or OrderStatus</OrderChangeType>
          <OrderChangeType>OrderCreated or OrderStatus</OrderChangeType>
        </OnlyGetChanges>
      </Query>
    </GetOrderChanges>
  </soap:Body>
</soap:Envelope>

Request specification

GetOrderChanges
UserName string(50) Req. Your username
Password string(50) Req. Your password
Query AutomationGetOrderChangesQuery Req. The query object
AutomationGetOrderChangesQuery
GoodsOwnerId int Filter for orders which belong to a specific goods owner
OnlyLiveGoodsOwners boolean If this is set to true, only article items belonging to live goods owners will be returned
GetChangesFrom dateTime
GetChangesTo dateTime
Paging GetOrderChangesQueryPaging Paging.
OrderNumbers string[] Containing elements of string, defining order numbers to get
OrderIds int[] Containing elements of int, defining order IDs to get
OnlyGetChanges OrderChangeType[] Allows you to specify which type of change you want to see. You can specify several change types.
GetOrderChangesQueryPaging
MaxOrdersToGet int The maximum number of changes to get. Must be between 10 and 2000.
OrderIdFrom int Only get changes orders where orderId is equal or larger than this value.

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>
    <GetOrderChangesResponse xmlns="http://ongoingsystems.se/Automation">
      <GetOrderChangesResult>
        <Success>boolean</Success>
        <Message>string</Message>
        <Orders>
          <ChangedOrder>
            <Order>
              <OrderId>int</OrderId>
              <OrderNumber>string</OrderNumber>
              <GoodsOwnerId>int</GoodsOwnerId>
            </Order>
            <Versions>
              <OrderVersion>
                <ChangeInfo>
                  <OrderLogId>int</OrderLogId>
                  <ChangeTime>dateTime</ChangeTime>
                </ChangeInfo>
                <NewVersion>
                  <OrderStatusNumber>int</OrderStatusNumber>
                </NewVersion>
                <PreviousVersion>
                  <OrderStatusNumber>int</OrderStatusNumber>
                </PreviousVersion>
                <ChangeTypes>
                  <OrderChangeType>OrderCreated or OrderStatus</OrderChangeType>
                  <OrderChangeType>OrderCreated or OrderStatus</OrderChangeType>
                </ChangeTypes>
              </OrderVersion>
              <OrderVersion>
                <ChangeInfo>
                  <OrderLogId>int</OrderLogId>
                  <ChangeTime>dateTime</ChangeTime>
                </ChangeInfo>
                <NewVersion>
                  <OrderStatusNumber>int</OrderStatusNumber>
                </NewVersion>
                <PreviousVersion>
                  <OrderStatusNumber>int</OrderStatusNumber>
                </PreviousVersion>
                <ChangeTypes>
                  <OrderChangeType>OrderCreated or OrderStatus</OrderChangeType>
                  <OrderChangeType>OrderCreated or OrderStatus</OrderChangeType>
                </ChangeTypes>
              </OrderVersion>
            </Versions>
          </ChangedOrder>
          <ChangedOrder>
            <Order>
              <OrderId>int</OrderId>
              <OrderNumber>string</OrderNumber>
              <GoodsOwnerId>int</GoodsOwnerId>
            </Order>
            <Versions>
              <OrderVersion>
                <ChangeInfo>
                  <OrderLogId>int</OrderLogId>
                  <ChangeTime>dateTime</ChangeTime>
                </ChangeInfo>
                <NewVersion>
                  <OrderStatusNumber>int</OrderStatusNumber>
                </NewVersion>
                <PreviousVersion>
                  <OrderStatusNumber>int</OrderStatusNumber>
                </PreviousVersion>
                <ChangeTypes>
                  <OrderChangeType>OrderCreated or OrderStatus</OrderChangeType>
                  <OrderChangeType>OrderCreated or OrderStatus</OrderChangeType>
                </ChangeTypes>
              </OrderVersion>
              <OrderVersion>
                <ChangeInfo>
                  <OrderLogId>int</OrderLogId>
                  <ChangeTime>dateTime</ChangeTime>
                </ChangeInfo>
                <NewVersion>
                  <OrderStatusNumber>int</OrderStatusNumber>
                </NewVersion>
                <PreviousVersion>
                  <OrderStatusNumber>int</OrderStatusNumber>
                </PreviousVersion>
                <ChangeTypes>
                  <OrderChangeType>OrderCreated or OrderStatus</OrderChangeType>
                  <OrderChangeType>OrderCreated or OrderStatus</OrderChangeType>
                </ChangeTypes>
              </OrderVersion>
            </Versions>
          </ChangedOrder>
        </Orders>
      </GetOrderChangesResult>
    </GetOrderChangesResponse>
  </soap:Body>
</soap:Envelope>

Response specification

GetOrderChangesResponse
GetOrderChangesResult GetOrderChangesResult
GetOrderChangesResult
Success boolean True if success
Message string Process message
Orders ChangedOrder[] Objects of type OrderChange
ChangedOrder
Order Order_GetOrderChanges Object of type Order_GetOrderChanges, contains information about the order.
Versions OrderVersion[]
Order_GetOrderChanges
OrderId int The internal system id of the order.
OrderNumber string(50) The order number.
GoodsOwnerId int
OrderVersion
ChangeInfo ChangeInfo An element of type ChangeInfo.
NewVersion NewOrderVersion Object of type NewOrderVersion, representing the new version of the order.
PreviousVersion PreviousOrderVersion Object of type PreviousOrderVersion, representing the previous version of the order.
ChangeTypes OrderChangeType[]
ChangeInfo
OrderLogId int The LogId of this change.
ChangeTime dateTime Time when the change was made.
NewOrderVersion
OrderStatusNumber int Order status number.
PreviousOrderVersion
OrderStatusNumber int Order status number.