UpdateOrder (automation API)

This function allows you to update certain fields on orders.

Note that the goods owner SOAP API contains a function with the exact same name. So we have:

  1. UpdateOrder in the goods owner SOAP API.
  2. UpdateOrder in the automation API (the function described on this page).
These two functions are very similar. However, the UpdateOrders function in the automation API (the function described in this page) allows you to update any order regardless of which goods owner the order belongs to.

Tags: UpdateOrder, AutomationUpdateOrder, UpdateOrderWaybill, UpdateOrderTransporterOrderNumber, UpdateOrderTransporterFreightWeight, UpdateOrderFreightPrice, UpdateOrderInvoiceUrl, UpdateOrderComment, UpdateOrderStatus, UpdateOrderTransporterContract, UpdateOrderWarehouseInstruction, UpdateOrderReturnWaybill, UpdateOrderInvoiceTypeCode, UpdateOrderTermsOfDeliveryType, UpdateOrderServicePointCode, UpdateOrderWayOfDeliveryType, UpdateOrderSetTransportPrinted, UpdatePreparedTransportDocumentId, UpdateOrderSortLocation, TransporterContractClass, UpdateOrderTracking, UpdateOrderResponse, AutomationUpdateOrderResult

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/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/Automation">
      <UserName>string</UserName>
      <Password>string</Password>
      <Order>
        <OrderId>int</OrderId>
        <UpdateOrderWaybill>
          <Waybill>string</Waybill>
        </UpdateOrderWaybill>
        <UpdateOrderTransporterOrderNumber>
          <TransporterOrderNumber>string</TransporterOrderNumber>
        </UpdateOrderTransporterOrderNumber>
        <UpdateOrderTransporterFreightWeight>
          <TransporterFreightWeight>decimal</TransporterFreightWeight>
        </UpdateOrderTransporterFreightWeight>
        <UpdateOrderFreightPrice>
          <FreightPrice>decimal</FreightPrice>
        </UpdateOrderFreightPrice>
        <UpdateOrderInvoiceUrl>
          <InvoiceUrl>string</InvoiceUrl>
        </UpdateOrderInvoiceUrl>
        <UpdateOrderComment>
          <Comment>string</Comment>
        </UpdateOrderComment>
        <UpdateOrderStatus>
          <OrderStatus>int</OrderStatus>
        </UpdateOrderStatus>
        <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>
        <UpdateOrderWarehouseInstruction>
          <WarehouseInstruction>string</WarehouseInstruction>
        </UpdateOrderWarehouseInstruction>
        <UpdateOrderReturnWaybill>
          <ReturnWaybill>string</ReturnWaybill>
        </UpdateOrderReturnWaybill>
        <UpdateOrderInvoiceTypeCode>
          <InvoiceTypeCode>string</InvoiceTypeCode>
        </UpdateOrderInvoiceTypeCode>
        <UpdateOrderTermsOfDeliveryType>
          <Operation>Find or FindOrCreate</Operation>
          <Identification>TermsOfDeliveryTypeCode</Identification>
          <TermsOfDeliveryTypeCode>string</TermsOfDeliveryTypeCode>
          <TermsOfDeliveryTypeName>string</TermsOfDeliveryTypeName>
        </UpdateOrderTermsOfDeliveryType>
        <UpdateOrderServicePointCode>
          <ServicePointCode>string</ServicePointCode>
        </UpdateOrderServicePointCode>
        <UpdateOrderWayOfDeliveryType>
          <Operation>Find or FindOrCreate</Operation>
          <Identification>WayOfDeliveryTypeCode</Identification>
          <WayOfDeliveryTypeCode>string</WayOfDeliveryTypeCode>
          <WayOfDeliveryTypeName>string</WayOfDeliveryTypeName>
        </UpdateOrderWayOfDeliveryType>
        <SetTransportPrinted>
          <Tracking>
            <Url>string</Url>
            <Waybill>string</Waybill>
          </Tracking>
        </SetTransportPrinted>
        <UpdatePreparedTransportDocumentId>
          <PreparedTransportDocumentId>string</PreparedTransportDocumentId>
        </UpdatePreparedTransportDocumentId>
        <UpdateOrderSortLocation>
          <OrderSortLocation>string</OrderSortLocation>
        </UpdateOrderSortLocation>
      </Order>
    </UpdateOrder>
  </soap:Body>
</soap:Envelope>

Request specification

