Contract Shipping
Void Shipment – REST
Summary
Name: | Void Shipment |
---|---|
Reason to Call: | To delete a specific shipment prior to transmit. As an alternative, a shipment can be excluded from a transmit request and therefore remain active for inclusion in a subsequent transmit request. Making this call indicates that the previously printed label is spoiled or will otherwise not be used. |
Input: | Invoke a link from a prior call where rel=shipment |
Output: | none |
Error Example: | 404 – not found |
Typical Prior Call: | Create Shipment, Get Shipment or Get Shipments |
Typical Next Call: | none |
Version history: | Release notes |
Request Details
Request – Structure for Void Shipment
EndpointInvoke the link returned from a prior call to Get Shipment or Create Shipment where rel=”self”
OR
Invoke the link returned from a prior call to Get Shipments where rel="shipment"
(see Provided endpoints)
HTTP Headers
HTTP Header Variable |
Value |
---|---|
Accept |
from media-type in original link (Note: */* in place of the header value will return an error) |
Authorization |
Basic {Base64 encoding of userid:password} |
Accept-language |
en-CA or fr-CA |
Body
None
Request – Elements
The Void Shipment service does not require any input XML data.
Response Details
Response – Elements
The Void Shipment service does not respond with any XML elements. A successful HTTP response code is 204, which means the operation was performed successfully but there is no content in the XML body.
Response – Possible Error Responses
Code | Message | Meaning |
---|---|---|
404 |
Messages structure is empty. |
The resource was not found so the shipment id is incorrect or the shipment has already been voided. |
8064 |
A shipment can only be void if it is in a PROCESSED or PRINTED state. |
The shipment has already been transmitted. A refund must be requested. |
Examples
Sample REST XML Request – Void Shipment
DELETE https://XX/rs/345345/123456789/shipment/123456789012345678
Accept:application/vnd.cpc.shipment-v8+xml
Authorization:Basic 32j32h2jk23j-23==
Sample REST XML Response – Void Shipment
HTTP/1.1 204 OK
Content-type:text/html; charset=UTF-8
The Void Shipment service does not respond with any XML data elements.