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
- At the DHL Developer Portal, create an app and subscribe it to the MyDHL API. Copy the API key and secret.
- Note your DHL Express account number - shipments are billed against it.
- In Spojit, go to Connections in the sidebar.
- Click + Add Connection.
- Search for DHL Express and select it.
- Enter the API key and API secret.
- Give the connection a name (e.g. "DHL Production").
- 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-ratesresults 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-shipmenton 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-shipmentnotget-rates. - Cancellation has time limits - once collected,
cancel-shipmentwill 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
- How to Auto-Fulfill Orders with DHL Express
- How to Auto-Fulfill Shopify Orders with DHL Express
- How to Route Orders to Different Carriers Based on Destination
- How to Send Shipping Confirmation Emails Automatically
- How to Send Tracking Notifications via Slack When Orders Ship
Related Articles
For technical API details and field specifications, see the DHL Express connector documentation.