DHL Track & Trace
Uses DG paid account API credentials
The action is used to get the tracking information from DHL.
Inputs
Name | Type | Description |
---|---|---|
Tracking Number | String | DHL tracking number |
API Key | String | DHL API KEY generated in the DHL developer portal |
If you don't have yet a DHL developer account, to generate the DHL API Key, you will need first to register into DHL Developer Portal..
Once registered, you will need to create an app:
![](https://files.readme.io/d55594c-Screenshot_2023-09-28_at_14.46.39.png)
The API that you need to select is Shipment Tracking - Unified:
![](https://files.readme.io/8e46cbc-Screenshot_2023-09-28_at_14.47.45.png)
Now, wait until the APP status is approved:
![](https://files.readme.io/9fb1498-Screenshot_2023-09-28_at_14.51.26.png)
Open the App and in the Credential Section you will find the API Key:
![](https://files.readme.io/9a40cfe-Screenshot_2023-09-28_at_14.52.32.png)
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 Is null when the status is Ready for Shipment |
Last Event Date | String | The date of the last tracking event. Format: YYYY-MM-DDThh:mm:ss |
Estimate Delivery Date | String | Estimated delivery date. Format: YYYY-MM-DDThh:mm:ss Very rarely present |
Activity History | List | List of all the tracking events. See the example below |
Sample Response
Activity History
[
{
"timestamp": "2021-05-21T14:48:00",
"location": {
"address": {
"addressLocality": "Germany"
}
},
"statusCode": "delivered",
"status": "The shipment has been successfully delivered",
"description": "The shipment has been successfully delivered"
},
{
"timestamp": "2021-05-21T09:16:00",
"statusCode": "transit",
"status": "The shipment has been loaded onto the delivery vehicle",
"description": "The shipment has been loaded onto the delivery vehicle"
},
{
"timestamp": "2021-05-21T06:35:00",
"location": {
"address": {
"addressLocality": "Frechen MechZB, Germany"
}
},
"statusCode": "transit",
"status": "The shipment has been processed in the delivery base.",
"description": "The shipment has been processed in the delivery base."
},
{
"timestamp": "2021-05-21T03:09:00",
"location": {
"address": {
"addressLocality": "Köln, Germany"
}
},
"statusCode": "transit",
"status": "The shipment arrived in the region of recipient and will be transported to the delivery base in the next step.",
"description": "The shipment arrived in the region of recipient and will be transported to the delivery base in the next step."
},
{
"timestamp": "2021-05-20T19:11:00",
"location": {
"address": {
"addressLocality": "Greven, Germany"
}
},
"statusCode": "transit",
"status": "The shipment has been processed in the parcel center of origin",
"description": "The shipment has been processed in the parcel center of origin"
},
{
"timestamp": "2021-05-17T13:49:00",
"statusCode": "pre-transit",
"status": "The instruction data for this shipment have been provided by the sender to DHL electronically",
"description": "The instruction data for this shipment have been provided by the sender to DHL electronically"
}
]
Tracking Status
DHL API returns a status code for each tracking event. DG maps this status code to one of the predefined statuses. E.g. pre-tansit - Ready for Shipment.
Because the status code doesn't describe all the tracking statuses, DG uses the event description and maps it to one of the predefined statuses. E.g. returned to shipper - Returning to Sender.
Statuses mapping
pre-transit - Ready for Shipment
delivered - Delivered
transit - In Transit
failure - Problem with Delivery
unknown - null
Status descriptions treated as Returning to Sender:
return to sender
returned to shipper
returned to sender
has been delivered directly from the parcel center to the business customer
Updated about 1 month ago