Shipment Tracking (DHL Global Forwarding) - deprecated
v 2.1.0
Division: DHL Global Forwarding

Best for:

  • Providing access to the shipment status at any time
  • Business customers of DHL Global Forwarding
  • Air, Ocean, Road and Rail Freight shipments
Region: Global
Used for: Tracking
Overview

Shipment Tracking API allows developer to request for shipment's information using shipment housebill number (DHL shipment number). API response includes:

  • Shipment details
  • Latest event & timestamp
  • Historical events & timestamps

There are additional fields (masterbill number, operational irregularity and etc.) that will only be visible for Registered Users. To be a Registered User, the requestor should be an existing DGF customer. During the rate limit upgrade process, we will automatically set up customers as a Registered User.

API also allows query using customer's reference, container number or masterbill number. To do that, use GET /housebill-number to get a list of housebill numbers for a given reference, like, customer’s reference, container number or masterbill number. Use the housebill number list returned by the response to perform the next step, GET /shipment-tracking.

Please see API specification for more details.

Scope

The Shipment Tracking (DHL Global Forwarding) API provides access to tracking services relating to various products at DHL Global Forwarding. 

Using the API

You must have an eligible housebill number (DHL shipment number) for the shipment and an API subscription key (this key needs to be either passed through HTTP request header).

Shipment Tracking (DHL Global Forwarding) - Environment: Production - Rate Limit: Starter API product is auto-approved. It is meant for users with low usage and for users to try out the API without having to wait for approval. Higher rate limit API product (Standard and Internal rate limit) requires approval from DHL team. 

User Guide

Get Access

You must request credentials for any applications you develop

To register your app and get your API subscription keys:

  1. Fill in the form to complete the customer verification process.
  2. Once the form is submitted, an app will be created under My Apps.
  3. DGF API Team will contact you in case of further inquiries.
  4. Once approved/rejected, an email notification will be sent out.

Authentication

Every call to the API requires a subscription key. This key needs to be either passed through a query string parameter or specified in the request header (DHL-API-Key).

To view your API subscription keys:

  1. From the My Apps screen, click on the name of your app.
    The Details screen appears. 
  2. If you have access to more than one API, click the name of the relevant API. 
    Note: The APIs are listed under the “Credentials” section. 
  3. Click the Show link below the asterisks that is hiding the Consumer Key
    The Consumer Key appears.  

Environments

The addressable API base URL/URI environment is:  

EnvironmentDescription
https://api.dhl.com/dgff/transportation/shipment-trackingProduction environment

 

Rate limits

Rate limits protect the DHL infrastructure from suspicious requests that exceed defined thresholds.

The table below details the main request limits:

Service LevelMaximum callsApproval
Starter50 per dayAuto Approved
Standard2500 per dayVerification and approval required
Internal5000 per dayVerification and approval required

 

Please contact dgf.apisupport@dhl.com if you need higher throughput. 

When the limit is reached, you will receive an HTTP Status code: 

HTTP/1.1 429 Too Many Requests

 

Additional Information


Permitted HTTP methods
  • GET for retrieving data
Code List
DeliveryTerms
CodeDescription
PrepaidPrepaid shipment
CollectCollect shipment

EventAirCode

CodeDescription
HBEShipment Entered into System
RRTEstimated Future Pick-Up
APTActual Pickup Time
RCDReceived at Origin
EXDAll Export Documents Received
DOSDocument Handover (Export)
DEWDeparted DHL Station
CACDelivered to airline
RCSReceived at airline
DEPCarrier: Departed
EAACarrier: Arrived (1st Transit Point)
EABCarrier: Departed (1st Transit Point)
EACCarrier: Arrived (2nd Transit Point)
EADCarrier: Departed (2nd Transit Point)
ARRCarrier: Arrived
ARVArrived Final Destination
DLVHandover Freight to Forwarder
DIHPick-up from Airline
FPRFreight Recovered at
RFDAppointment Requested by DGF
EODAppointment Confirmed by Customer
FUTFuture Delivery Requested
STUReady for Import Clearance
TBNBroker Notified
CUSImport Customs Entry
CLCImport Customs Cleared
OFDOut for Delivery
DOIDocument Handover (Import)
EPDEstimated Delivery
DOHImport Document Handover
PODShipment Delivered
SHOShipment Handover
ECRExport Customs Cleared

EventOceanCode

