PUT orders/cancel-orders
Cancels orders by setting them to Cancelled By Client. Orders that have been despatched or are already cancelled cannot be cancelled. Orders that are on hold or awaiting payment are cancelled too. Each order gets its own result, so some orders can be cancelled while others fail. You can only cancel up to 50 orders at once.
Request Information
URI Parameters
None.
Body Parameters
This is a collection of the orders that you wish to cancel.
| Name | Description | Type | Additional information |
|---|---|---|---|
| OrderNumber | The order that you wish to cancel. | integer | Matching regular expression pattern: ^[1-9]\d*$ |
Request Formats
application/json, text/json
[
{
"OrderNumber": 1
},
{
"OrderNumber": 2
}
]
application/xml, text/xml
<ArrayOfCancelOrderModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CancelOrderModel>
<OrderNumber>1</OrderNumber>
</CancelOrderModel>
<CancelOrderModel>
<OrderNumber>2</OrderNumber>
</CancelOrderModel>
</ArrayOfCancelOrderModel>
Response Information
Resource Description
Cancels orders by setting them to Cancelled By Client. Orders that have been despatched or are already cancelled cannot be cancelled. Orders that are on hold or awaiting payment are cancelled too. Each order gets its own result, so some orders can be cancelled while others fail. You can only cancel up to 50 orders at once.
Collection of ObjectNone.
Response Formats
application/json, text/json
[
{
"OrderNumber": 1,
"Success": true
},
{
"OrderNumber": 2,
"Success": false,
"Error": "Cannot cancel the order as its already despatched"
}
]
application/xml, text/xml
<ArrayOfCancelOrderResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CancelOrderResponse>
<Success>true</Success>
<OrderNumber>1</OrderNumber>
</CancelOrderResponse>
<CancelOrderResponse>
<Success>false</Success>
<Error>Cannot cancel the order as its already despatched</Error>
<OrderNumber>2</OrderNumber>
</CancelOrderResponse>
</ArrayOfCancelOrderResponse>