07398 946 380
07398 946 380
DPD API

DPD API Integration: A Complete Guide for UK Businesses

28 April 2026 7 min read

The DPD API gives UK ecommerce businesses programmatic access to DPD’s parcel shipping services — creating shipments, generating labels, retrieving tracking data and booking collections, all without anyone manually logging into DPD’s portal or Click & Send interface. For businesses shipping significant volumes with DPD, a custom integration removes the entire manual despatch process: labels generate automatically when orders are placed, tracking updates flow back to the customer, and the driver picks up without any manual steps. This guide covers how the DPD API works, what it automates and what a production-ready integration looks like.

Getting access to the DPD API

DPD’s API access is different from many other APIs covered on this site. There’s no self-serve developer portal where you can sign up and get an API key immediately. DPD provisions API credentials directly through their business account team — you need an active DPD Business account and need to contact DPD to request API access. DPD then supplies your account number, username and password for their API environment.

This is worth knowing before planning a timeline. API credential provisioning typically takes a few days to a couple of weeks depending on DPD’s workload and your account status. Development can proceed in parallel using test data, but end-to-end testing requires live credentials. Starting the credential request process early — ideally at the same time as commissioning the build — prevents it from delaying the go-live date.

How DPD API authentication works

The DPD API uses account-based authentication — your DPD account number, username and password sent with every API request, either as HTTP Basic Auth headers or embedded in the request payload depending on the endpoint version. This is simpler than OAuth flows and does not involve token expiry or refresh logic.

Credentials must be stored server-side and never exposed in client-facing code. The standard proxy pattern applies: your platform sends a request to your own server, the server calls the DPD API with the credentials, and the response is returned. This protects credentials and means they can be rotated without touching any client-side code.

DPD provides a test environment with separate test credentials. All integration development happens against the test environment — shipments created in test mode don’t generate real labels or real collections. The switch to production is a matter of swapping the endpoint URL and credentials.

What the DPD API returns

Shipment creation. The core API call. You submit the recipient address, package weight, dimensions and service type. DPD validates the address, creates the shipment record and returns a consignment number and parcel number. These reference numbers are the basis for label generation and tracking.

Label generation. Labels are generated immediately after shipment creation. DPD returns the label as a base64-encoded PDF or ZPL (for thermal printers). The label includes the DPD barcode, recipient address, service indicators and all routing information DPD needs to deliver the parcel. Labels can be sent directly to a printer queue or stored for batch printing.

Tracking. The DPD tracking API returns real-time parcel status events using the consignment number. Events include: collected, in transit, out for delivery, delivered, failed delivery attempt. These can be pulled into your customer-facing order tracking page, used to send automated despatch notifications, or pushed to your CRM.

Collection booking. For businesses without a standing daily collection, the API supports querying available collection slots and booking a collection. Available slots are returned for your postcode with date and time windows. Once a slot is selected and booked, DPD confirms the collection reference. For businesses with a standing daily DPD collection (the most common setup), this API call isn’t needed — the driver turns up at the agreed time regardless of what the API does.

DPD service codes

DPD’s service range is specified in the shipment creation call using service codes. The most commonly used services in UK ecommerce integrations:

DPD Classic — standard next-day delivery. The default for most domestic B2C parcels. Delivered by DPD’s own drivers with a one-hour delivery window SMS notification to the recipient.

DPD Express — timed delivery options including pre-10:30am, pre-12:00pm and Saturday. Higher cost, used for time-critical or high-value shipments.

DPD Two Day — for less urgent shipments where next-day speed isn’t required. Lower cost than DPD Classic.

DPD International — international parcel shipping. Domestic DPD accounts with international capability can access European and global destinations through the API with the appropriate service codes.

DPD Pickup — delivery to a DPD Pickup shop rather than a home address. The API supports specifying a Pickup point as the delivery address.

Address validation

DPD performs address validation on every shipment creation request. Invalid addresses — postcodes that don’t exist, address formats that don’t match the postcode, missing required fields — return validation errors rather than creating the shipment. The integration needs to handle these errors explicitly: logging the error, flagging the order for manual review with the specific validation issue shown clearly, and preventing the order from being silently left unshipped.

Client-side postcode validation before the API call catches the most common address errors early and gives the customer a faster feedback loop than waiting for an API error. The Postcodes.io API (free, no authentication required) can validate UK postcodes and return address components in real time as the customer types.

For the full service details, see the DPD API integration service. For WooCommerce specifically, see DPD API integration for WooCommerce. For how DPD compares with Royal Mail, see DPD API vs Royal Mail API. For what the build costs, see DPD API integration cost.

Related posts

Weight and dimension limits

DPD has weight and dimension limits per parcel that vary by service. Standard DPD Classic parcels are accepted up to 30kg with a combined length plus girth of up to 300cm. Oversize or overweight items trigger specific handling requirements or may not be accepted on standard services. The integration should validate package weight and dimensions against the selected service’s limits before making the API call — catching out-of-range shipments early and flagging them for manual handling rather than allowing them to create API errors in the despatch queue.

For businesses shipping a mix of standard and large items, service selection logic can automatically route oversize items to appropriate services or flag them for manual booking rather than attempting to create them through the standard API flow.

Returns labels

DPD supports returns label generation through the API. A returns label uses the same consignment structure as an outbound label but with the origin and destination reversed — your warehouse becomes the destination. Returns labels can be generated at the time of the original shipment and included in the parcel, generated on request when a customer initiates a return, or generated automatically when a return is approved in your order management system.

Returns via DPD can also use DPD Pickup points as the drop-off location, which is a more convenient option for customers who can’t arrange a home collection. The returns label specifies the drop-off network and the customer can take the parcel to any DPD Pickup shop.

Multi-parcel shipments

For orders that require multiple parcels — a large order split across two boxes, or a heavy item that needs two packages — the DPD API supports creating multi-parcel shipments in a single API call. Each parcel in the shipment gets its own barcode and label but they’re linked under a single consignment number. Tracking shows all parcels in the consignment as a group, and the delivery is confirmed only when all parcels have been delivered. The integration handles multi-parcel creation based on order weight and package count rules configured during scoping.

If you need help integrating the DPD API into your ecommerce store or internal systems, I can help. I build custom shipping API integrations for UK businesses. See API integration pricing or get in touch to discuss your project.

Need a custom integration built?

I build custom API integrations — Stripe, Companies House and bespoke data pipelines. Reliable, well-documented, no agency overhead.

Discuss your project →