UpdateOrder
There are two ways of updating an order after it has been created:
- You can either send in a new ProcessOrder request with the same order number, or
- 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.
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>
<UpdateOrderShippedTime>
<ShippedTime>dateTime</ShippedTime>
</UpdateOrderShippedTime>
<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>
<Code>string</Code>
<Name>string</Name>
<Comment>string</Comment>
</Class>
<Class>
<Code>string</Code>
<Name>string</Name>
<Comment>string</Comment>
</Class>
</Classes>
</OrderClasses>
</UpdateOrderSetOrderClasses>
<UpdateOrderAddOrderClasses>
<OrderClasses>
<Operation>FindOrCreate or Find</Operation>
<Identification>Code</Identification>
<Classes>
<Class>
<Code>string</Code>
<Name>string</Name>
<Comment>string</Comment>
</Class>
<Class>
<Code>string</Code>
<Name>string</Name>
<Comment>string</Comment>
</Class>
</Classes>
</OrderClasses>
</UpdateOrderAddOrderClasses>
</updateOrder>
</UpdateOrder>
</soap:Body>
</soap:Envelope>
Request specification
UpdateOrder | |||
---|---|---|---|
UserName | str(50) | Req. | Your username |
Password | str(50) | Req. | Your password |
GoodsOwnerCode | str(400) | Req. | The name/code of your client |
updateOrder | object | Req. | An element updateOrder. |
updateOrder | |||
---|---|---|---|
OrderUpdateIdentification | object | Req. | |
> OrderIdentificationType | enum | Req. |
Determines how you want the system to identify the order. Must be one of these values: - GoodsOwnerOrderNumber - GoodsOwnerOrderId - SystemId |
> GoodsOwnerOrderId | str(50) | Order number. Required if OrderIdentification = GoodsOwnerOrderId. | |
> GoodsOwnerOrderNumber | str(50) | External order id. Required if OrderIdentification = GoodsOwnerOrderNumber. | |
> SystemId | int | Ongoing WMS internal id (SystemId). Required if OrderIdentification = SystemId . | |
UpdateOrderStatus | object | ||
> 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 | object | ||
> DeliveryDate | datetime | The new delivery date of the order. | |
UpdateOrderGoodsOwnerOrderNumber | object | ||
> GoodsOwnerOrderNumber | str(50) | The new order number of the order. | |
UpdateOrderWaybill | object | ||
> Waybill | str(50) | The new waybill of the order. | |
UpdateOrderTransporterOrderNumber | object | ||
> UpdateOrderTransporterOrderNumber | str(150) | The new transporter order number of the order. | |
UpdateOrderPrintedTime | object | ||
> PrintedTime | datetime | The new printed time stamp on the order. | |
UpdateOrderShippedTime | object | ||
> ShippedTime | datetime | The new shipped time stamp on the order. | |
UpdatePickingPriority | object | ||
> PickingPriority | int | The new picking priority of the order. | |
UpdateOrderWarehouseInstruction | object | ||
> WarehouseInstruction | str(500) | The new warehouse instruction for the order. | |
UpdateOrderReturnWaybill | object | ||
> ReturnWaybill | str(50) | The new return waybill of the order. | |
UpdateOrderServicePointCode | object | ||
> ServicePointCode | str(50) | The new return service point code of the order. | |
UpdateOrderWayOfDeliveryType | object | ||
> Operation | str(50) |
Determines what happens if the way of delivery does not exist.
- Find - FindOrCreate |
|
> Identification | str(50) |
Determines how the way of delivey type is identified. - WayOfDeliveryTypeCode |
|
> WayOfDeliveryTypeCode | str(300) | The way of delivery type code. | |
> WayOfDeliveryTypeName | str(100) | The way of delivery type name. | |
UpdateOrderTransporterContract | object | The new transporter contract for the order. | |
> TransporterContract | object | 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. | |
UpdateOrderSetOrderClasses | object | Set the order classes on the order. If a certain class is already on the order, and you don't include it when you make the API call, the order class will be deleted from the order. | |
UpdateOrderAddOrderClasses | object | Add order classes on the order. If the order already has some order classes, they will not be deleted. |
Response XML
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?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
UpdateOrderResult | ||
---|---|---|
Success | bool | True if successful, false otherwise. |
Message | str(*) | Error message, if the call was unsuccessful. |
OrderId | int | Ongoing WMS internal order id of the order. |