UpdateOrder

There are two ways of updating an order after it has been created:

  1. You can either send in a new ProcessOrder request with the same order number, or
  2. You can use this function, UpdateOrder.

Generally speaking, you should use ProcessOrder. The main issue is that ProcessOrder can only update an order if the warehouse has not begun to pick it. So if you have a use-case where you know that you will need to update an order regardless of its picking status, then you should consider using UpdateOrder.

Tags: UpdateOrder, UpdateOrder, OrderUpdateIdentification, UpdateOrderStatus, UpdateOrderDeliveryDate, UpdateOrderGoodsOwnerOrderNumber, UpdateOrderWaybill, UpdateOrderTransporterOrderNumber, UpdateOrderPrintedTime, UpdateOrderPickFinishedTime, UpdateOrderShippedTime, UpdateOrderFreeDateTime1, UpdateOrderFreeDateTime2, UpdateOrderFreeText1, UpdateOrderFreeText2, UpdateOrderFreeText3, UpdatePickingPriority, UpdateOrderWarehouseInstruction, UpdateOrderReturnWaybill, UpdateOrderServicePointCode, UpdateOrderWayOfDeliveryType, UpdateOrderTransporter, UpdateOrderClasses, UpdateOrderDeliveryInstruction, UpdateOrderSalesCode, UpdateOrderCustomerAndNotification, TransporterContractClass, OrderClasses, Customer, OrderNotification, OrderClass, Coordinates, InvoiceAddress, CustomerGroup, UpdateOrderResponse, UpdateOrderResult

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

