Skip to content

Tracking Service

Jamie Thompson edited this page Dec 4, 2020 · 1 revision

http://api.despatchbay.com/soap/v16/tracking?wsdl

The Tracking Service returns tracking information for parcels (parcels are identified by tracking number)

Changes: There have been no changes introduced between v15 and v16 of the Tracking Service

Methods

GetTracking

The GetTracking method returns tracking information for a parcel

<message name="GetTrackingRequest">
  <part name="trackingNumber" type="xsd:string"/>
</message>
<message name="GetTrackingResponse">
  <part name="return" type="tns:TrackingReturnType"/>
</message>

...

<operation name="GetTracking">
  <documentation>Returns tracking information for a tracking number</documentation>
  <input message="tns:GetTrackingRequest"/>
  <output message="tns:GetTrackingResponse"/>
</operation>
Input Output
(String) TrackingNumber TrackingReturnType

Note: Tracking histories for Part-tracked services will never include a delivery event.

Types

TrackingCodeType

The TrackingCodeType object represents a tracking event code.

Tip: A tracking event code is a category of event which may occur relating to a parcel such as "Delivered" or "Arrived at Hub". Tracking codes are unique per courier. The same type of tracking event may have one or more differing codes for each courier.

<xsd:complexType name="TrackingCodeType">
<xsd:all>
<xsd:element name="Code" type="xsd:int"/>
<xsd:element name="Description" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
Element Name Type Description
Code Integer The tracking code
Description String Description of the tracking code

ArrayOfTrackingCodeType

ArrayOfTrackingCodeType is an array of TrackingCodeType objects

<xsd:complexType name="ArrayOfTrackingCodeType">
  <xsd:complexContent>
    <xsd:restriction base="SOAP-ENC:Array">
      <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:TrackingCodeType[]"/>
    </xsd:restriction>
  </xsd:complexContent>
</xsd:complexType>

TrackingEventType

<xsd:complexType name="TrackingEventType">
  <xsd:all>
    <xsd:element name="Date" type="xsd:string"/>
    <xsd:element name="Time" type="xsd:string"/>
    <xsd:element name="Code" type="xsd:string"/>
    <xsd:element name="Description" type="xsd:string"/>
    <xsd:element name="Location" type="xsd:string"/>
    <xsd:element name="Signatory" type="xsd:string"/>
  </xsd:all>
</xsd:complexType>
Element Name Type Description
Date String The date of the tracking event
Time String The time of the tracking event
Code String The tracking event code
Description String The tracking event description
Location String The location where the tracking event took place (optional)
Signatory String For delivery events, this is populated with the name of the person who signed for the parcel (where the service used supports signature capture)

Locations & Signatures: Locations are free-text elements and simple represent the location text provided by the courier. These may contain either than name of a place such as a town or city, a depot or hub name, or occasionally a postcode. Signatures generally contain the name of the person who signed for the parcel but please note this can often contain misspellings and can sometimes contain text such as "Left at number 73"

ArrayOfTrackingEventType

ArrayOfTrackingEventType is an array of TrackingEventType objects

<xsd:complexType name="ArrayOfTrackingEventType">
  <xsd:complexContent>
    <xsd:restriction base="SOAP-ENC:Array">
      <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:TrackingType[]"/>
    </xsd:restriction>
  </xsd:complexContent>
</xsd:complexType>

TrackingReturnType

The TrackingReturnType object represents a single response to a GetTracking request.

<xsd:complexType name="TrackingReturnType">
  <xsd:all>
    <xsd:element name="CourierName" type="xsd:string"/>
    <xsd:element name="CourierID" type="xsd:int"/>
    <xsd:element name="ServiceName" type="xsd:string"/>
    <xsd:element name="ServiceID" type="xsd:int"/>
    <xsd:element name="TrackingType" type="xsd:string"/>
    <xsd:element name="TrackingHistory" type="tns:ArrayOfTrackingEventType"/>
  </xsd:all>
</xsd:complexType>
Element Name Type Description
CourierName String The name of the courier used to send the parcel
CourierID Integer An ID representing the courier used to send the parcel
ServiceName String The name of the service used to send the parcel
ServiceID Integer An ID representing the service used to send the parcel
TrackingType String Either "fully-tracked" or "part-tracked"
TrackingHistory ArrayOfTrackingEventType a chronological tracking event history