Royal Mail API Integration Shopify: UK Carrier Patterns (2026)
No7 Engineering Team
Growth Architecture Unit

Directly calling Royal Mail, Evri, and DPD UK APIs bypasses fragile middleware and secures the sub-200ms response times needed for high-volume checkout. By building a custom Royal Mail API integration for Shopify, you keep direct control over parcel routing and tracking ingestion without paying aggregator transaction fees. Here is how to architect these direct integrations cleanly.
Why direct carrier integration beats aggregator middleware
In our experience, relying on pre-built shipping aggregator apps to handle carrier operations is a performance liability for merchants in the £1M-£15M GMV band. Every aggregator adds an extra HTTP hop — in the stacks we audit that typically costs a few hundred milliseconds at checkout — and shared rate limits are a recurring failure point during peak trading periods like Black Friday. Directly calling carrier APIs ensures that your checkout remains resilient, fast, and fully under your own engineering control.
Building directly to Royal Mail, Evri, and DPD also sidesteps the silent margin erosion of per-label transaction surcharges. A custom implementation allows you to negotiate directly with carriers using your own business account rates. In our work with Plus merchants, we built custom integrations that completely eliminated these platform dependencies, allowing the team to handle over 10,000 dispatches daily without middleware failure.
Royal Mail Pro Shipping vs Click & Drop APIs
Wiring Royal Mail into Shopify starts with a choice between the simpler Click & Drop API and the higher-volume Pro Shipping API, driven by daily dispatch volume. Small merchants sending under 100 items a day typically find Click & Drop sufficient, whereas high-volume merchants need the RESTful Pro Shipping API to automate complex routing at scale.
The Click & Drop API uses an API key authentication model and relies on a graphical user interface (GUI) for manual intervention — which usually means someone in your warehouse is going to spend their afternoon clicking 'retry' on failed labels. While easy to implement, it lacks the fine-grained control over customs documentation (CN22/CN23) and EORI details required for international trade. Once daily dispatch volume passes roughly 100 parcels, it is worth moving to the Pro Shipping API.
The Pro Shipping API (v4 is current; v3 clients remain widely deployed) is a RESTful service using OAuth2 client credentials via JWT from https://authentication.proshipping.net/connect/token. If you are developing in PHP, you can use a community-maintained Swagger-generated Royal Mail API client. This API supports offline barcoding and direct data streaming, allowing your warehouse management system (WMS) to generate shipping labels in less than 200ms. Crucially, the Pro Shipping API requires you to programmatically submit an end-of-day manifest to Royal Mail to confirm billing and initiate collections.
Evri API integration: Routing parcels and handling webhooks
An Evri API integration means working against their business API (partner account access required) to programmatically generate labels and establishing a robust webhook listener to ingest tracking events. Evri operates a UK-wide network of local couriers and ParcelShops, making accurate address routing and delivery-event ingestion critical to maintaining a healthy order timeline.
To create a shipment in Evri, your integration must authenticate via OAuth2 and make a POST request to the /api/parcels endpoint on https://api.business.evri.com/. Once the parcel is created, you fetch the corresponding label using the GET /api/labels/{barcode} endpoint, returning a high-resolution PDF or ZPL stream for direct thermal printing.
Tracking updates are handled asynchronously through Evri's tracking webhooks. Instead of polling their API, you must configure a listener that accepts POST payloads containing status transitions such as "Sorted at Depot" or "Out for Delivery". We recommend processing these webhooks via an asynchronous queue — like Amazon SQS — to prevent your server from timing out under high volume.
DPD UK API: Generating multi-package labels and consignments
Integrating DPD's UK API into a Shopify dispatch workflow means mastering the consignment model, which groups multiple packages under a single tracking reference. DPD is the premium option of the three, with a one-hour delivery notification window, but their API is notoriously strict regarding address validation and customs compliance.
To generate a DPD shipping label, your adapter sends a shipment-creation request containing the sender and receiver details, package weights, and service codes. DPD's API expects specific fields in the CarrierSpecifics object, such as DeliveryInstructions, and a valid EORI number for any European Union exports. The API returns a PDF file containing the barcodes and routing codes, which must be printed exactly to DPD's specifications to pass depot scanning audits. Get the spec wrong and the parcel bounces.
A common failure mode when writing a direct DPD integration is handling multi-package orders. DPD supports multi-package labels for almost all domestic services, with the exception of Expresspak and DPD Direct Lite, meaning your code must dynamically select the correct carrier service based on the total order weight and parcel count.
How do I build a unified rate-shopping engine at checkout?
To build a unified rate-shopping engine, you must implement a custom middleware service that queries Royal Mail, Evri, and DPD UK APIs in parallel and returns the cheapest or fastest option to the checkout within Shopify's connection limits. Shopify applies a dynamic read timeout to CarrierService rate requests — documented at 10 seconds below 1,500 requests per minute, tightening to 5 and then 3 seconds as volume rises. A rate-shopping service has to respond inside that window or checkout falls back to default flat rates.
The CarrierService API callback payload includes the order total, items, and destination address. Your middleware must parse this payload, calculate the total dimensional weight, and fire parallel HTTP requests to each carrier's rate endpoint. To prevent slow carrier APIs from blocking checkout, your code must implement an internal timeout — comfortably inside Shopify's read window — that cuts off any non-responding carrier and returns the rates that did arrive. Slow carriers get dropped. The checkout stays fast.
To optimise performance, we recommend caching public retail rates and using Shopify's prepare_shipping_rates AJAX endpoint to pre-calculate rates while the customer is still browsing their cart.
UK Carrier Routing Decision Matrix
| Order Value | Total Weight | Primary Carrier | Backup Carrier |
|---|---|---|---|
| Under £30 | Under 2kg | Royal Mail Tracked 48 | Evri Standard |
| £30 - £150 | 2kg - 15kg | Evri Next Day | Royal Mail Tracked 24 |
| Over £150 | Any Weight | DPD 12:00 Next Day | Royal Mail Special Delivery |
Wiring a Shopify FulfillmentService to map tracking numbers
To ensure that tracking numbers land cleanly on the customer's order timeline, you must register a custom FulfillmentService via the Shopify GraphQL Admin API. This registration creates a dedicated location in the Shopify admin and tells Shopify that your custom code is responsible for completing fulfillments and updating tracking info.
When an order is ready for dispatch, your system queries the fulfillment orders associated with the order using the GraphQL Admin API. You then call the fulfillmentCreate mutation, passing lineItemsByFulfillmentOrder plus a trackingInfo object carrying the tracking number, URL, and the exact carrier name. If you are handling complex multi-location routing, review our guide on Shopify returns and RMA integration architecture to synchronize return labels.
With the automatic carrier detection features shipped in the Shopify Editions Spring 2026 release, Shopify can automatically identify tracking numbers for major UK carriers like Royal Mail, Evri, and DPD UK. However, to guarantee that tracking notifications are sent reliably, your code should explicitly set trackingInfo.company in the fulfillmentCreate input, bypassing the auto-detection heuristics entirely. Managing these API calls requires careful monitoring of your GraphQL cost budget, which is why we cover these patterns in detail in our analysis of Shopify GraphQL Admin API rate limits in production.
Architecting your UK carrier integration for long-term scale
Building direct carrier integrations is a major engineering commitment that pays off by giving you absolute control over your shipping latency, brand experience, and operating margins. If your annual GMV is under £1M, the development costs — which typically range from £15,000 to £60,000 depending on the number of carriers and WMS complexity — do not make sense, and you should stick to out-of-the-box shipping apps. However, once you cross into the £1M-£15M GMV band, a direct integration is the only way to support complex fulfilment flows without leaning on third-party middleware.
We recommend mapping out your carrier contracts and identifying the specific API versions they support. Start by implementing a single carrier — typically Royal Mail — and establish your webhook listener. Once verified in production, scale the system to include Evri and DPD UK, creating a resilient, multi-carrier setup that keeps checkout fast and shipping costs under control.
If you are ready to eliminate third-party shipping middleware and build a fast, reliable, and cost-effective UK carrier integration directly into your storefront, explore our Shopify integration services. Our team of senior engineers can help you architect, test, and deploy bespoke carrier adapters that hold up at ten times your current order volume.
Frequently Asked Questions
The questions buyers and engineers ask us most about this topic.
How much does a custom Royal Mail API integration Shopify project cost?
In our experience, a custom Royal Mail API integration Shopify project typically costs between £15,000 and £60,000. The total investment depends on the number of additional carriers — such as Evri or DPD UK — and the complexity of your Warehouse Management System (WMS) or ERP. For merchants in the £1M-£15M GMV band, this upfront engineering cost is offset by eliminating aggregator transaction fees and reducing checkout latency.
When does a direct carrier integration make sense vs an aggregator app?
A direct carrier integration makes sense if your store processes more than 100 orders a day or your annual GMV is over £1M. Aggregator apps are acceptable for smaller merchants, but they add an extra HTTP hop at checkout — typically a few hundred milliseconds in the stacks we audit — and shared rate limits bite during high-traffic events. Direct integrations give you sub-200ms label generation and complete control over multi-package consignments.
How does Shopify's Spring 2026 carrier auto-detection affect custom integrations?
Shopify's Spring 2026 carrier auto-detection automatically identifies tracking numbers for major UK carriers like Royal Mail, Evri, and DPD UK when entered manually. However, for programmatic fulfilments, your custom integration should still explicitly set trackingInfo.company on the fulfillmentCreate mutation. This bypasses the auto-detection heuristics entirely, ensuring that customer-facing tracking pages and email notifications are rendered reliably without silent failures.