Cancel ShipmentAPI Documentation
Identifies a shipment to cancel, shipments must be cancelled before closing the manifest job.
Request Message
cancelshipment
Name | Description | Type | Optional | Sample Value |
---|---|---|---|---|
cancelnbr | Use either your customer reference number or the tracking number returned from the create shipment API call. | Text (50) | 1234567890 |
Cancel shipment. Shipments may be cancelled as long as they have not been scanned. Either tracking # or the reference # can be used to cancel shipment. cancelshipment.json
{ "cancelshipment": { "cancelnbr": "1234567890" } }
Cancel shipment. Shipments may be cancelled as long as they have not been scanned. Either tracking # or the reference # can be used to cancel shipment. cancelshipment.xml
<xml> <cancelshipment cancelnbr="1234567890" /> </xml>
XSD / Schema - cancelshipment.xsd Download cancelshipment.xsd
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="xml"> <xs:complexType> <xs:sequence> <xs:element name="cancelshipment" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:attribute name="cancelnbr" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="50" /> <xs:minLength value="1" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:sequence> <xs:element name="error" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="code" use="required" type="xs:string" /> <xs:attribute name="description" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="500" /> <xs:minLength value="1" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="context"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="50" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> </xs:sequence> <xs:anyAttribute /> </xs:complexType> </xs:element> </xs:schema>
Response Message
cancelshipmentresponse
Indicates the status of the cancelled shipment.
Name | Description | Type | Optional | Sample Value |
---|---|---|---|---|
cancelnbr | Tracking number assigned to the shipment | Text (50) | 1234567890 | |
status | "Success", if the cancellation was sucessful, otherwise see the error element. | Text (10) | Success |
error
Any errors cancelling the shipment will appear in this element.
Name | Description | Type | Optional | Sample Value |
---|---|---|---|---|
code | Code value of the error | int | 100 | |
description | Text description of the error message | Text (500) | Invalid XML | |
context | Error context information | Text (50) | Optional | Error on line 1 |
Response cancelshipmentresponse.json
{ "cancelshipmentresponse": { "tracknbr": "1234567890", "status": "Success" } }
Response cancelshipmentresponse.xml
<xml> <cancelshipmentresponse cancelnbr="1234567890" status="Success" /> </xml>
XSD / Schema - cancelshipmentresponse.xsd Download cancelshipmentresponse.xsd
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="xml"> <xs:complexType> <xs:sequence> <xs:element name="cancelshipmentresponse" minOccurs="1" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="error" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="code" use="required" type="xs:string" /> <xs:attribute name="description" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="500" /> <xs:minLength value="1" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="context"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="50" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="cancelnbr" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="50" /> <xs:minLength value="1" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="status" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="10" /> <xs:minLength value="1" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:sequence> <xs:element name="error" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="code" use="required" type="xs:string" /> <xs:attribute name="description" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="500" /> <xs:minLength value="1" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="context"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="50" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> </xs:sequence> <xs:anyAttribute /> </xs:complexType> </xs:element> </xs:schema>