CodeDescription
A17Customer Booking Received
A34Shipment Entered into System
A31CFS/CY Cut-Off Date
A02Estimated Pick Up Date
A04Actual Pickup Date (customer)
A28Estimated Vessel Departure
EDLEstimated Vessel Departure (Last Updated)
A29Estimated Vessel Arrival
EALEstimated Vessel Arrival (Last Updated)
A30Arrival at Origin DGF Terminal
A42Actual Vessel Departure
A41Consignee / Broker Notified
ARDActual Vessel Arrival
A39Import Customs Cleared
A60Document Handover (if no POD)
A32Shipment Delivered
A20Booking Confirmed to Customer
A48Requested Delivery
EPDEstimated Delivery
B07Shipment Handover
A45Export Customs Cleared
G22Requested Shipping
A05Gated in at Port/Terminal
AIDAll Import Documents Received
A13Gated out at Port/Terminal
A98Customer Documentation Cut-Off
B15Customer VGM Cut-Off

EventRoadCode

CodeDescription
A17Customer Booking Received
A34Shipment Entered into System
A02Estimated Pick Up Date
A04Actual Pickup Date (customer)
A30Arrival at Origin DGF Terminal
A42Actual Vessel Departure
A41Consignee / Broker Notified
ARDActual Vessel Arrival
A39Import Customs Cleared
A60Document Handover (if no POD)
A32Shipment Delivered
A20Booking Confirmed to Customer
A48Requested Delivery
B07Shipment Handover
A45Export Customs Cleared
G22Requested Shipping
AIDAll Import Documents Received

EventRailCode

CodeDescription
A17Customer Booking Received
A34Shipment Entered into System
A31CFS/CY Cut-Off Date
A02Estimated Pick Up Date
A04Actual Pickup Date (customer)
A28Estimated Vessel Departure
EDLEstimated Vessel Departure (Last Updated)
A29Estimated Vessel Arrival
EALEstimated Vessel Arrival (Last Updated)
A30Arrival at Origin DGF Terminal
A42Actual Vessel Departure
A41Consignee / Broker Notified
ARDActual Vessel Arrival
A39Import Customs Cleared
A60Document Handover (if no POD)
A32Shipment Delivered
A20Booking Confirmed to Customer
A48Requested Delivery
B07Shipment Handover
A45Export Customs Cleared
G22Requested Shipping
A05Gated in at Port/Terminal
AIDAll Import Documents Received
A13Gated out at Port/Terminal
A12Actual Freight Available
A37Actual Arrival at Destination CFS/CY

ExpressBOLFlag

CodeDescription
YExpress B/L
NStandard

ProductType

CodeDescription
AIRAir freight
OCEANOcean freight
ROADRoad freight
RAILRail freight

 

ExceptionCategory

CodeDescription
CDZCDZ, Gov, Authority, Rules & Reg
DDSDDS Related
GTWGateway Internal Only
INFInformation (Docs, Data)
PHSPhysical Issues
TPTTransport Deviation

ExceptionType

CodeDescription
DIB02-Brokerage Docs or Info
DIC02-Commercial Docs or Info
DII02-Invoice Docs or Info
DIS02-Special Docs or Info
DIT02-Transport Docs or Info
DLD03-Delivery Delay
PUD03-Pick-up Delay
DTF04-Duties and Taxes insufficient funds
HLD04-Refused / On Hold
CSD05-Customs / Authorities Service Delay
CHI05-Customs Hold / Inspection
GAH05-Government Agency Hold / Inspection
LPA05-Late Pre-Alert notification
PRR05-Prohibitions, Restrictions and requisites
OTH06-Other CDZ, GOV, Authorities Issues
MLD07-Mainleg Delay (AFR)
VAD07-Vessel Arrival Delay
VDD07-Vessel Departure Delay
PRT08-Partial or Split
MSR10-Misrouted
MIL11-Missing
PWS11-Partially or wrongly stored
WEI11-Warehouse Issue
TEM12-Temperature Excursion
UCI12-ULD / Container Issue
DMC14-Damage (Major) - Rank C
DMA20-Damage (Minor) - Rank A
DMB21-Damage (Moderate) - Rank B
Legal Terms
specifics for the use of Tracking Data
  • Data requested and received via this Shipment Tracking (DHL Global Forwarding) API, such as transport status, estimated delivery time, including the tracking/housebill number is hereinafter referred to as “Tracking Data”.
  • Tracking Data is Confidential Information in the meaning of section “Communication” of the General Developer Portal Terms of Use. Other than set forth below You must not reveal and/or provide third parties with the Tracking Data and/or analyze, modify such data in any form and/or derive data/information especially for competitive purposes from it without our prior written consent.
  • Tracking Data is provided to You and/or the entity you are authorized to represent (hereinafter “You”/”Your”) under the prerequisite, that You retrieved the according housebill number (DHL shipment number) in compliance with the applicable law, especially in the field of data protection and competition law and that You use the Tracking Data solely for Your own or Your customers’ legitimate tracking purposes.
  • The use and submission of Tracking Data – including submission to any of Your subcontractors – shall always be in compliance with applicable laws and regulations, including – without limitation – data protection laws and competition/antitrust law.
  • You shall not combine Tracking Data with advertisement or present it in a way that it could be regarded as advertisement.
  • Unless otherwise agreed, You shall delete the housebill number (DHL shipment number) and Tracking Data which You received via the Shipment Tracking (DHL Global Forwarding) API 30 days after the delivery (of the shipment) to the recipient is completed.
  • Tracking Data shall be used in accordance with the following specification:
    • Display “Delivered by Deutsche Post DHL Group“ in text (minimum font size) as soon as it is presented/submitted to recipient
  • Please note, that we provide free text boxes (e.g. for customer references) to improve the functionalities and user experience of the Shipment Tracking (DHL Global Forwarding) API. We explicitly ask you to refrain from sending any personal or business critical data and/or information as free text. It is within your sole responsibility to ensure that the data or information you send does not infringe upon applicable law, esp. data protection law, and that you are entitled to use the respective data and/or information accordingly.
  • If You are neither the shipper/sender nor the recipient of the DHL Global Forwarding shipment/s, the Tracking Data refers to,
    • You shall ensure, that you are authorized to act on behalf of the sender and/or the recipient;
    • You shall make the sender and/or the recipient aware of the restrictions set out in this User Guide just as the General Developer Portal Terms of Use;
    • You shall make the sender aware of the necessity to inform the recipient transparently about the processing of his/her personal data according to applicable data protection laws;
    • You shall inform the sender and/or recipient transparently that the use of Your Application may result in the disclosure of data being subject to postal secrecy and data protection laws to third parties (including You).
