DHL Express

DHL Express is a global shipping and logistics provider.

Overview

DHL Express is a global courier offering time-definite international and domestic shipping. The MyDHL API exposes rate quoting, shipment creation, label generation, pickup scheduling, and tracking, making it a standard choice for e-commerce operators shipping internationally.

In Spojit workflows, DHL Express typically acts as the fulfillment destination - orders flow in from Shopify, WooCommerce, or BigCommerce, and the workflow quotes rates, creates a shipment, generates a label, and writes the tracking number back to the source order. Tracking events later drive customer notification workflows.

What You Can Do

The DHL Express connector exposes these tools:

  • cancel-pickup - cancel a previously scheduled pickup.
  • cancel-shipment - cancel a shipment before it has been collected.
  • create-pickup - schedule a DHL pickup at a sender address.
  • create-shipment - create a shipment and generate a waybill and label.
  • get-rates - quote rates and transit times for a given origin, destination, and parcel.
  • raw-api-request - call any DHL Express endpoint not covered by typed tools.
  • track-shipment - retrieve current status and events for a shipment by tracking number.

Authentication

DHL Express authenticates with an API key and API secret. Register at the DHL Developer Portal (developer.dhl.com), subscribe your application to the MyDHL API, and copy the generated key and secret. Production credentials require an active DHL Express account number, which you also supply on shipment creation. Sandbox credentials are available for testing.

Setting Up Your Connection

  1. At the DHL Developer Portal, create an app and subscribe it to the MyDHL API. Copy the API key and secret.
  2. Note your DHL Express account number - shipments are billed against it.
  3. In Spojit, go to Connections in the sidebar.
  4. Click + Add Connection.
  5. Search for DHL Express and select it.
  6. Enter the API key and API secret.
  7. Give the connection a name (e.g. "DHL Production").
  8. Click Save.

Using in a Workflow

Add a Connector node and select your DHL Express connection. Use Direct Mode for the standard fulfillment flow - call get-rates on an incoming order, then create-shipment, then write the resulting tracking number back to the source system. Use Agent Mode for customer service tasks where the agent decides whether to track a shipment, schedule a pickup, or quote a return. For more complex shipment options not exposed as typed tools, use raw-api-request.

Tips

  • Cache get-rates results for a few minutes - rates do not change moment to moment for the same shipment definition.
  • For international shipments include accurate HS codes, declared values, and customs invoice fields in create-shipment - omissions cause clearance delays.
  • Use track-shipment on a schedule to feed status events into a customer notification workflow.
  • Sandbox accounts use separate credentials and labels are marked as test - confirm you are on production before going live.
  • Pickup windows are constrained by DHL's local cut-off times - schedule with enough buffer.

Common Pitfalls

  • Account number mismatches between credential and shipment cause silent rejection - confirm the account on the shipment matches the credential's owner.
  • Weights and dimensions must be in the units expected by the API (kg/cm or lb/in depending on the request) - mismatched units quote wrong prices.
  • Address validation is strict; missing postal codes or invalid country combinations fail at create-shipment not get-rates.
  • Cancellation has time limits - once collected, cancel-shipment will fail.
  • Customs documents may need to be created separately for some destinations - check the MyDHL docs for the required document set per route.

Common Use Cases

Related Articles

For technical API details and field specifications, see the DHL Express connector documentation.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.