TrackingAPI Documentation
Used to track parcels.
Request Message
tracking
Specifies the tracking number of a specific number to track.
Name | Description | Type | Optional | Sample Value |
---|---|---|---|---|
tracknbr | Tracking number of the parcel to be tracked. | Text (50) | 1234567890 | |
type | Specify "new" to get all new tracking events received since the last tracking event. | Text (6) | Optional | new |
account | 3 letter account code, optional except for customers supporting multiple accounts | Text (3) | Optional | ABC |
To maintain a local database, call the service with type='new' every 15 minutes. trackingrequest.json
{ "tracking": { "type": "new", "account": "ABC" } }
Use this for debugging and tracking a single shipment. NOTE: Single Shipment Tracking is limited to 60 calls / minute, it's a poor way to maintain a local database of tracking events. trackingrequest_single.json
{ "tracking": { "tracknbr": "1234567890" } }
To maintain a local database, call the service with type='new' every 15 minutes. trackingrequest.xml
<xml> <tracking type="new" account="ABC" /> </xml>
Use this for debugging and tracking a single shipment. NOTE: Single Shipment Tracking is limited to 60 calls / minute, it's a poor way to maintain a local database of tracking events. trackingrequest_single.xml
<xml> <tracking tracknbr="1234567890" /> </xml>
XSD / Schema - tracking.xsd Download tracking.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="tracking" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:attribute name="tracknbr" 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="type"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="6" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="account"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="3" /> </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
trackingresponse
Tracking data for the specified tracking request. The tracking number can be either the reference number sent with your initial shipment request, or the carrier tracking number that is returned from the create shipment response.
Name | Description | Type | Optional | Sample Value |
---|---|---|---|---|
tracknbr | Tracking number for the shipment being tracked. | Text (50) | 1234567890 |
trackingevent
Name | Description | Type | Optional | Sample Value |
---|---|---|---|---|
code | Tracking event code | Text (5) | FD01 | |
description | Description of the event | Text (150) | Shipment Delivered | |
eventdate | Date and Time of the Tracking Event in the local time of the event. | datetime | 2020-04-01T10:28 | |
city | City, where the tracking event occurred. | Text (50) | Optional | London |
country | Country code (ISO 3166) where the tracking event occurred. | Text (2) | Optional | GB |
Tracking response with all "new" tracking events, for all shipments. The most recent event appears first. trackingresponse.json
{ "trackingresponse": [ { "tracknbr": "1234567890", "trackingevent": [ { "code": "510", "description": "Parcel Delivered", "eventdate": "2019-04-03T10:20", "city": "New York, NY", "country": "US" }, { "code": "400", "description": "Cleared Customs", "eventdate": "2019-04-02T09:28", "city": "Buffalo, NY", "country": "US" }, { "code": "300", "description": "Shipment Departed", "eventdate": "2019-04-01T13:28", "city": "Mississauga", "country": "CA" }, { "code": "200", "description": "Shipment Scanned", "eventdate": "2019-04-01T12:28", "city": "Mississauga", "country": "CA" }, { "code": "100", "description": "Shipment Data Received", "eventdate": "2019-04-01T09:28", "city": "Toronto", "country": "CA" } ] }, { "tracknbr": "8675309", "trackingevent": [ { "code": "200", "description": "Shipment Scanned", "eventdate": "2019-04-01T12:28", "city": "Mississauga", "country": "CA" }, { "code": "100", "description": "Shipment Data Received", "eventdate": "2019-04-01T09:28", "city": "Toronto", "country": "CA" } ] } ] }
Tracking response for a single shipment, the most recent event appears first trackingresponse.json
{ "trackingresponse": [ { "tracknbr": "1234567890", "trackingevent": [ { "code": "510", "description": "Parcel Delivered", "eventdate": "2019-04-03T10:20", "city": "New York, NY", "country": "US" }, { "code": "400", "description": "Cleared Customs", "eventdate": "2019-04-02T09:28", "city": "Buffalo, NY", "country": "US" }, { "code": "300", "description": "Shipment Departed", "eventdate": "2019-04-01T13:28", "city": "Mississauga", "country": "CA" }, { "code": "200", "description": "Shipment Scanned", "eventdate": "2019-04-01T12:28", "city": "Mississauga", "country": "CA" }, { "code": "100", "description": "Shipment Data Received", "eventdate": "2019-04-01T09:28", "city": "Toronto", "country": "CA" } ] }, { "tracknbr": "8675309", "trackingevent": [ { "code": "200", "description": "Shipment Scanned", "eventdate": "2019-04-01T12:28", "city": "Mississauga", "country": "CA" }, { "code": "100", "description": "Shipment Data Received", "eventdate": "2019-04-01T09:28", "city": "Toronto", "country": "CA" } ] } ] }
Tracking response with all "new" tracking events, for all shipments. The most recent event appears first. trackingresponse.xml
<xml> <trackingresponse tracknbr="1234567890"> <trackingevent code="510" description="Parcel Delivered" eventdate="2019-04-03T10:20" city="New York, NY" country="US" /> <trackingevent code="400" description="Cleared Customs" eventdate="2019-04-02T09:28" city="Buffalo, NY" country="US" /> <trackingevent code="300" description="Shipment Departed" eventdate="2019-04-01T13:28" city="Mississauga" country="CA" /> <trackingevent code="200" description="Shipment Scanned" eventdate="2019-04-01T12:28" city="Mississauga" country="CA" /> <trackingevent code="100" description="Shipment Data Received" eventdate="2019-04-01T09:28" city="Toronto" country="CA" /> </trackingresponse> <trackingresponse tracknbr="8675309"> <trackingevent code="200" description="Shipment Scanned" eventdate="2019-04-01T12:28" city="Mississauga" country="CA" /> <trackingevent code="100" description="Shipment Data Received" eventdate="2019-04-01T09:28" city="Toronto" country="CA" /> </trackingresponse> </xml>
Tracking response for a single shipment, the most recent event appears first trackingresponse.xml
<xml> <trackingresponse note="limited to 60 calls / minute" tracknbr="1234567890"> <trackingevent code="510" description="Parcel Delivered" eventdate="2019-04-03T10:20" city="New York, NY" country="US" /> <trackingevent code="400" description="Cleared Customs" eventdate="2019-04-02T09:28" city="Buffalo, NY" country="US" /> <trackingevent code="300" description="Shipment Departed" eventdate="2019-04-01T13:28" city="Mississauga" country="CA" /> <trackingevent code="200" description="Shipment Scanned" eventdate="2019-04-01T12:28" city="Mississauga" country="CA" /> <trackingevent code="100" description="Shipment Data Received" eventdate="2019-04-01T09:28" city="Toronto" country="CA" /> </trackingresponse> </xml>
XSD / Schema - trackingresponse.xsd Download trackingresponse.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="trackingresponse" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="error" minOccurs="0" maxOccurs="unbounded"> <xs:complexType /> </xs:element> <xs:element name="trackingevent" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="code" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="5" /> <xs:minLength value="1" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="description" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="150" /> <xs:minLength value="1" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="eventdate" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="16" /> <xs:minLength value="1" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="city"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="50" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="country"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="2" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="tracknbr" 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>