2.3
03.Oct.2024
  • New fields added under $.ShipmentTracking.Shipment.OperationalIrregularity (Go Live on 6 November 2024)
    • CreationTimestamp
    • ExceptionCategory
    • ExceptionType
2.1.0
14.Jun.2024
  • New ExternalBookingID field added under $.ShipmentTracking.Shipment.ExternalBookingID
2.0.1
05.Feb.2024
  • New Ocean Freight milestones added (G22, A05, AID, A13)
2.0.0
18.Jan.2024
  • New emissions group added under $.ShipmentTracking.Shipment.Emissions (Go live on 15 February 2024)
1.9.0
17.Aug.2023
  • New Vessel Lloyds Number field is added: $.ShipmentTracking.Shipment.Routes.Route.VesselLloydsNumber
  • Actual mode of transport will now be reflected to $.ShipmentTracking.Shipment.ProductType
1.8.0
27.Apr.2023
  • Estimated Delivery Date will not show once POD event is available.
  • New LocationCodeUN field will be available for all of the timestamp events: $.ShipmentTracking.Shipment.Timestamps.Timestamp.LocationCodeUN
  • GMT offset will be available to all of the date/time fields.
  • New Chargeable Weight field is added: $.ShipmentTracking.Shipment.ChargeableWeight
  • VoyageFlightNumber will be provided for Air Freight timestamp of ARV (Arrived Final Destination): $.ShipmentTracking.Shipment.Timestamps.Timestamp.VoyageFlightNumber
  • New Shipment Handover Milestone - Timestamp Code: B07 (Ocean) and SHO (Air)
  • New Export Customs Cleared Milestone - Timestamp Code: A45 (Ocean) and ECR (Air)
1.7.0
16.Jan.2023
  • Added TimestampCode to Last Event group under $.ShipmentTracking.Shipment.LastEvent.TimestampCode. TimestampCode is only populated for timestamps offered by shipment tracking API.
1.6.0
11.Jan.2023
  • LastEvent now visible to public API users.
1.5.0
30.Nov.2022
  • Migrated the backend tracking system to a new platform.
  • New structure for TransportUnits group.
  • All location groups will now contain: LocationCode, LocationCodeUN, LocationName and CountryCode.
  • POD Signatory Name is now available under $.ShipmentTracking.Shipment.Timestamps.Timestamp.TimestampText for TimestampCode of A32 or POD.
  • Routes will now contain routing for Courier shipments.
  • Timestamps will be returned from earliest to latest
1.4.0
30.Mar.2022
  • Updated origin and destination LocationCode description.
1.3.0
22.Feb.2022
  • New structure for Masterbill and Carrier group.
  • Added Registered User fields ($.ShipmentTracking.Shipment.Masterbills.Masterbill.Carrier.StandardCarrierCode and $.ShipmentTracking.Shipment.Masterbills.Masterbill.Carrier.BookingReference)
