Track&Trace SOAP¶
Basics¶
Track&Trace¶
The shipment tracking is possible with the GLS parcel number or the consignor's own reference number.
The different methods are described in this documentation.
Web Service¶
GLS follows the SOAP protocol version 1.1. The basic communication is done over HTTP or HTTPS. The different methods of querying the status of a shipment are provided as WSDL (Web Services Description Language) file.
Methods¶
Overall there are three methods for determining the status of a shipment.
The two parameters username and password are mandatory. In the returned string the elements ErrorCode and ErrorDscr are indicators for the successful transmission of the web service stream or giving back information about a possible error.
This is how a positive response stream looks like:
An error message, e.g. wrong login, might look like this:
A complete list of all (error) codes can be found further down in this documentation.
GetTuDetail¶
This method delivers detailed information of a shipment based on the GLS parcel number RefValue without the check digit.
With the parameters ParamCode (LangCode) and ParamValue the
language of the search results can be switched (DE = german,
EN = english).
GetTuDetail Request Structure¶
A typical web service string is structured as follows, ? is the
placeholder of the committed value:
| Line no. | XML content | Optional |
|---|---|---|
| 1 | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:trac="http://gls-group.eu/Tracking/"> |
|
| 2 | <soapenv:Header/> |
|
| 3 | <soapenv:Body> |
|
| 4 | <trac:TuDetailsRequest> |
|
| 5 | <trac:RefValue>?</trac:RefValue> |
|
| 6 | <Credentials><UserName>?</UserName><Password>?</Password></Credentials> |
|
| 7 | <trac:Parameters><trac:ParamCode>?</trac:ParamCode><trac:ParamValue>?</trac:ParamValue></trac:Parameters> |
X |
| 8 | </trac:TuDetailsRequest> |
|
| 9 | </soapenv:Body> |
|
| 10 | </soapenv:Envelope> |
GetTuDetail Request Example¶
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:trac="http://gls-group.eu/Tracking/">
<soapenv:Header/>
<soapenv:Body>
<trac:TuDetailsRequest>
<trac:RefValue>55123456789</trac:RefValue>
<trac:Credentials>
<trac:UserName>2760123456</trac:UserName>
<trac:Password>Rght355Xh</trac:Password>
</trac:Credentials>
<!--Zero or more repetitions:-->
<trac:Parameters>
<trac:ParamCode>LangCode</trac:ParamCode>
<trac:ParamValue>EN</trac:ParamValue>
</trac:Parameters>
</trac:TuDetailsRequest>
</soapenv:Body>
</soapenv:Envelope>
GetTuDetail Response Parameters¶
For reasons of clarity the most important parameters of the answering stream are described only. Generally speaking the rest of the parameters are self-explanatory.
| XML content (with example values) | Comment |
|---|---|
<TuNo>55123456789</TuNo> |
Parcel number (Tu = Transport unit) |
<DeliveryDateTime><Year>2012</Year><Month>2</Month><Day>17</Day><Hour>7</Hour><Minut>44</Minut></DeliveryDateTime> |
Delivery date & time |
<CustomerReference><ReferenceValue>10129729</ReferenceValue></CustomerReference> |
Customer's own reference number |
<TuWeight>10.5</TuWeight> |
Parcel weight |
<History><Date>...</Date><LocationCode>DE 330</LocationCode><LocationName>Braunschweig</LocationName><CountryName>Germany</CountryName><Code>3.0</Code><Desc>Delivered</Desc>[…] |
Parcel history, i.e. the different stages the shipment has passed through the GLS system are shown in detail. The latest status is put first. LocationCode = GLS depot followed by city and country. Code = status code, Desc = description of status code. |
<Signature>MUSTERMANN</Signature> |
Consignee signature |
Summary:
- Search on the basis of the GLS parcel number without check digit (eleven-digit)
- The full details of a shipment are shown
GetTuList¶
This method delivers back information about parcels of a defined period DateFrom – DateTo. It includes the latest status of the parcels in the GLS network.
The parameter RefValue makes it possible to search also based on the GLS parcel number (without check digit). With the parameter CustomRef a search on the basis of the customer's own reference number is possible.
GetTuList Request Structure¶
A typical web service string is structured as follows, ? is the
placeholder of the committed value:
| Line no. | XML content | Optional |
|---|---|---|
| 1 | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:trac="http://gls-group.eu/Tracking/"> |
|
| 2 | <soapenv:Header/> |
|
| 3 | <soapenv:Body> |
|
| 4 | <trac:TuListRequest> |
|
| 5 | <trac:RefValue>?</trac:RefValue> |
X |
<trac:DateFrom><trac:Year>?</trac:Year><trac:Month>?</trac:Month><trac:Day>?</trac:Day><trac:Hour>?</trac:Hour><trac:Minut>?</trac:Minut></trac:DateFrom> |
||
<trac:DateTo><trac:Year>?</trac:Year><trac:Month>?</trac:Month><trac:Day>?</trac:Day><trac:Hour>?</trac:Hour><trac:Minut>?</trac:Minut></trac:DateTo> |
||
<trac:CustomRef>?</trac:CustomRef> |
X | |
<trac:Credentials><trac:UserName>?</trac:UserName><trac:Password>?</trac:Password></trac:Credentials> |
||
<trac:Parameters><trac:ParamCode>?</trac:ParamCode><trac:ParamValue>?</trac:ParamValue></trac:Parameters> |
X / X | |
| 6 | </trac:TuListRequest> |
|
| 7 | </soapenv:Body> |
|
| 8 | </soapenv:Envelope> |
GetTuList Request Example¶
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:trac="http://gls-group.eu/Tracking/">
<soapenv:Header/>
<soapenv:Body>
<trac:TuListRequest>
<trac:DateFrom>
<trac:Year>2012</trac:Year>
<trac:Month>2</trac:Month>
<trac:Day>22</trac:Day>
<trac:Hour>0</trac:Hour>
<trac:Minut>0</trac:Minut>
</trac:DateFrom>
<trac:DateTo>
<trac:Year>2012</trac:Year>
<trac:Month>2</trac:Month>
<trac:Day>22</trac:Day>
<trac:Hour>23</trac:Hour>
<trac:Minut>30</trac:Minut>
</trac:DateTo>
<trac:Credentials>
<trac:UserName>2760123456</trac:UserName>
<trac:Password>Rght355Xh</trac:Password>
</trac:Credentials>
<trac:Parameters>
<trac:ParamCode>LangCode</trac:ParamCode>
<trac:ParamValue>EN</trac:ParamValue>
</trac:Parameters>
</trac:TuListRequest>
</soapenv:Body>
</soapenv:Envelope>
GetTuList Response Parameters¶
For reasons of clarity the most important parameters of the answering stream are described only. Generally speaking the rest of the parameters are self-explanatory.
| XML content (with example values) | Comment |
|---|---|
<RefNo>33352168990</RefNo> |
Parcel number |
<InitialDateTime><Year>2012</Year><Month>2</Month><Day>17</Day><Hour>8</Hour><Minut>45</Minut></InitialDateTime> |
Date of the first status in the GLS system |
<CurrentStatus>Delivered</CurrentStatus> |
Latest status of the parcel in the GLS system |
Summary:
- Search for parcel(s) in a defined time period
- Search based on the GLS parcel number without check digit (eleven-digit)
- Search based on the customer's own reference number
GetTuPOD*¶
This method returns an encoded picture of the "proof of delivery", i.e. the signature of the consignee.
*Please note: due to legal restrictions this method is not available in all GLS countries (e.g. France).
GetTuPOD Request Structure¶
A typical web service string is structured as follows, ? is the
placeholder of the committed value:
| Line no. | XML content | Optional |
|---|---|---|
| 1 | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:trac="http://gls-group.eu/Tracking/"> |
|
| 2 | <soapenv:Header/> |
|
| 3 | <soapenv:Body> |
|
| 4 | <trac:TuPODRequest> |
|
| 5 | <Credentials><UserName>?</UserName><Password>?</Password></Credentials> |
|
| 6 | <trac:RefValue>?</trac:RefValue> |
|
| 7 | <trac:Parameters><trac:ParamCode>?</trac:ParamCode><trac:ParamValue>?</trac:ParamValue></trac:Parameters> |
X / X |
</trac:TuPODRequest> |
||
| 8 | </soapenv:Body> |
|
| 9 | </soapenv:Envelope> |
GetTuPOD Response Parameters¶
For reasons of clarity the most important parameters of the answering stream are described only. Generally speaking the rest of the parameters are self-explanatory.
| XML content (with example values) | Comment |
|---|---|
<TuPODResponse xmlns="http://gls-group.eu/Tracking/"> |
|
<ExitCode><ErrorCode>Value</ErrorCode><ErrorDscr>Value</ErrorDscr></ExitCode> |
|
<PODFileName>Name of image</PODFileName> |
|
<PODFile>Binary data in base 64</PODFile> |
Signature picture data in Base64 coded |
</TuPODResponse> |
Summary:
- Returns the signature of the consignee
Error codes & description¶
Overview¶
With the elements ErrorCode and ErrorDscr the web service is returning possible error messages to the ERP system of the consignor.
Codes¶
| Error code | Error description | Comment |
|---|---|---|
| 0 | OK | No error |
| 502 | Authentication error | The authentication wasn't successful (e.g. wrong login data) |
| 998 | No data found | Based on the used parameters the system couldn't find any data |