There is no single DHL tracking API that automatically fits every shipment. DHL’s developer portal lists several tracking APIs across its divisions, including a Unified Shipment Tracking API for multiple DHL shipment types and specialized APIs for services such as DHL Express and DHL eCommerce Americas. The right starting point depends on who transported the parcel, where it originated, and the kind of data your application needs.

This guide explains how to choose a DHL tracking API, what to prepare before integrating it, and when a direct DHL connection or a multi-carrier tracking API is a better fit.

Which DHL tracking API should you use?

Start with the DHL business unit shown in your shipping records. The logo or the word “DHL” alone may not identify the correct API.

Examples of DHL tracking products in the DHL Developer Portal
Shipment type or needAPI to investigateWhat to verify
Several DHL divisions or shipment typesShipment Tracking - UnifiedSupported DHL business units, shipment identifiers, regional access, and data fields
Time-definite DHL Express shipmentsMyDHL API tracking serviceActive DHL Express customer account, credentials, and eligible shipments
DHL eCommerce packages in the United StatesDHL eCommerce Americas Tracking APIPickup authorization, supported package identifiers, and pickup/account relationship
Proactive event deliveryUnified Push or a division-specific webhook APISubscription setup, account approval where applicable, callback security, and event scope

DHL’s portal describes the Unified API as global and covering multiple DHL shipment types, while its Express and eCommerce API references have their own account and regional details. Treat the portal’s current product documentation as authoritative for your account. See the sources at the end of this article.

What you need before integrating

Gather a small set of real shipment examples and record:

Identifiers are not always interchangeable. For example, DHL eCommerce Americas recommends using trackingId for domestic U.S. shipments and packageId for international or cross-border shipments. It also says requests are authorized for a pickup, and a single request can include up to 10 identifiers of the same kind. Confirm the identifier and access rules for your specific DHL product.

Typical direct API integration steps

  1. Register and request access. Create an application in DHL’s Developer Portal and subscribe to the matching API. Some products require an existing DHL business account or account approval.
  2. Use the correct environment. Develop against the test or sandbox environment where the product provides one. Keep test and production credentials separate.
  3. Send the correct identifier. Match the tracking number and required context, such as a pickup, shipment reference, or destination details, to that API’s documentation.
  4. Parse the response defensively. Handle multiple events, missing fields, delayed first scans, and API errors separately from a delivered or exception status.
  5. Store and display useful events. Keep event timestamps and source descriptions. Convert carrier language into simple customer-facing milestones while retaining the original scan for support staff.
  6. Monitor and refresh appropriately. Follow the API’s quota and rate limits. Use polling or a supported push API according to the integration contract.

Keep API credentials on your server. Do not put secret keys in a storefront theme, browser code, or a public repository.

Polling or push notifications?

A request-and-response tracking API lets your system ask for a shipment’s status when needed. Your application then decides when to check again. A push API can send updates to a callback endpoint after you create a subscription, reducing the need for repeated status checks.

Push still requires engineering: your endpoint must authenticate the sender, accept retries safely, avoid processing duplicate events twice, and keep shipment records in sync. Check whether subscriptions are per shipment or per account, how they are activated, which events they include, and how to cancel them. DHL Unified Push documentation describes shipment- and account-based subscription options; account subscriptions may require business approval.

If you poll, space requests within the relevant quotas and avoid tight loops. A carrier can only report events it has received and processed. More frequent calls do not create new scans.

Direct DHL integration or a multi-carrier API?

A direct DHL API can be a good choice when your shipment operation primarily uses one DHL division, you need product-specific fields, and your team is prepared to manage DHL credentials and response handling.

A multi-carrier API can simplify an application that tracks DHL alongside postal, regional, and last-mile carriers. Instead of maintaining a separate integration for each carrier, your service can use one API workflow and map the returned events into its own order experience. You still need to verify carrier and service coverage with representative shipments.

Compare your expected integration work as well as subscription price: authentication, carrier onboarding, status mapping, polling or webhooks, retry handling, monitoring, and support. This package tracking API comparison guide includes a checklist for evaluating providers.

Using C2W for DHL tracking

C2W provides a single on-demand tracking endpoint and lists DHL Express and DHL eCommerce among its supported carriers. A request uses a tracking number, and your application schedules any follow-up checks; C2W does not currently support webhooks. As with any provider, verify the exact DHL service and route you use with sample tracking numbers before relying on it in production.

See the C2W DHL tracking API guide for its endpoint workflow, illustrative response fields, and polling considerations, or consult the general integration guide.

Test common DHL tracking cases

Before launch, test more than a package that is already moving. Include a newly created label with no scan, an in-transit shipment, a delivered package, an exception, an invalid identifier, and a cross-border shipment if you support one. For each case, note which events and timestamps appear and how long the API record remains available.

Then check your application’s behavior when DHL returns no data, the request times out, credentials are rejected, or a usage limit is reached. A tracking page should explain that information is not available yet without presenting that state as proof the package is lost.

Frequently asked questions

Does DHL have one tracking API for all DHL shipments?

DHL’s Developer Portal lists multiple tracking APIs by product, division, and region. Its Unified Shipment Tracking API covers multiple DHL shipment types, while separate references exist for products such as MyDHL Express and DHL eCommerce Americas. Check the current API catalog for your exact service.

Do I need a DHL business account?

Requirements vary by API. The MyDHL Express API documentation says an active DHL Express customer account is required. Check the access instructions for the specific API you plan to use.

Can a DHL tracking API send automatic updates?

DHL lists push or webhook options for some products. Availability, event scope, and subscription approval requirements depend on the API. Confirm these details in the matching developer documentation.

Can one integration track DHL and other carriers?

Yes, a multi-carrier tracking provider may offer a shared API workflow across supported carriers. Confirm DHL service coverage and the provider’s update method before migrating.