POST to /shipments on the MyDHL API with shipper and recipient objects, package details (weight, dimensions), and a 'content' array of customs line items each with 'description', 'quantity', 'weight', 'customsValue', 'countryOfManufacture', and 'HSCode'
Set 'exportDeclaration.exportReason' (e.g., 'PERMANENT') and 'incoterm' (e.g., 'DAP' or 'DDP') to specify duty payment responsibility
DHL generates CN23-equivalent customs data electronically for postal-adjacent services and a standard commercial invoice for courier services; the response includes document URLs for any required paper copies
For shipments requiring paper CN23 forms (some postal services), download and print from the document URL in the response and affix to the outside of the package
Test in the DHL sandbox using sandbox credentials before going live; sandbox waybills cannot be tendered
Known gotchas
CN22 applies to low-value postal items (typically under a country-specific threshold); DHL Express courier shipments use the commercial invoice format, not CN22/CN23 — verify which form applies to your service type
Accurate HS codes are required; DHL may reject shipments or customs authorities may reclassify goods and apply additional duties if HS codes are wrong
The MyDHL API requires your DHL account number and account country in the request; using the wrong account country can result in incorrect rate calculation
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