Authenticate to the MyDHL API using HTTP Basic Auth with your DHL API key and secret, or the OAuth 2.0 flow if your account tier requires it
GET /track/shipments?trackingNumber={waybill} to retrieve the full tracking event list; the response includes a 'shipments' array with events, each containing a timestamp, location, and description
Parse the 'events[].status' and 'events[].description' fields; DHL uses its own status vocabulary (e.g., 'transit', 'delivered', 'delivery-failure') separate from other carrier codes
For proactive notifications, configure DHL push notifications in the MyDHL+ portal or use the webhook-based push tracking setup if available on your contract tier
Handle 404 responses gracefully: newly created waybills may not appear in the tracking system for up to 30 minutes after shipment confirmation
Known gotchas
The MyDHL API track endpoint requires the 13-digit DHL Express waybill number; do not confuse with DHL eCommerce or DHL Parcel tracking numbers which use different APIs
DHL's sandbox environment uses a fixed set of test waybills; production credentials are required to track live shipments
Rate limits on the tracking endpoint vary by contract tier; cache tracking results with a short TTL (e.g., 5 minutes) to avoid throttling during high-volume status polling
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp