🔑 GLS Track & Trace
The action is used to get the tracking information from GLS.
Inputs
Name | Type | Description |
---|---|---|
Tracking Number | String | GLS tracking number |
Username | String | GLS username |
Password | String | GLS password |
Outputs
Name | Type | Description |
---|---|---|
Found Tracking? | Boolean | Whether the tracking information was found True / False |
Status | String | Tracking status: Ready for Shipment, Delivered, In Transit, Problem with Delivery, Returning to Sender, Ready for Pickup |
Status Description | String | Detailed description of the tracking status |
Shipped Date | String | The date of the shipment. Format: YYYY-MM-DDThh:mm:ss |
Last Event Date | String | The date of the last tracking event. Format: YYYY-MM-DDThh:mm:ss |
Tracking Data | Object | Tracking Data |
Tracking URL | String | Canada Post tracking URL |
Activity History | List | List of all the tracking events. See the example below |
Sample Response
Activity History
{
"parcels": [
{
"timestamp": "2021-08-27T12:04:00",
"status": "",
"trackid": "20287788695",
"references": [
{
"type": "UNITNO",
"name": "Parcel number:",
"value": ""
},
{
"type": "UNIQUENO",
"name": "Track ID",
"value": ""
},
{
"type": "GLSREF",
"name": "Parcel Force parcel number",
"value": ""
},
{
"type": "GLSREF",
"name": "Origin National Reference in Unicode",
"value": ""
},
{
"type": "CUSTREF",
"name": "Customer's own reference number",
"value": ""
},
{
"type": "CUSTREF",
"name": "Customer's own reference number",
"value": ""
},
{
"type": "CUSTREF",
"name": "Customers own reference number - per TU",
"value": ""
}
],
"events": [
{
"timestamp": "2021-08-27T12:04:00",
"description": "The parcel has been delivered.",
"location": "",
"country": "GB",
"code": "3.0"
},
{
"timestamp": "2021-08-27T08:25:00",
"description": "The parcel is expected to be delivered during the day.",
"location": "",
"country": "GB",
"code": "11.0"
},
{
"timestamp": "2021-08-27T00:52:32",
"description": "The parcel has reached the parcel center.",
"location": "",
"country": "GB",
"code": "2.0"
},
{
"timestamp": "2021-08-26T09:07:00",
"description": "The parcel has reached the parcel center.",
"location": "",
"country": "GB",
"code": "2.0"
},
{
"timestamp": "2021-08-26T08:58:39",
"description": "The parcel was released by customs.",
"location": "",
"country": "GB",
"code": "15.0"
},
{
"timestamp": "2021-08-25T00:31:50",
"description": "The parcel has left the parcel center.",
"location": "Neuenstein",
"country": "DE",
"code": "1.0"
},
{
"timestamp": "2021-08-25T00:27:39",
"description": "The parcel has reached the parcel center.",
"location": "Neuenstein",
"country": "DE",
"code": "2.0"
},
{
"timestamp": "2021-08-24T18:47:51",
"description": "The parcel was handed over to GLS.",
"location": "Hamburg",
"country": "DE",
"code": "0.0"
},
{
"timestamp": "2021-08-23T21:38:26",
"description": "The parcel data was entered into the GLS IT system; the parcel was not yet handed over to GLS.",
"location": "Hamburg",
"country": "DE",
"code": "0.100"
}
]
}
]
}
Tracking Status
GLS API returns a status code for each tracking event. DG maps this status code to one of the predefined statuses. E.g. 0 - Ready for Shipment.
DG scans all the tracking events to identify whether there is an event with status code that shows the parcel is returning back to the sender.
Statuses mapping
'Ready for Shipment': ['0', '81'],
'Returning to Sender': ['5'],
'In Transit': ['1', '2', '6', '8', '11', '15', '27', '941', '951'],
'Ready for Pickup': ['16'],
'Problem with Delivery': ['4','7','12','13','14','18','19','20','30','31','35','82','83','90','824','829','895','897','949','950' ],
'Delivered': ['3', '17'],
Updated about 1 year ago