<?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>
    <UpdateOrder xmlns="http://ongoingsystems.se/WSI">
      <GoodsOwnerCode>string</GoodsOwnerCode>
      <UserName>string</UserName>
      <Password>string</Password>
      <updateOrder>
        <OrderUpdateIdentification>
          <OrderIdentificationType>GoodsOwnerOrderNumber or GoodsOwnerOrderId or SystemId</OrderIdentificationType>
          <GoodsOwnerOrderNumber>string</GoodsOwnerOrderNumber>
          <GoodsOwnerOrderId>string</GoodsOwnerOrderId>
          <OrderId>int</OrderId>
        </OrderUpdateIdentification>
        <UpdateOrderStatus>
          <OrderStatus>int</OrderStatus>
        </UpdateOrderStatus>
        <UpdateOrderDeliveryDate>
          <DeliveryDate>dateTime</DeliveryDate>
        </UpdateOrderDeliveryDate>
        <UpdateOrderGoodsOwnerOrderNumber>
          <GoodsOwnerOrderNumber>string</GoodsOwnerOrderNumber>
        </UpdateOrderGoodsOwnerOrderNumber>
        <UpdateOrderWaybill>
          <Waybill>string</Waybill>
        </UpdateOrderWaybill>
        <UpdateOrderTransporterOrderNumber>
          <TransporterOrderNumber>string</TransporterOrderNumber>
        </UpdateOrderTransporterOrderNumber>
        <UpdateOrderPrintedTime>
          <PrintedTime>dateTime</PrintedTime>
        </UpdateOrderPrintedTime>
        <UpdateOrderPickFinishedTime>
          <PickFinishedTime>dateTime</PickFinishedTime>
        </UpdateOrderPickFinishedTime>
        <UpdateOrderShippedTime>
          <ShippedTime>dateTime</ShippedTime>
        </UpdateOrderShippedTime>
        <UpdateOrderFreeDateTime1>
          <OrderFreeDateTime1>dateTime</OrderFreeDateTime1>
        </UpdateOrderFreeDateTime1>
        <UpdateOrderFreeDateTime2>
          <OrderFreeDateTime2>dateTime</OrderFreeDateTime2>
        </UpdateOrderFreeDateTime2>
        <UpdateOrderFreeText1>
          <OrderFreeText1>string</OrderFreeText1>
        </UpdateOrderFreeText1>
        <UpdateOrderFreeText2>
          <OrderFreeText2>string</OrderFreeText2>
        </UpdateOrderFreeText2>
        <UpdateOrderFreeText3>
          <OrderFreeText3>string</OrderFreeText3>
        </UpdateOrderFreeText3>
        <UpdatePickingPriority>
          <PickingPriority>int</PickingPriority>
        </UpdatePickingPriority>
        <UpdateOrderWarehouseInstruction>
          <WarehouseInstruction>string</WarehouseInstruction>
        </UpdateOrderWarehouseInstruction>
        <UpdateOrderReturnWaybill>
          <ReturnWaybill>string</ReturnWaybill>
        </UpdateOrderReturnWaybill>
        <UpdateOrderServicePointCode>
          <ServicePointCode>string</ServicePointCode>
        </UpdateOrderServicePointCode>
        <UpdateOrderWayOfDeliveryType>
          <Operation>Find or FindOrCreate</Operation>
          <Identification>WayOfDeliveryTypeCode</Identification>
          <WayOfDeliveryTypeCode>string</WayOfDeliveryTypeCode>
          <WayOfDeliveryTypeName>string</WayOfDeliveryTypeName>
        </UpdateOrderWayOfDeliveryType>
        <UpdateOrderTransporterContract>
          <TransporterContract>
            <TransporterContractIdentification>CodeAndServiceCodeAndCustomerNumber or CodeAndServiceCode or Code or ServiceCode</TransporterContractIdentification>
            <TransporterContractOperation>Find or CreateOrUpdate</TransporterContractOperation>
            <TransportPayment>Collect or Prepaid or ThirdParty or UnKnown</TransportPayment>
            <TransporterCode>string</TransporterCode>
            <TransporterServiceCode>string</TransporterServiceCode>
            <CustomerNumber>string</CustomerNumber>
            <ConsigneePalletCustomerNumber>string</ConsigneePalletCustomerNumber>
          </TransporterContract>
        </UpdateOrderTransporterContract>
        <UpdateOrderSetOrderClasses>
          <OrderClasses>
            <Operation>FindOrCreate or Find</Operation>
            <Identification>Code</Identification>
            <Classes>
              <Class>
                <Name>string</Name>
                <Code>string</Code>
                <Comment>string</Comment>
              </Class>
              <Class>
                <Name>string</Name>
                <Code>string</Code>
                <Comment>string</Comment>
              </Class>
            </Classes>
          </OrderClasses>
        </UpdateOrderSetOrderClasses>
        <UpdateOrderAddOrderClasses>
          <OrderClasses>
            <Operation>FindOrCreate or Find</Operation>
            <Identification>Code</Identification>
            <Classes>
              <Class>
                <Name>string</Name>
                <Code>string</Code>
                <Comment>string</Comment>
              </Class>
              <Class>
                <Name>string</Name>
                <Code>string</Code>
                <Comment>string</Comment>
              </Class>
            </Classes>
          </OrderClasses>
        </UpdateOrderAddOrderClasses>
        <UpdateOrderDeliveryInstruction>
          <OrderDeliveryInstruction>string</OrderDeliveryInstruction>
        </UpdateOrderDeliveryInstruction>
        <UpdateOrderSalesCode>
          <OrderSalesCode>string</OrderSalesCode>
        </UpdateOrderSalesCode>
        <UpdateOrderCustomerAndNotification>
          <Customer>
            <CustomerOperation>Create or CreateOrUpdate or CreateNotUpdate or Find</CustomerOperation>
            <CustomerIdentification>ExternalCustomerCode or SystemId or CustomerNumber or FullNameAndAddress</CustomerIdentification>
            <ExternalCustomerCode>string</ExternalCustomerCode>
            <CustomerNumber>string</CustomerNumber>
            <CustomerId>int</CustomerId>
            <DeliveryAddressId>int</DeliveryAddressId>
            <InvoiceAddressId>int</InvoiceAddressId>
            <Coordinates>
              <Longitude>decimal</Longitude>
              <Latitude>decimal</Latitude>
            </Coordinates>
            <Name>string</Name>
            <Address>string</Address>
            <Address2>string</Address2>
            <Address3>string</Address3>
            <PostCode>string</PostCode>
            <City>string</City>
            <TelePhone>string</TelePhone>
            <Remark>string</Remark>
            <Email>string</Email>
            <MobilePhone>string</MobilePhone>
            <CountryCode>string</CountryCode>
            <CountryStateCode>string</CountryStateCode>
            <DeliveryInstruction>string</DeliveryInstruction>
            <IsVisible>boolean</IsVisible>
            <NotifyBySMS>boolean</NotifyBySMS>
            <NotifyByEmail>boolean</NotifyByEmail>
            <NotifyByTelephone>boolean</NotifyByTelephone>
            <InvoiceAddress>
              <Coordinates>
                <Longitude>decimal</Longitude>
                <Latitude>decimal</Latitude>
              </Coordinates>
              <Name>string</Name>
              <Address>string</Address>
              <Address2>string</Address2>
              <Address3>string</Address3>
              <PostCode>string</PostCode>
              <City>string</City>
              <TelePhone>string</TelePhone>
              <Remark>string</Remark>
              <Email>string</Email>
              <MobilePhone>string</MobilePhone>
              <CountryStateCode>string</CountryStateCode>
              <CountryCode>string</CountryCode>
              <DeliveryInstruction>string</DeliveryInstruction>
              <IsVisible>boolean</IsVisible>
              <NotifyBySMS>boolean</NotifyBySMS>
              <NotifyByEmail>boolean</NotifyByEmail>
              <NotifyByTelephone>boolean</NotifyByTelephone>
            </InvoiceAddress>
            <CustomerGroup>
              <CustomerGroupOperation>Find</CustomerGroupOperation>
              <CustomerGroupIdentification>CustomerGroupCode or CustomerGroupName</CustomerGroupIdentification>
              <CustomerGroupCode>string</CustomerGroupCode>
              <CustomerGroupName>string</CustomerGroupName>
            </CustomerGroup>
            <OrganisationNumber>string</OrganisationNumber>
            <VATNumber>string</VATNumber>
            <DoorCode>string</DoorCode>
          </Customer>
          <OrderNotification>
            <Telephone>string</Telephone>
            <MobilePhone>string</MobilePhone>
            <Email>string</Email>
            <NotifyByEmail>boolean</NotifyByEmail>
            <NotifyBySms>boolean</NotifyBySms>
            <NotifyByTelephone>boolean</NotifyByTelephone>
          </OrderNotification>
        </UpdateOrderCustomerAndNotification>
      </updateOrder>
    </UpdateOrder>
  </soap:Body>
