How to Integrate DPD's API Into Your TMS
Step-by-step guide to connecting DPD's shipment API to your TMS: authentication, shipment creation, tracking, manifests, and common failure fixes.
DPD runs more than fifteen national webservices across Europe, and the German, Swiss, Belgian, French and Baltic versions are not the same API wearing different logos. They use different base URLs, different authentication mechanics, and in at least one documented case, two completely separate APIs under the same country flag. If you're planning a DPD API integration into your TMS or multi-carrier platform, that detail decides whether your go-live takes two weeks or two months. This walkthrough covers authentication, shipment creation, tracking and manifest generation end to end, and flags the country-entity trap before it costs you a sprint.
What you need before you start
You need four things in place before writing a single line of integration code: a live DPD contract with the correct national entity, API credentials for that specific entity, sandbox access, and a technical contact who isn't your sales rep.
- The right DPD entity. DPD Switzerland, DPD Germany, DPD Belgium/Luxembourg, and DPD's Baltic operations (Lithuania, Latvia, Estonia) each publish separate documentation and run on separate infrastructure. Confirm which one covers your shipping lanes before you request credentials.
- API credentials scoped to that entity. Depending on the country, this is a username/password pair exchanged for a bearer token, or a client ID that generates a JWT.
- Sandbox/staging access. DPD Switzerland, for example, runs a dedicated staging host at
label-print-shipments-st.dpd.chalongside the production environment, so you can test shipment creation without generating billable labels. - A named technical contact at DPD. Account managers rarely know endpoint behavior. For the Baltic Interconnector service, DPD lists dedicated technical inboxes per country rather than a single support desk, which tells you something about how siloed these systems are.
Step-by-step: connecting DPD's API to your TMS
Once credentials and sandbox access are confirmed, the integration itself follows a predictable pattern across entities, even though field names and token formats vary.
- Confirm the entity and pull the matching base URL. This sounds obvious until you're staring at three different DPD PDFs open in three tabs. DPD's Lithuania and Estonia webservices run on entirely separate hosts: Lithuania live traffic hits
https://esiunta.dpd.lt/api/v1while Estonia useshttps://telli.dpd.ee/api/v1, each with its own sandbox prefix. DPD Switzerland is different again, running its REST API fromlabel-print-shipments.dpd.ch. Write down the exact base URL for your entity before you touch code. - Request sandbox credentials and generate your first token. Read the authentication chapter before anything else, because shipment creation depends on it. For DPD Switzerland, you authenticate with a POST to the login endpoint and get back a JWT plus a refresh 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"}'
Every subsequent call, including tracking, must carry that token in the header, as DPD's own documentation shows: the token has to be included in every request. - Map your TMS's service codes to DPD's service aliases. DPD doesn't use plain-English service names in the payload. On the Swiss API, B2BI maps to DPD Classic International, B2C maps to DPD Comfort with recipient notification, and PSD maps to parcel shop delivery. Get this mapping wrong and shipments either fail validation or route to the wrong delivery type silently.
- Create a test shipment in sandbox and check for a pending status. A successful shipment creation call returns a status you should log immediately. DPD's own shipment status list defines the lifecycle clearly: pending for a shipment that's been created, in_route for a shipment in delivery, delivered, and returned for a shipment sent back to sender. If you don't see "pending" back from your first sandbox call, stop and debug before building anything downstream.
- Store the returned parcel number against the order. When a shipment request succeeds, the system responds with a Base64 string that can be decoded into a PDF label as well as the corresponding 14-digit parcel number. That number is your tracking key going forward, and on the Swiss API it's the path parameter for every tracking call:
GET /api/v1/tracking/{parcelNumber}. Write it to your order record the moment shipment creation succeeds, not after the label prints. - Build the manifest step for end-of-day handover. This is the part integrators forget until the first pickup goes wrong. The Manifests endpoint exists specifically to generate a manifest PDF for shipments handed over to DPD, and your driver or depot needs that document, not a spreadsheet export, to reconcile the day's parcels.
- Cut over from sandbox to production and watch the first week closely. Swap credentials and base URLs, then monitor every shipment status transition manually for at least five working days before trusting it unattended. Production label numbering, invoicing, and manifest cutoffs behave differently than sandbox in ways documentation doesn't always spell out.
How to confirm it's actually working
You know the integration is live, not just "technically connected," when four things happen in sequence without manual intervention. First, the test shipment you created via API shows up in DPD's own web portal with matching reference numbers. Second, the label PDF generated by your system actually scans at a DPD depot, not just renders correctly on screen. Third, a tracking call against that parcel number returns a full event history rather than a single "created" event. Fourth, your manifest PDF lists exactly the parcels handed to the driver that day, no more, no fewer. If any of those four fail, don't move to production credentials yet.
Failure mode: token expiry and the multi-country assumption
The two mistakes that cost integrators the most time both show up after the "working" demo, not during it.
The first is token expiry mid-batch. DPD's token lifetimes vary by entity, but the pattern is consistent: tokens are time-boxed and calls made after expiry fail with an authentication error rather than a graceful retry prompt. DPD Belgium's own developer guidelines are explicit about this: once the authentication has expired, every DPD Shipper Webservice service will provide errorCode LOGIN_5, meaning the authentication token is invalid, and a good time to call the login service and generate a new authentication token is 24 hours and a few seconds after the first request was made. If you're batching a few hundred shipments overnight, a token that expires mid-run silently fails the back half of the batch with 401s. Build a refresh-before-expiry routine, not a retry-after-failure one.
The second, more expensive mistake is treating "DPD" as one API. Sendcloud's own integration notes for multicollo shipments make this concrete: multi-parcel shipments are only supported for DPD contracts in the Benelux, Germany and France provided the standard DPD API is used, and DPD CloudService Germany is a separate, older API that is no longer actively developed and does not support multicollo shipments. That means two companies both labeled "DPD Germany" in your carrier list might be running on entirely different backend systems with different feature support. During contract setup, users must explicitly choose which DPD API they connect to, and if multicollo functionality matters, the integration needs to be set up with DPD Germany or DPD Belgium or DPD Netherlands, not CloudService. Ask DPD directly, in writing, which API variant your contract uses before you build against it.
A smaller but recurring third issue: address and postal code validation rules differ by country entity, so a payload that passes validation against the Swiss endpoint may get rejected against the Baltic one over formatting a street number or house number field differently. Test with real addresses from every country you ship to, not just your home market.
EDI vs. API for parcel carriers: when each makes sense
If you're used to EDIFACT messaging with your FTL and LTL carriers, this REST/JWT approach will feel foreign at first, and that's fine. EDI with IFTMIN and IFTSTA over AS2 makes sense when a carrier already runs it with your other trading partners and you have EDI infrastructure in place. Parcel carriers like DPD are a different animal: volumes are higher, shipments are smaller, and the API-first players publish documentation, Swagger specs, and a sandbox precisely because they expect developers, not EDI mapping specialists, to build the connection.
This is also exactly the gap that multi-carrier shipping platforms exist to close. Sendcloud is a European multi-carrier shipping platform that aggregates shipping services from carriers including DPD, DHL, GLS, UPS, FedEx and bpost under a single API and dashboard, so you integrate once instead of per DPD entity. ClickPost takes a similar approach from the tracking side: it can automatically synchronize status updates for DPD shipments, with its tracking APIs periodically pulling real-time shipment information from DPD's API endpoint and mapping it into a standardized format. ShippyPro, Easyship, and nShift run comparable abstraction layers, and connectivity-focused platforms like Cargoson fold this per-carrier maintenance into a broader TMS layer rather than leaving it as a one-off developer project. The trade-off is the usual one: build direct if DPD volume justifies the engineering time and you want full control over every field, buy the abstraction if you're connecting five or more carriers and don't want to relearn this exercise for GLS, bpost, or DPD's next API version.
Quick reference: DPD API endpoint groups
| Endpoint group | Purpose | Notes |
|---|---|---|
| Authentication | User login and token generation | JWT on some entities, basic auth exchange on others |
| Shipments | Create shipments with automatic label generation | Service alias (B2BI, B2C, PSD) determines delivery type |
| Manifests | Generate a manifest PDF for shipments handed over to DPD | Required for end-of-day driver handover |
| Tracking | Real-time parcel status and event history | Queried via GET on the parcel number, bearer JWT required |
| Parcel Shops | Search and retrieve pickup point details | Needed for PSD/parcel shop delivery flows |
| Collection Requests | Schedule one-time parcel collections | Separate from recurring pickups |
| Pickup Orders | Create recurring pickup schedules | Set once per shipping location |
Start by confirming your exact DPD entity and pulling its current documentation rather than reusing a PDF a colleague downloaded two years ago, since DPD revises these specs regularly. Build authentication and a single sandbox shipment first, get a clean "pending" status back, then layer in tracking and manifests. If you're connecting more than two or three carriers this year, run the direct-build cost against what Sendcloud, ClickPost, or Cargoson would charge before committing engineering time to a connection you'll have to rebuild the moment DPD ships its next API version.