1.2.0
09.Apr.2021
  • Rearranged fields as per schema.
  • Added Registered User fields (Masterbill group, Carrier group, OperationalIrregularity group, Incoterms, TransportUnitType, Phase, LastEvent group, Status)
  • Added descriptions, examples and min/max length to the fields.
1.1.0
24.May.2019
  • Added "/housebill-numbers" resource for developers to get a list of housebill numbers using customer reference, container number or masterbill number as query parameter. The result (list of housebill numbers) can be used to query the "/shipment-tracking" resource.

This allows developers to search for shipment-tracking resources using customer reference, container number or masterbill number as search criteria.

1.0.0
26.Feb.2019
  • Initial Release

Notifications

17-06-2024 18:38
DHL Global Forwarding Shipment Tracking API Update

Dear Customers,

We would like to inform you the following new features and update with the DGF Shipment Tracking API.

Features

Change Description

Availability

New ExternalBookingID field

The new ExternalBookingID can be found under $.ShipmentTracking.Shipment.ExternalBookingID. This field will contain the identification assigned by an external party for the booking made with DGF. It will only be visible when using the same reference number from the request parameter. 

The ExternalBookingID can be populated either by mapping a reference number to the externalBookingID field in the shipment booking API or by entering the reference number on the TMS with a specific reference type (EBK).

The solution is currently available in the sandbox environment for customers to test. We will notify you about the availability of this solution for production in our next update. Additionally, we are planning to roll out this solution to other DGF tracking APIs, including shipment status, push API v1, and v2. Stay tuned for more updates.

 

Example:

GET https://api-sandbox.dhl.com/dgff/transportation/shipment-tracking?housebill=ExternalBookingID1

Response:

{

    "ShipmentTracking": {

        "MessageHeader": {

            "Version": "2.2",

            "MessageID": "ab387b42-5200-44f0-9500-ec1ed0fef891",

            "CreationDateTime": "2024-06-14T09:03:30"

        },

        "Shipment": {

            "HousebillNumber": "QB217666",

            "ExternalBookingID": "ExternalBookingID1",

 

 

To understand the complete definition and structure of the message, we recommend referring to the Data Model available in our developer portal. You can find the relevant information under GET/shipment-tracking.

Sandbox - Available

PROD - TBA

For any objections or questions about the release, please reach out to us at dgf.apisupport@dhl.com.

Sincerely,

DGF API Team

You are receiving this message because you have subscribed to notifications on the DHL API Developer Portal. If you want to unsubscribe from notifications click here: Cancel Subscription

15-02-2024 10:12
DHL Global Forwarding Shipment Tracking API Update

Dear Customers,

We hope this email finds you well. We are thrilled to share some exciting news with you regarding our DGF shipment tracking API. Today we just released the new emission details that will provide you with valuable insights into the environmental impact of your shipments.

With this update, you will have the ability to access the emission data for your shipments directly through our API. By utilizing the structure: $.ShipmentTracking.Shipment.Emissions, you will be able to retrieve accurate and up-to-date information on the emissions associated with your shipments.

Please visit our developer portal under the GET/shipment-tracking section, you will find the detailed Data Model, which will provide you with all the necessary information.

 

 

Sincerely,

DGF API Team

You are receiving this message because you have subscribed to notifications on the DHL API Developer Portal. If you want to unsubscribe from notifications click here: Cancel Subscription

18-01-2024 16:40
DHL Global Forwarding Shipment Tracking API Update

Dear Customers,

We would like to inform you the following new features and update with the DGF Shipment Tracking API.

Features

Change Description

Availability

New Emission Details

We will now be providing emission details for shipments through our API. You will be able to access the emission data for your shipments from: $.ShipmentTracking.Shipment.Emissions

To learn more about the structure of the message, please refer to the Data Model under GET/shipment-tracking from our developer portal.

1st February 2024

Duplicating Masterbill Fix

We would like to address a known issue that you may have encountered with some shipments regarding duplicate masterbill groups.

We want to assure you that we are aware of this issue and planned to implement the fix to production soon.

1st February 2024

Additional timestamps (Ocean freight)

We will be adding four new timestamps to the existing timestamps of the Ocean Freight.

The new timestamp codes and description are as follows:

1. G22 - Requested Shipping

2. A05 - Gated in at Port/Terminal

3. AID - All Import Documents Received

4. A13 - Gated out at Port/Terminal

You may also refer to the DGF Tracking API Developer Portal  Page under EventOceanCode for the full list.

1st February 2024

 

For any objections or questions about the release, please reach out to us at dgf.apisupport@dhl.com.

 

Sincerely,

DGF API Team

You are receiving this message because you have subscribed to notifications on the DHL API Developer Portal. If you want to unsubscribe from notifications click here: Cancel Subscription