API Docs
API specification, test cases, and Excel batch import guide.
Base URL: https://www.sendlabel.de
Auth: Authorization: Bearer <API_KEY>
Quickstart
1) Admin creates an API key at /admin/api-keys and shares it with the customer.
2) Optional: create a sender and set it as default (so you don’t need to send sender on every request).
3) POST /api/v1/shipments/import to validate with DHL and enqueue label creation jobs.
4) Poll /api/v1/jobs or /api/v1/orders/{orderId} until labels are ready.
Endpoints
- Sender address book: GET/POST /api/v1/senders
- Set default sender: POST /api/v1/senders/default
- Import + create labels (DHL validate + queue): POST /api/v1/shipments/import
- Jobs: GET /api/v1/jobs?ids=job_1,job_2
- Orders: GET /api/v1/orders/{orderId}
- Label PDF: GET /api/v1/labels?orderId={orderId}
Carriers
- DHL_PARCEL_DE: DHL Paket (Domestic/EU)
- DHL_KLEINPAKET: DHL Kleinpaket (DE only, ≤1 kg)
- DP_INTL: Germany → International (Deutsche Post International, excluding EU)
Field Aliases (Compatibility)
We accept common aliases. For example sender can be provided as sender / shipper / ship_from / address_from / from, and shipment arrays can be shipments / items / orders / packages. Aliases can be extended per API key in the admin UI.
DHL Validation & Errors (Leitcode)
We call DHL validate before creating labels and return field-level errors whenever possible. If the error mentions Leitcode, it is usually caused by inconsistent ZIP/city/street/house number.
Note: DHL may return warning messages (e.g. auto-correcting the old product “Warenpost” to “DHL Kleinpaket”). If the response contains a valid label, warnings should not suppress label persistence and delivery.
If your ERP/WMS can’t split street name and house number, we try to split it from street1. If splitting fails, we ask you to send streetName + streetNo.
Test Case: Import and create labels (sender omitted, uses default sender)
curl -X POST "https://www.sendlabel.de/api/v1/shipments/import" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"carrier": "DHL_PARCEL_DE",
"labelPrintFormat": "A4",
"buyerType": "b2b",
"shipments": [
{
"reference": "ERP-0001",
"recipient": {
"name": "Max Mustermann",
"street1": "Dingelberg 18",
"postalCode": "38444",
"city": "Wolfsburg",
"countryCode": "DE",
"email": "max@example.com",
"phone": "+49 176 23414739"
},
"parcel": { "weightKg": 1.8, "lengthCm": 30, "widthCm": 20, "heightCm": 10 }
}
]
}'Send the DHL format code in labelPrintFormat. Common values include A4 | 210 x 297 mm, A5 | 148 x 210 mm, 910-300-600 | 103 x 199 mm, and 100x70mm | 100 x 70 mm.
Excel Batch Import (Web UI)
For non-API users: open “Create Shipment” page and use “Batch Import (Excel)”. Fill the template in Excel and upload the file directly. The system reads the first worksheet and adds the orders to the cart for unified payment and label creation.