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 bellow!

WS_Repository.Models.Requests.Ship.DeleteRequest
NameDescriptionTypeAdditional information
WS_Key

(Mandatory) Webservice Key provided by 2ship support

string

None.

TrackingNumber

(Optional) Mandatory if DeleteType = ByTrackingNumber

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",
  "ShipmentId": 3,
  "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>
  <ShipmentId>3</ShipmentId>
  <TrackingNumber>sample string 2</TrackingNumber>
  <WS_Key>sample string 1</WS_Key>
</DeleteRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

None.