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, TransporterContractClass, OrderClasses, OrderClass, 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>
      </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.
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.
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.
OrderClass
Name string(200) The name of the class.
Code string(200) The code of the class.
Comment string(500) Comment.

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.