POST api/DeleteShipment_V1
Delete a shipment by Tracking Number or by Shipment Id
Request Information
URI Parameters
None.
Body Parameters
The request is presented below!
WS_Repository.Models.Requests.Ship.DeleteRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| WS_Key |
(Mandatory) Webservice Key provided by 2ship support |
string |
None. |
| TrackingNumber |
(Optional) Mandatory if DeleteType = ByTrackingNumber |
string |
None. |
| OrderNumber |
(Optional) Mandatory if DeleteType = ByOrderNumber |
string |
None. |
| ShipmentId |
(Optional) Mandatory if DeleteType = ByShipmentId |
integer |
None. |
| DeleteType |
(Mandatory) this element is desired to know how to lookup the shipment that you wish to delete |
WS_Repository.Models.Requests.Ship.DeleteType |
None. |
| DeleteFromOnHold |
(Optional) Specify if an order was in OnHold before was shipped then it will be also deleted from OnHold - Default behaviour is to not delete it from OnHold |
boolean |
None. |
Request Formats
application/json, text/json
Sample:
{
"WS_Key": "sample string 1",
"TrackingNumber": "sample string 2",
"OrderNumber": "sample string 3",
"ShipmentId": 4,
"DeleteType": 0,
"DeleteFromOnHold": true
}
application/xml, text/xml
Sample:
<DeleteRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.Ship"> <DeleteFromOnHold>true</DeleteFromOnHold> <DeleteType>ByShipmentId</DeleteType> <OrderNumber>sample string 3</OrderNumber> <ShipmentId>4</ShipmentId> <TrackingNumber>sample string 2</TrackingNumber> <WS_Key>sample string 1</WS_Key> </DeleteRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
WS_Repository.Models.Responses.Ship.DeleteResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Success | boolean |
None. |
Response Formats
application/json, text/json
Sample:
{
"Success": true
}
application/xml, text/xml
Sample:
<DeleteResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.Ship"> <Success>true</Success> </DeleteResponse>