UpdateOrder
UserName string(50) Req. Your username
Password string(50) Req. Your password
Order AutomationUpdateOrder Req.
AutomationUpdateOrder
OrderId int Req. The order id of the order which you want to update
UpdateOrderWaybill UpdateOrderWaybill An object specifying the new waybill.
UpdateOrderTransporterOrderNumber UpdateOrderTransporterOrderNumber An object specifying the new transporter order number.
UpdateOrderTransporterFreightWeight UpdateOrderTransporterFreightWeight An object specifying the new transporter freight weight.
UpdateOrderFreightPrice UpdateOrderFreightPrice An object specifying the new freight price.
UpdateOrderInvoiceUrl UpdateOrderInvoiceUrl An object specifying the new invoice URL.
UpdateOrderComment UpdateOrderComment An object specifying the new order comment.
UpdateOrderStatus UpdateOrderStatus An object specifying the new order status.
UpdateOrderTransporterContract UpdateOrderTransporterContract An object specifying the new transporter contract.
UpdateOrderWarehouseInstruction UpdateOrderWarehouseInstruction An object specifying the new warehouse instruction.
UpdateOrderReturnWaybill UpdateOrderReturnWaybill An object specifying the new return waybill.
UpdateOrderInvoiceTypeCode UpdateOrderInvoiceTypeCode An object specifying the new invoice type.
UpdateOrderTermsOfDeliveryType UpdateOrderTermsOfDeliveryType An object specifying the new terms of delivery.
UpdateOrderServicePointCode UpdateOrderServicePointCode An object specifying the new order service point code.
UpdateOrderWayOfDeliveryType UpdateOrderWayOfDeliveryType An object specifying the new way of delivery type.
SetTransportPrinted UpdateOrderSetTransportPrinted Note that inclusion of this (even if empty) will create a transport status event indicating that transport labels have been printed, which may affect other integrations.
UpdatePreparedTransportDocumentId UpdatePreparedTransportDocumentId An object specifying the new prepared transporter document id.
UpdateOrderSortLocation UpdateOrderSortLocation An object specifying the new order sort location.
UpdateOrderWaybill
Waybill string(50) The new waybill of the order.
UpdateOrderTransporterOrderNumber
TransporterOrderNumber string(150) The new transporter order number of the order.
UpdateOrderTransporterFreightWeight
TransporterFreightWeight decimal The new freight weight of the order.
UpdateOrderFreightPrice
FreightPrice decimal The new freight price of the order.
UpdateOrderInvoiceUrl
InvoiceUrl string(200) The new invoice URL of the order.
UpdateOrderComment
Comment string(500) The new order comment.
UpdateOrderStatus
OrderStatus int The new order status.
UpdateOrderTransporterContract
TransporterContract TransporterContractClass The new transporter contract.
UpdateOrderWarehouseInstruction
WarehouseInstruction string(500) The new warehouse instruction for the order.
UpdateOrderReturnWaybill
ReturnWaybill string(50) The new return waybill of the order.
UpdateOrderInvoiceTypeCode
InvoiceTypeCode string(50) The new invoice type code of the order.
UpdateOrderTermsOfDeliveryType
Operation enum Find or FindOrCreate.
Identification enum Must be the fixed value TermsOfDeliveryTypeCode.
TermsOfDeliveryTypeCode string(50) The code of the terms of delivery.
TermsOfDeliveryTypeName string(100) The name of the terms of delivery.
UpdateOrderServicePointCode
ServicePointCode string(50) The new return service point code of the order.
UpdateOrderWayOfDeliveryType
Operation enum Find or FindOrCreate.
Identification enum Fixed value WayOfDeliveryTypeCode.
WayOfDeliveryTypeCode string(300) The code of the way of delivery type.
WayOfDeliveryTypeName string(100) The name of the way of delivery type.
UpdateOrderSetTransportPrinted
Tracking UpdateOrderTracking An object specifying the tracking number and URL.
UpdatePreparedTransportDocumentId
PreparedTransportDocumentId string(100) The new prepared transport document id of the order.
UpdateOrderSortLocation
OrderSortLocation string(100) The new order sort location of 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
UpdateOrderTracking
Url string(300) Tracking URL for order
Waybill string(50) Waybill for order

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/Automation">
      <UpdateOrderResult>
        <Success>boolean</Success>
        <Message>string</Message>
        <OrderId>int</OrderId>
      </UpdateOrderResult>
    </UpdateOrderResponse>
  </soap:Body>
</soap:Envelope>

Response specification

UpdateOrderResponse
UpdateOrderResult AutomationUpdateOrderResult
AutomationUpdateOrderResult
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.