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:
- UpdateOrder in the goods owner SOAP API.
- 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, UpdateOrderClasses, UpdateOrderShippedTime, UpdateOrderAutomationClearPersonallyIdentifiableInformation, TransporterContractClass, UpdateOrderTracking, OrderClasses, OrderClass, 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 or FiltersSpecified</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>
<EDICustomerCode>string</EDICustomerCode>
<WaybillTemplate>string</WaybillTemplate>
</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>
<UpdateOrderSetOrderClasses>
<OrderClasses>
<Operation>FindOrCreate or Find</Operation>
<Identification>Code</Identification>
<Classes>
<Class>
<Name>string</Name>
<Code>string</Code>
<Comment>string</Comment>
<IsPalletTypeSuggestion>boolean</IsPalletTypeSuggestion>
</Class>
<Class>
<Name>string</Name>
<Code>string</Code>
<Comment>string</Comment>
<IsPalletTypeSuggestion>boolean</IsPalletTypeSuggestion>
</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>
<IsPalletTypeSuggestion>boolean</IsPalletTypeSuggestion>
</Class>
<Class>
<Name>string</Name>
<Code>string</Code>
<Comment>string</Comment>
<IsPalletTypeSuggestion>boolean</IsPalletTypeSuggestion>
</Class>
</Classes>
</OrderClasses>
</UpdateOrderAddOrderClasses>
<UpdateOrderShippedTime>
<ShippedTime>dateTime</ShippedTime>
</UpdateOrderShippedTime>
<UpdateOrderClearPersonallyIdentifiableInformation>
<Operation>Clear</Operation>
</UpdateOrderClearPersonallyIdentifiableInformation>
</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. |
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. |
UpdateOrderShippedTime |
UpdateOrderShippedTime |
|
The new time for when the order was shipped |
UpdateOrderClearPersonallyIdentifiableInformation |
UpdateOrderAutomationClearPersonallyIdentifiableInformation |
|
Used if you want to clear personally identifiable information from an order. Note that this operation can fail, for instance if the has a status <= 400, or if the customer has another order which is not yet finished. |
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. |
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. |
UpdateOrderClasses |
OrderClasses |
OrderClasses |
|
Add order classes on the order. If the order already has some order classes, they will not be deleted. |
UpdateOrderShippedTime |
ShippedTime |
dateTime |
|
The new shipped time stamp on the order. |
TransporterContractClass |
TransporterContractIdentification |
enum |
Req. |
Defines what you want to identify the transporter contract by: - FiltersSpecified - CodeAndServiceCodeAndCustomerNumber - CodeAndServiceCode - Code - ServiceCode Most integrations will use FiltersSpecified, which will cause the system to try to find the best match given the filters that you have specified. |
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 |
EDICustomerCode |
string(200) |
|
Often the code defining the sender in the TA system |
WaybillTemplate |
string(100) |
|
Waybill template |
UpdateOrderTracking |
Url |
string(300) |
|
Tracking URL for order |
Waybill |
string(50) |
|
Waybill for order |
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. |
IsPalletTypeSuggestion |
boolean |
|
Whether or not this order class is intended to be used as a hint for the type of packaging which is suitable for the 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. |