</soap:Envelope>

Request specification

UpdateOrder
GoodsOwnerCode string(400) Req. The name/code of your client
UserName string(50) Req. Your username
Password string(50) Req. Your password
updateOrder UpdateOrder Req. An element updateOrder.
UpdateOrder
OrderUpdateIdentification OrderUpdateIdentification Contains information about how to identify the order
UpdateOrderStatus UpdateOrderStatus The new status for the order
UpdateOrderDeliveryDate UpdateOrderDeliveryDate The new delivery date for the order
UpdateOrderGoodsOwnerOrderNumber UpdateOrderGoodsOwnerOrderNumber The new order number for the order
UpdateOrderWaybill UpdateOrderWaybill The new waybill for the order
UpdateOrderTransporterOrderNumber UpdateOrderTransporterOrderNumber The new transporter order number for the order
UpdateOrderPrintedTime UpdateOrderPrintedTime The new time for when the order was printed
UpdateOrderPickFinishedTime UpdateOrderPickFinishedTime The new time for when the order was picked
UpdateOrderShippedTime UpdateOrderShippedTime The new time for when the order was shipped
UpdateOrderFreeDateTime1 UpdateOrderFreeDateTime1 The new time for when the orders FreeDateTime1
UpdateOrderFreeDateTime2 UpdateOrderFreeDateTime2 The new time for when the orders FreeDateTime2
UpdateOrderFreeText1 UpdateOrderFreeText1 The new string FreeText1 for the order
UpdateOrderFreeText2 UpdateOrderFreeText2 The new string FreeText2 for the order
UpdateOrderFreeText3 UpdateOrderFreeText3 The new string FreeText3 for the order
UpdatePickingPriority UpdatePickingPriority The new picking priority for the order
UpdateOrderWarehouseInstruction UpdateOrderWarehouseInstruction The new warehouse instruction for the order
UpdateOrderReturnWaybill UpdateOrderReturnWaybill The new return waybill for the order
UpdateOrderServicePointCode UpdateOrderServicePointCode The new service point code for the order
UpdateOrderWayOfDeliveryType UpdateOrderWayOfDeliveryType The new way of delivery for the order
UpdateOrderTransporterContract UpdateOrderTransporter The new transporter contract for the order.
UpdateOrderSetOrderClasses UpdateOrderClasses Set the order classes on the order. If a certain class is already on the order, and you _i_don'tbackslash_i include it when you make the API call, the order class will be deleted from the order.
UpdateOrderAddOrderClasses UpdateOrderClasses Add order classes to the order. If order already has some order classes, then they will be left alone.
UpdateOrderDeliveryInstruction UpdateOrderDeliveryInstruction The new string delivery instruction for the order
UpdateOrderSalesCode UpdateOrderSalesCode The new SalesCode for the order. Often visible on package label (depending on transporter)
UpdateOrderCustomerAndNotification UpdateOrderCustomerAndNotification The new customer and notifications for the order.
OrderUpdateIdentification
OrderIdentificationType enum Req. Determines how you want the system to identify the order. Must be one of these values:
- GoodsOwnerOrderNumber
- GoodsOwnerOrderId
- SystemId
GoodsOwnerOrderNumber string(50) External order id. Required if OrderIdentification = GoodsOwnerOrderNumber.
GoodsOwnerOrderId string(50) Order number. Required if OrderIdentification = GoodsOwnerOrderId.
OrderId int
UpdateOrderStatus
OrderStatus int The new order status of the order. Updates to statuses above 399 (picked or above) is not allowed if the order has allocated but not picked goods. This function shouldn't be used to cancel an order, use OrderOperation set to Remove in ProcessOrder instead.
UpdateOrderDeliveryDate
DeliveryDate dateTime The new delivery date of the order.
UpdateOrderGoodsOwnerOrderNumber
GoodsOwnerOrderNumber string(50) The new order number of the order.
UpdateOrderWaybill
Waybill string(50) The new waybill of the order.
UpdateOrderTransporterOrderNumber
TransporterOrderNumber string The new transporter order number of the order.
UpdateOrderPrintedTime
PrintedTime dateTime The new printed time stamp on the order.
UpdateOrderPickFinishedTime
PickFinishedTime dateTime The new pick finished time stamp on the order.
UpdateOrderShippedTime
ShippedTime dateTime The new shipped time stamp on the order.
UpdateOrderFreeDateTime1
OrderFreeDateTime1 dateTime The new OrderFreeDateTime1 stamp on the order.
UpdateOrderFreeDateTime2
OrderFreeDateTime2 dateTime The new OrderFreeDateTime2 stamp on the order.
UpdateOrderFreeText1
OrderFreeText1 string The new UpdateOrderFreeText1 on the order.
UpdateOrderFreeText2
OrderFreeText2 string The new UpdateOrderFreeText2 on the order.
UpdateOrderFreeText3
OrderFreeText3 string The new UpdateOrderFreeText3 on the order.
UpdatePickingPriority
PickingPriority int The new picking priority of the order.
UpdateOrderWarehouseInstruction
WarehouseInstruction string(500) The new warehouse instruction for the order.
UpdateOrderReturnWaybill
ReturnWaybill string(50) The new return waybill of the order.
UpdateOrderServicePointCode
ServicePointCode string(50) The new return service point code of the order.
UpdateOrderWayOfDeliveryType
Operation enum(50) Determines what happens if the way of delivery does not exist. - Find
- FindOrCreate
Identification enum(50) Determines how the way of delivey type is identified.
- WayOfDeliveryTypeCode
WayOfDeliveryTypeCode string(300) The way of delivery type code.
WayOfDeliveryTypeName string(100) The way of delivery type name.
UpdateOrderTransporter
TransporterContract TransporterContractClass Object which specifies which transporter contract the order shold have. This object is exactly the same as the TransporterContract object in the ProcessOrder API function.
UpdateOrderClasses
OrderClasses OrderClasses Add order classes on the order. If the order already has some order classes, they will not be deleted.
UpdateOrderDeliveryInstruction
OrderDeliveryInstruction string The new OrderDeliveryInstruction on the order.
UpdateOrderSalesCode
OrderSalesCode string The new OrderSalesCode on the order. Often visible on package label (depending on transporter).
UpdateOrderCustomerAndNotification
Customer Customer The new or updated customer for the order.
OrderNotification OrderNotification The new or updated notifications for the order.
TransporterContractClass
TransporterContractIdentification enum Req. Defines what you want to identify the transporter contract by:
 - CodeAndServiceCodeAndCustomerNumber
 - CodeAndServiceCode
 - Code
 - ServiceCode
