DHL API and Shop Integration
Integrating your shop with the DHL API is the decisive step when manual franking in the DHL Business Customer Portal no longer scales. As soon as orders from your shop, marketplace or WMS should automatically generate shipping labels, write tracking numbers back into the system and provide customers with tracking links without manual effort, you need a technical interface. This guide explains the DHL API architecture, compares integration approaches from shop plugins to WMS integration, and shows how to reduce error rates, shorten shipping times and prepare your fulfillment for growth.
When you plan the API integration correctly, you save more than just clicks at the packing station. You reduce address errors, avoid duplicate data entry and create the foundation for multi-channel shipping, return labels and professional reporting. The investment typically pays off from 30 to 50 shipments per day – sooner if express SLAs or multiple sales channels run in parallel.
Why API Integration Instead of Manual Franking?
Online franking and bulk shipping via CSV import work for small volumes. However, as order volume grows, typical bottlenecks emerge:
- Duplicate data entry between shop and DHL portal
- Delays due to manual transfer of tracking numbers
- Higher error rate for addresses and weights
- No real-time feedback to customers and marketplaces
- Difficult scaling during peak seasons such as Black Friday
API integration solves these problems by passing order data directly from the Order Management System (OMS) or shipping software to DHL. The result – label, tracking number, tracking URL – flows back automatically. The term shipping label and carrier API describes exactly this automated cycle between shop, middleware and carrier.
DHL Interfaces at a Glance
DHL provides various technical access options for business customers. Which option fits depends on IT expertise, shop system and shipping volume.
DHL Parcel API (REST)
The modern DHL Parcel API works REST-based with JSON. Typical endpoints cover:
- Shipment creation and label generation (PDF or ZPL)
- Product selection (parcel, small parcel, Warenpost, additional services)
- Shipment tracking and status queries
- Return label creation
- Pickup orders and manifest handover
The API requires OAuth2 authentication with API key and secret from the business customer portal. Sandbox environments enable testing without real shipments.
Shop Plugins and Ready-Made Integrations
Many shop systems offer native DHL plugins or app store integrations:
- Shopify, WooCommerce, Shopware: Official or third-party apps with configuration wizard
- Marketplace tools: Otto, Amazon and eBay with their own shipping modules
- SaaS shipping software: Shipcloud, Sendcloud, Parcello as middleware
Plugins are the fastest entry point but offer less flexibility than direct API integration. For standard e-commerce with common DHL products, they are sufficient in most cases.
Middleware and Multi-Carrier Platforms
Middleware providers encapsulate the DHL API and simultaneously connect to Hermes, DPD or GLS. Advantages:
- Unified interface for all carriers
- Rule engine for automatic product selection (weight, zone, price)
- Centralized tracking and customer notifications
- Less in-house development effort
Disadvantages are monthly fees per shipment or user and dependency on the provider. Details on strategic questions can be found under carrier integration.
WMS and ERP Direct Integration
Fulfillment operators with their own WMS or 3PL partner often use direct API integration. The process:
- Pick completion in the WMS triggers label creation
- WMS sends address, weight and product to DHL API
- Label is printed at the packing station, tracking number written back to WMS
- Tracking event updates shop and customer communication
With Fulfillment by DHL, the logistics partner handles parts of this integration.
Comparison of Integration Options
Step-by-Step: Setting Up API Integration
The typical implementation process follows a structured workflow. Regardless of the chosen approach, the same basic steps apply.
001. Clarify Prerequisites
Before you start technically, verify:
- Active DHL Parcel business customer contract with API activation
- Access to the business customer portal with administrator rights
- Valid sender address and EKP (individual customer number)
- Decision: plugin, middleware or custom development
- Thermal label printer with ZPL or PDF support at the packing station
002. API Credentials and Sandbox
In the business customer portal, request API credentials (Client ID, Client Secret, billing number if applicable). DHL provides a sandbox environment where you can simulate shipments without generating real labels or incurring costs.
003. Connect Shop System
With shop integration, you connect your e-commerce system with DHL. Typical configuration steps:
- Store API key and secret in the plugin or middleware
- Set default shipping product (e.g. DHL Parcel 2 kg)
- Choose label format (100 x 200 mm ZPL for thermal printers)
- Enable automatic customer notification with tracking link
- Map reference field to order number
004. Shipping Rules and Product Logic
Define rules that the system applies automatically:
005. Test Phase and Go-Live
Run at least 20 test shipments in the sandbox, then 5 to 10 real test packages to yourself. Verify:
- Correct address display and routing code on the label
- Barcode scannability in the DHL app
- Tracking number written back to shop backend
- Tracking link in customer email
- Billing on the DHL invoice
Only after a successful test phase do you enable live operation for all orders.
Data Flow: From Order to Tracking Link
The automated data flow works as follows:
- Order receipt: Customer completes checkout, payment is confirmed
- Order release: OMS or WMS releases order for picking
- Pick and pack: Goods are picked, weighed and packed
- Label request: System sends address, weight, product to DHL API
- Label response: DHL delivers PDF/ZPL label and tracking number
- Write-back: Tracking number is entered in shop, WMS and marketplace if applicable
- Customer info: Automatic shipping confirmation with tracking link
- Tracking events: Status updates flow back (optionally via webhook)
Common Errors and How to Avoid Them
Even with API integration, typical problems occur. The following checklist helps with prevention:
Checklist: DHL API Integration
- Store API credentials separately for sandbox and live
- Measure weight after packing, do not estimate from master data
- Validate postal code and house number before label creation
- Packstation: verify customer post number
- Adapt label format to printer (ZPL vs. PDF)
- Enable error logging for API timeouts
- Implement retry logic for temporary DHL server errors
- Monthly reconciliation DHL vs. shop orders
Address Validation
Incorrect addresses are the most common source of errors. Implement validation before the API call:
- Postal code format and city match
- House number present (except for Packstation)
- Country code correct (DE, AT, CH for domestic products)
- Special characters and umlauts correctly encoded (UTF-8)
Weight and Dimensions
The API passes weight and optionally dimensions to DHL. Discrepancies between stated and actual weight lead to additional charges. Therefore:
- Integrate scale directly at the packing station
- Automatic transfer of measured value to WMS
- Plausibility check (e.g. warning at 0 kg or over 31.5 kg)
API Limits and Rate Limiting
DHL APIs have request limits per minute. During peak times, throttling can occur. Plan for:
- Queues for label requests during rush hours
- Exponential backoff for HTTP 429 responses
- Batch processing for bulk shipments instead of individual calls
When Is Each Integration Approach Worth It?
The decision depends on your fulfillment model:
Shop plugin (10–50 shipments/day): Quick start, low costs, ideal for single-shop operators without their own IT team.
Middleware (30–200 shipments/day): Multi-carrier, rule engine, central dashboard. Ideal for growing shops with multiple sales channels.
Direct API (100+ shipments/day): Maximum control, no middleware fees, but in-house development or expensive integrator.
WMS integration (in-house warehouse from 200/day): Pick-pack-ship and shipping in one system, essential for professional fulfillment.
Security and Data Protection
With API integration, personal customer data (name, address, email) is transmitted to DHL. Note:
- Data processing agreement: DHL is a data processor, review DPA
- Protect API keys: Never store in frontend or public repositories
- HTTPS: All API calls exclusively encrypted
- Logging: Minimize or anonymize customer data in logs
- GDPR: Document retention period and deletion concept for shipping data
Scaling and Outlook
A clean API integration is the foundation for further automation:
- Return labels: Customers generate return labels via shop or returns portal
- Multi-channel: Same API logic for shop, Amazon, eBay and Otto
- International shipments: Extension with customs data and IOSS number
- 3PL handover: Pass API data directly to fulfillment partner
During peak seasons such as Christmas or Black Friday, API stability determines delivery capability. Test load scenarios in advance and keep a fallback process ready – such as bulk shipping via CSV for emergencies.
Frequently Asked Questions About DHL API Integration
Question 1: Do I need a developer?
Plugin: no, direct API: yes.
Question 2: What does the API cost?
No separate API fee, only shipping costs.
Question 3: Can I connect multiple shops?
Yes, via middleware or multi-store setup.
Question 4: Does the API work with Warenpost?
Yes, all common DHL products.
Question 5: How long does setup take?
Plugin 1–3 days, custom development 4–8 weeks.
Related Topics
- DHL Business Customer Portal and Tools
- Online Franking
- Bulk Shipping and CSV Import
- Carrier Integration in Shipping Software
- Integration and Interfaces with Fulfillment by DHL
Last updated: July 6, 2026