Skip to main content

Get Credentials to Access DHL eCommerce Europe Shipping API

Learn how to connect DHL eCommerce Europe (eConnect) to AfterShip Shipping.

Written by Harneet Kaur

Plan: All plans | Platform: All platforms

Estimated reading time: 10 minutes

Overview

Learn how to connect DHL eCommerce Europe (eConnect) to AfterShip Shipping. This guide walks you through creating an app in the DHL API Developer Portal, collecting your DHL account details, and adding the carrier account in AfterShip Shipping. Once connected, you can create outbound and return labels for DHL eCommerce Europe services alongside the other carriers in your account.

Before you begin

Requirements

  • A DHL contract that covers each DHL eCommerce Europe service you plan to use

  • An account on the DHL API Developer Portal

  • An app subscribed to the DHL eCommerce Europe (eConnect) API, in the environment you are connecting

  • Your DHL customer identification, for example, your EKP or local ID

  • Admin access to AfterShip Shipping

Limitations

  • Rate calculation isn't supported. DHL eConnect doesn't offer this operation

  • You can't cancel a label after it's created

  • Labelless (QR code) returns are available for DHL Parcel Return Connect only, as PNG or GIF, in these drop-off countries: Belgium, Bulgaria, Germany, Spain, Luxembourg, Poland, Portugal, and Sweden

  • Shipments addressed to a DHL service point or locker are rejected without the recipient's email address or mobile number

  • Shipments to the United Kingdom require an email address and a phone or mobile number for both the sender and the recipient

  • DHL Parcel Connect Light Mail returns one mail bag label for the number of letters you declare, not one label per letter, and no per-item tracking number

  • Manifests (air waybills) apply to Connect Light services only, and only to tracked Connect Light items

Get DHL Supply Chain India credentials

Step 1: Create your DHL app and get API credentials

DHL issues your API credentials. You test in the sandbox environment first, then move to production after DHL approves your integration.

  1. Sign up for access by contacting your local DHL sales representative or submitting the DHL eCommerce business enquiry form. Include your company name, industry, phone number, and email address.

  2. Build and test your integration in the sandbox environment.

  3. Ask your DHL experts to review and approve your data and labels.

  4. Request access to the production environment, then start shipping.

  • DHL sends your Client ID and Password through a secure channel, with separate credentials for the sandbox and production environments.

  • The eConnect API uses OAuth 2.0: your Client ID and Password are exchanged for a bearer token whose authorization scopes are assigned to your Client ID.

  • AfterShip Shipping handles this exchange, so you don't call the token endpoint yourself.

Important:

Subscribing your production app to the eConnect API is a separate step from creating the app. If your production app isn't entitled to eConnect, every API call fails with 401 Unauthorized for given resource. even though the credentials are valid and can obtain a token.

Step 2: Collect your Customer Identification and Account Number

DHL assigns these values under your contract, so get them from your DHL contact person before you continue.

  1. Ask your DHL contact for your customer identification, which is your DHL customer number (for example, your EKP or local ID).

  2. Ask for your account number if you use DHL Parcel Connect services. This value is optional: you either provide it, or DHL pre-configures your account in eConnect.

Note:

Connect Light services don't use the account number. If you have different account numbers for outbound and return shipments, set up two carrier accounts in AfterShip Shipping.

Step 3: Add the Carrier Account in AfterShip Shipping

Adding the carrier account connects your DHL credentials to AfterShip Shipping so you can create labels.

  1. Go to Shipping > Carriers.

  2. Click Add carrier, then select DHL eCommerce Europe.

  3. Enter your Client ID, Password, and customer identification, and your account number if you have one.

  4. Select the environment that matches your credentials, then click Connect.

To disconnect the carrier, open the carrier account in Shipping > Carriers and click Remove. Labels already created stay in your account.

Merchant experience

After completing these steps:

  • You can select DHL eCommerce Europe services when you create outbound and return labels

  • You can generate DHL Parcel Return Connect returns as a printable label, a QR code, or both in the same request

  • Shoppers receive a QR code they can scan at a DHL drop-off location, with no printer needed, in supported countries

  • Shoppers in 28 European countries receive DHL Parcel Connect deliveries to their address or to a DHL service point