Most integrations will use CodeAndServiceCode
TransporterContractOperation enum Req. Defines the operation:
 - Find
 - CreateOrUpdate
Most integrations will use Find
TransportPayment enum Req. Defines who will pay for the transport:
 - Collect
 - Prepaid
 - ThirdParty
 - UnKnown
Most integrations will use Prepaid
TransporterCode string(50) Transporter code. See GetTransporterContracts for available codes. Required if TransporterContractIdentification = CodeAndServiceCodeAndCustomerNumber, CodeAndServiceCode or Code
TransporterServiceCode string(50) Transporter service code. See GetTransporterContracts for available codes. Required if TransporterContractIdentification = CodeAndServiceCodeAndCustomerNumber, CodeAndServiceCode or ServiceCode
CustomerNumber string(50) Customer number at the transporter. Usually not needed if TransportPayment = PrePaid
ConsigneePalletCustomerNumber string(50) Pallet reg number
OrderClasses
Operation enum Req. Defines the operation for each class:
 - Find
 - FindOrCreate
Most integrations will use FindOrCreate
Identification enum Req. Defines what you want to identify each class. Currently there is only one type of valid identification:
 - Code - identifies the class using the code
Classes OrderClass[] Req. A list of Class objects, each object representing one order class.
Customer
CustomerOperation enum Req. Defines the operation:
 - Create
 - CreateOrUpdate
 - CreateNotUpdate
 - Find
CustomerIdentification enum Req. Defines what you want to identify the customer by (what is public):
 - ExternalCustomerCode
 - SystemId
 - CustomerNumber
 - FullNameAndAddress
ExternalCustomerCode string(50) External customer code. Required if CustomerIdentification = ExternalCustomerCode
CustomerNumber string(50) Customer number. Required if CustomerIdentification = CustomerNumber
CustomerId int Ongoing WMS internal id (SystemId). Required if CustomerIdentification = SystemId
DeliveryAddressId int Only usable when the Customer tag is used within the ProcessOrder request and CustomerOperation = Find. Binds the delivery address of the order directly to the Ongoing WMS system id of the address
InvoiceAddressId int Only usable when the Customer tag is used within the ProcessOrder request and CustomerOperation = Find. Binds the invoice address of the order to the Ongoing WMS system id of the address
Coordinates Coordinates Coordinates of customer
Name string(200) Name
Address string(200) Address line 1
Address2 string(200) Address line 2
Address3 string(200) Address line 3
PostCode string(50) Post code/zip
City string(200) City
TelePhone string(50) Telephone number (non cellular)
Remark string(800) Remark/comment
Email string(300) Email address
MobilePhone string(50) Mobile phone number (cellular)
CountryCode string(2) The two-letter ISO 3166-1 alpha-2 code of the country.
CountryStateCode string(50) The two-letter ISO 3166-2 abbreviation of the state. Required for United States and Canada. See ISO 3166-2:US for United States and ISO 3166-2:CA for Canada.
DeliveryInstruction string(300) Delivery instruction
IsVisible boolean False if the address shouldn't show in the system, e.g. be re-used for manual order
NotifyBySMS boolean True if the customer should be notified by the transporter through SMS
NotifyByEmail boolean True if the customer should be notified by the transporter through email
NotifyByTelephone boolean True if the customer should be notified by the transporter through phone call
InvoiceAddress InvoiceAddress Address object defining invoice address for the customer. Fields from Coordinates to NotifyByTelephone from the Customer object apply
CustomerGroup CustomerGroup Customer group, enable grouping of customers
OrganisationNumber string(20) Organisation number
VATNumber string(20) VAT number
DoorCode string(30) Door code, may be sent to transporter for use during delivery
OrderNotification
Telephone string(50) Telephone number (non cellular) to notify by call. Required if NotifyByTelephone = True
MobilePhone string(50) Mobile phone number to notify by SMS. Required if NotifyBySMS = True
Email string(200) Email address to notify. Required if NotifyByEmail = True
NotifyByEmail boolean True if the customer should be notified by the transporter through email
NotifyBySms boolean True if the customer should be notified by the transporter through SMS
NotifyByTelephone boolean True if the customer should be notified by the transporter through phone call
OrderClass
Name string(200) The name of the class.
Code string(200) The code of the class.
Comment string(500) Comment.
Coordinates
Longitude decimal Req. Longitude
Latitude decimal Req. Latitude
InvoiceAddress
Coordinates Coordinates Coordinates of the invoice address
Name string(200) Name
Address string(200) Address line 1
Address2 string(200) Address line 2
Address3 string(200) Address line 3
PostCode string(50) Post code/zip
City string(200) City
TelePhone string(50) Telephone number (non cellular)
Remark string(800) Remark/comment
Email string(300) Email address
MobilePhone string(50) Mobile phone number (cellular)
CountryStateCode string(50) The two-letter ISO 3166-2 abbreviation of the state. Mainly used for United States and Canada. See ISO 3166-2:US for United States and ISO 3166-2:CA for Canada.
CountryCode string(2) The two-letter ISO 3166-1 alpha-2 code of the country.
DeliveryInstruction string(300) Delivery instruction
IsVisible boolean False if the address shouldn't show in the system, e.g. be re-used for manual order
NotifyBySMS boolean True if the customer should be notified by the transporter through SMS
NotifyByEmail boolean True if the customer should be notified by the transporter through email
NotifyByTelephone boolean True if the customer should be notified by the transporter through phone call
CustomerGroup
CustomerGroupOperation enum Req. Defines the operation
 - Find
CustomerGroupIdentification enum Req. Defines what you want to identify the customer group by
 - CustomerGroupCode
 - CustomerGroupName
CustomerGroupCode string
CustomerGroupName string Customer group name. Required if CustomerGroupIdentification = CustomerGroupName

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>
    <UpdateOrderResponse xmlns="http://ongoingsystems.se/WSI">
      <UpdateOrderResult>
        <Success>boolean</Success>
        <Message>string</Message>
        <OrderId>int</OrderId>
      </UpdateOrderResult>
    </UpdateOrderResponse>
  </soap:Body>
</soap:Envelope>

Response specification

UpdateOrderResponse
UpdateOrderResult UpdateOrderResult
UpdateOrderResult
Success boolean True if successful, false otherwise.
Message string Error message, if the call was unsuccessful.
OrderId int Ongoing WMS internal order id of the order.