Skip to main content

DPD Label Print Shipment API

The DPD Label Print Webservice (REST API) enables server-side integration of DPD shipping services into your ERP, CRM, or e-commerce platform — without requiring the desktop application. Generate labels, track parcels, and schedule pickups programmatically.

The Shipment API enables you to integrate DPD shipping services into your applications — including shipment creation, tracking, parcel shop lookup, and pickup scheduling.

Base URLAPI VersionAuth
https://label-print-shipments.dpd.chv1JWT Bearer token (see Authentication)

API Reference

APIEndpointsDescription
Authentication2User login and JWT token generation
Shipments1Create shipments with automatic label generation
Manifests1Generate a manifest PDF for shipments handed over to DPD
Tracking1Real-time parcel tracking information
Parcel Shops3Search and retrieve parcel shop details
Collection Requests1Schedule one-time parcel collections
Pickup Orders1Create recurring pickup schedules

Quick Start

1. Get an access token

curl -X POST "https://label-print-shipments.dpd.ch/api/v1/login" \
-H "Content-Type: application/json" \
-d '{
"username": "your_username",
"password": "your_password"
}'
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "..."
}

2. Call any API endpoint

Include the token in every request:

curl -X GET "https://label-print-shipments.dpd.ch/api/v1/tracking/05305000123456" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Common Concepts

Address Validation

All address fields follow consistent rules:

{
"name": "Company Name", // required, max 35 chars
"countryCode": "CH", // required, ISO 2-letter
"zipCode": "8000", // required, max 9 chars
"city": "Zürich", // required, max 35 chars
"street": "Bahnhofstrasse 1", // required, max 35 chars
"phone": "+41441234567", // required for GB
"email": "info@company.ch" // required for non-CH/LI
}

Country-specific requirements:

  • NL: houseNumber is mandatory
  • GB: phone is mandatory (international format)
  • US/CA: stateCode is mandatory
  • Non-CH/LI: email is mandatory (except GB)

Service Codes

CodeServiceDescription
B2BDPD CLASSICStandard domestic and international delivery
B2BIDPD CLASSIC InternationalInternational B2B shipment
B2BPDPD CLASSIC PredictWith recipient notification
PM2DPD CLASSIC GuaranteeGuaranteed delivery by 18:00
B2CDPD COMFORTWith recipient notification
HOMEDPD HOMEWith recipient notification
AM1DPD EXPRESS 10:00Guaranteed delivery by 10:00
AM2DPD EXPRESS 12:00Guaranteed delivery by 12:00
PSDDPD SHOPParcel shop delivery
PLDPD PARCEL LETTERSmall items, max 2 kg
PBOXDPD PARCELBOXGPS + photo, max 5 kg
RETReturnReturn goods
CRCollection RequestPickup from customer to end customer
LQLimited QuantitiesHazardous goods (limited quantities)
SWAPSWAPQuick replacement for rejected goods
TYRETyresBulk tyre shipping

Error Responses

All endpoints return consistent error objects:

{
"timestamp": "2025-10-30T10:30:00Z",
"status": 400,
"error": "Bad Request",
"message": "Validation failed",
"path": "/api/v1/shipments"
}

207 Multi-Status — partial success (some items succeeded, others failed). Each failed[] item carries an identificationNumber (echoes the client-supplied value, when the request item had one — use it to map a failure back to the input item), an errorCode, and either fieldErrors[] (flat array, one entry per violation, each with its own path) or a free-text reason:

{
"tracingId": "TRACE-123",
"success": [],
"failed": [
{
"identificationNumber": "client-supplied-id-9",
"errorCode": "SYS-VALIDATION-FAILURE",
"fieldErrors": [
{
"path": "receiver.email",
"code": "SHP-VAL-EMAIL-REQUIRED",
"message": "Email address is required."
}
]
}
]
}

A batch where every item fails always returns 400 Bad Request, whatever the cause — including a routing-engine outage, which is still reported per item via errorCode: SHP-ROUTING-ENGINE-UNAVAILABLE — see Shipments for the full status-code table.

Supported Languages

Pass the lang query parameter — or an Accept-Language header — to get localised messages and tracking descriptions:

Languagelang values
Germande_CH, de_DE
Englishen_US, en_GB
Frenchfr_CH, fr_FR
Italianit_CH, it_IT

The region is optional — de works the same as de_CH. Unrecognised values fall back to English.


Environments

EnvironmentBase URL
Productionhttps://label-print-shipments.dpd.ch
Staginghttps://label-print-shipments-st.dpd.ch

Rate Limiting

All endpoints are rate-limited. Exceeded limits return 429 Too Many Requests.

HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets

Recommendations:

  • Cache parcel shop data (it changes infrequently) to reduce API calls
  • Implement exponential back-off when you receive a 429 response
  • Use batch shipment requests instead of individual calls where possible

OpenAPI / Swagger

Interactive API documentation and machine-readable specs are available directly on each service:

ResourceURL
Swagger UIhttps://label-print-shipments.dpd.ch/swagger-ui/index.html
OpenAPI JSONhttps://label-print-shipments.dpd.ch/api-docs
OpenAPI YAMLhttps://label-print-shipments.dpd.ch/api-docs.yaml

Best Practices

  • Tokens: store securely, refresh before expiry, never expose in URLs or logs
  • Rate limiting: handle 429 Too Many Requests with exponential back-off; cache parcel shop data
  • Error handling: check HTTP status codes; implement retry logic for 5xx errors
  • Validation: validate data client-side before sending; pay attention to country-specific rules
  • Batching: use batch shipment creation to minimise round trips and rate-limit consumption