Supported DHL eCommerce Europe Services

service_type

service_name

Shipment type

Noteworthy consideration

dhl-ecommerce-eu_parcel_connect

DHL Parcel Connect

Forward

Delivery across 28 European countries with one label and one set of paperwork. Supports delivery to service points

dhl-ecommerce-eu_parcel_return_connect

DHL Parcel Return Connect

Return

Drop-off at 140,000+ locations. The only service that supports labelless (QR code) returns

dhl-ecommerce-eu_parcel_international

DHL Parcel International

Forward

More than 220 destinations from Germany through postal partners

dhl-ecommerce-eu_parcel_international_return

DHL Parcel Return International

Return

Postal return product to Germany, for markets where Return Connect isn't available

dhl-ecommerce-eu_connect_light_parcel

DHL Parcel Connect Light Parcel

Forward

Lightweight parcels, previously sold as Deutsche Post Global Mail. Can be grouped into a manifest

dhl-ecommerce-eu_connect_light_mail

DHL Parcel Connect Light Mail

Forward

Letters, previously sold as Deutsche Post Global Mail. Returns a mail bag label

Your DHL contract must cover each service. The API integration alone isn't enough to use a service in production. If you need a service that's missing, contact your DHL account manager.

Move from DHL eCommerce Solutions Europe or Deutsche Post

DHL eCommerce Europe replaces two older carrier integrations in AfterShip Shipping:

  • DHL eCommerce Solutions Europe: the same carrier under its previous brand name

  • Deutsche Post (DHL Global Mail): now sold as DHL Parcel Connect Light

If you use either integration today:

  1. Add a DHL eCommerce Europe carrier account with the credentials described above. Your DHL account details don't change.

  2. Select the new carrier and the matching service when you create a label.

  3. Update the carrier slug and the service types in your integration if you create labels through the API.

Important:

DHL is sunsetting the legacy Global Mail API, so Connect Light shipments must move to DHL eCommerce Europe before your DHL deadline. Check the exact date with your DHL contact.

Developer resources

Troubleshooting Tips

Problem

Cause

Solution

Every API call fails with 401 Unauthorized for given resource.

The production app isn't subscribed to the eConnect API

Ask your DHL contact to enable eConnect for your production account

Labels work in sandbox but fail in production

Sandbox credentials are being used in production

Enter the production Client ID and Password from the DHL API Developer Portal

A service point or locker shipment is rejected

The recipient's email address or mobile number is missing

Add an email address or mobile number for the recipient and resubmit

A shipment to the United Kingdom is rejected

Contact details are missing for the sender or the recipient

Add an email address and a phone or mobile number for both parties

Connect Light Mail letters have no tracking number

The service returns one mail bag label for all declared letters

Track the bag label. Per-item tracking isn't available for this service

A return label can't be generated as a QR code

The service or drop-off country doesn't support labelless returns

Use DHL Parcel Return Connect in a supported drop-off country

A label can't be canceled

DHL eConnect doesn't support label cancellation

Contact your DHL account manager to handle the shipment

FAQs

1. Can I get shipping rates for DHL eCommerce Europe?

No. DHL eConnect doesn't offer rate calculation, so rates aren't available in AfterShip Shipping.

2. Can I use the same credentials for sandbox and production?

No. The DHL API Developer Portal issues separate credentials for each environment, and each app needs its own eConnect subscription.

3. Is the account number required?

No. For DHL Parcel Connect services, you either provide it or DHL pre-configures your account in eConnect. Connect Light services don't use it.

4. Do I need two carrier accounts for outbound and returns?

Only if DHL gave you different account numbers for outbound and return shipments. In that case, add one carrier account for each number.

5. Which services support QR code returns?

DHL Parcel Return Connect only, in Belgium, Bulgaria, Germany, Spain, Luxembourg, Poland, Portugal, and Sweden.

6. Can I create a printable label and a QR code in the same request?

Yes. The two options aren't mutually exclusive, so you can return both to the shopper.

Did this answer your question?