Skip to main content

Creating DHL Tracking API Credentials

Create a Shipment Tracking key on developer.dhl.com and connect it to Package Tracking in the Zembula platform

Written by Carl Thorner

Using a different carrier? See Package Tracking.

Introduction

Zembula reads DHL tracking through DHL's Shipment Tracking - Unified API, with a key from your own free DHL developer account. Zembula uses the key only to read tracking. It never creates or changes your shipments.

This guide covers creating the app on developer.dhl.com, copying its key, and connecting it in the Zembula platform. You enter the key in Zembula yourself.

Who can do this

Anyone can create a free account on developer.dhl.com. DHL reviews each new app, and checks for a valid company name in your profile. Sign up with your company email: DHL prefers an email domain that matches your company name.

You don't need a DHL account number. The key is all Zembula uses.

In Zembula, only account Admins can connect DHL. Other users can open the Package Tracking page, but can't change it.

Before you go live

A new DHL key is limited to 250 calls a day, and one call every five seconds. DHL says this limit is for development only and isn't suitable for production.

Each time an image that uses Package Tracking loads, Zembula can ask DHL for the shipment's latest scan. So every email open can use a DHL call, and a busy send can pass 250 calls quickly. When DHL refuses a call because a limit is reached, the image can't show tracking for that load.

Before you go live, ask DHL for a higher limit: on developer.dhl.com, open My Apps, open your app, and click Request Upgrade next to the API.

Create the app

  1. Sign in to developer.dhl.com, or create a free account with your company email and company name.

  2. Click Get Access, give the app a name, add the Shipment Tracking - Unified API, and click Create App.

  3. Wait for DHL to approve the app. DHL reviews each new app before its key works.

Already have a DHL developer app? You can add the API to it instead: open your User Dashboard, click Edit on the app, choose Shipment Tracking - Unified under SELECT APIS, and click Save.

Copy the key

Once DHL approves the app, open it under My Apps. Under Credentials, click Show and copy the API Key. DHL's Shipment Tracking guide calls it the Consumer Key. That's the only value Zembula needs.

Use the key from your own app. The demo key on DHL's API pages only returns sample data.

Keep the key private. Don't send it by email or chat. You enter it yourself in the Zembula platform in the next step.

Connect DHL in Zembula

  1. In the Zembula platform, open Data Sync → Integrations and select the Data integrations tab.

  2. Click Set up on the Package Tracking tile. If it's already set up, the button reads Open instead.

  3. If Package Tracking is off, click Turn on at the top of the page.

  4. Under Carriers, click Add on the DHL row.

  5. Click Paste a key next to API key. The Paste your DHL key dialog opens.

  6. Paste the key into the dialog's API key field and click Connect.

The button reads Verifying… while Zembula saves the key. The DHL row then reads Connected — starts answering within the hour.

Zembula doesn't test the key with DHL when you connect. A wrong key, or an app DHL hasn't approved yet, shows up later as missing tracking. Check it with Try it below.

If order data is live for Package Tracking, the DHL row reads Connected — waiting instead. Carriers and order data can't run together yet. Click Use DHL instead to switch. This turns order data off and DHL on, and content that sends only an order ID shows your fallback.

Try it

Add INTERFACES › Package Tracking to a draft image in the builder, turn on Simulate, and preview it with a DHL tracking number. If a number you know is real shows no tracking, check the key and that DHL has approved your app.

The Status section at the bottom of the Package Tracking page also lists anything that needs attention.

Using DHL in your content

Send each shipment's tracking number and its carrier. Zembula doesn't work out the carrier from the tracking number, so always send the carrier too.

Any carrier name that contains DHL as a word goes to DHL, in any case. For example: DHL, DHL Express, DHL eCommerce, DHL_PARCEL or DHL_GLOBAL_MAIL.

What shoppers see

  • Status: the latest scan DHL reports when the image loads, such as In Transit, Out for Delivery or Delivered. DHL's wording for out for delivery, delivery attempts, returns and pickup points is mapped to these statuses. A scan Zembula can't classify reads In Transit.

  • Estimated delivery: DHL's estimate, when DHL gives one. After delivery it reads Delivered, with the delivery time.

  • Tracking link: the shipment's page on dhl.com.

  • Manage delivery link: when DHL returns one for the shipment, while it is still on its way.

Where your key is kept

The key is saved as an encrypted secret. It can't be read back: the platform only shows its last four characters. It's listed under Data Sync → Secrets & Configs, and it can only be sent to DHL's API (api-eu.dhl.com).

To change the key, open the Package Tracking page and click Replace key next to API key on the DHL row.

More detail: Shared Secrets and Configs.

Additional resources

Did this answer your question?