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:
The API that you need to select is Shipment Tracking - Unified:
Now, wait until the APP status is approved:
Open the App and in the Credential Section you will find the API Key:
Outputs
Name | Type | Description |
|---|---|---|
Found Tracking? | Boolean | Whether the tracking information was found |
Status | String | Tracking status: |
Status Description | String | Detailed description of the tracking status |
Shipped Date | String | The date of the shipment. |
Last Event Date | String | The date of the last tracking event. |
Estimate Delivery Date | String | Estimated delivery date. |
Activity History | List | List of all the tracking events. |
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 StatusDHL 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 - nullStatus 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 1 day ago
