POST api/orders/{OrderNumber}/cancelShipment/{ShipmentId}
Cancels a shipment
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
OrderNumber |
Work order number |
integer |
Required |
ShipmentId |
Shipment number |
integer |
Required |
Body Parameters
Structure containing data received from shipment cancel validation
CancelShipmentRequestName | Description | Type | Additional information |
---|---|---|---|
ValidationToken |
The validation token returned by the cancel shipment validation call. |
string |
Required |
CancellationRequestedBy |
The name of the user requesting the shipment cancellation. |
string |
Required |
CancelOrderIfEmpty |
If, after processing the shipment cancellation, the order is empty, should the order be cancelled automatically. |
boolean |
Default value is False |
Request Formats
application/json, text/json
{ "ValidationToken": "sample string 1", "CancellationRequestedBy": "sample string 2", "CancelOrderIfEmpty": true }
application/xml, text/xml
<CancelShipmentRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ValidationToken>sample string 1</ValidationToken> <CancellationRequestedBy>sample string 2</CancellationRequestedBy> <CancelOrderIfEmpty>true</CancelOrderIfEmpty> </CancelShipmentRequest>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
A structure returning data associated with the shipment cancellation.
CancelShipmentResponseName | Description | Type | Additional information |
---|---|---|---|
CancellationStatus |
Field indicating the status of Shipment level cancellation |
ShipmentCancellationStatusType |
None. |
PackageCancellations |
Structures indicating the package level cancellation statuses |
Collection of PackageCancellationStatus |
None. |
WarningMessage |
A Shipment level warning message, if any |
string |
None. |
Response Formats
application/json, text/json
{ "CancellationStatus": 0, "PackageCancellations": [ { "PackageId": 1, "Status": 0, "Message": "sample string 2" }, { "PackageId": 1, "Status": 0, "Message": "sample string 2" } ], "WarningMessage": "sample string 1" }
application/xml, text/xml
<CancelShipmentResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <CancellationStatus>Success</CancellationStatus> <PackageCancellations> <PackageCancellationStatus> <PackageId>1</PackageId> <Status>Success</Status> <Message>sample string 2</Message> </PackageCancellationStatus> <PackageCancellationStatus> <PackageId>1</PackageId> <Status>Success</Status> <Message>sample string 2</Message> </PackageCancellationStatus> </PackageCancellations> <WarningMessage>sample string 1</WarningMessage> </CancelShipmentResponse>