Routing orders between two Courier APIs (DPD age-verified vs standard) on Shopify

Topic summary

A UK Shopify merchant selling both alcohol and fresh produce faces a shipping challenge with DPD courier service. DPD requires all shipments use age-verified delivery (no safe place drop-off) because the merchant sells alcohol, even though most orders don’t contain it.

The Problem:

  • Age-verified delivery means parcels return if customers aren’t home
  • Fresh/temperature-sensitive items must be discarded and refunded
  • Mixed baskets (alcohol + non-alcohol) would require splitting into 2 shipments at higher cost

DPD’s Suggestion:

  • Open two separate DPD accounts (age-verified + standard)
  • Use two different API integrations on Shopify

Core Question:
Can Shopify route orders to different DPD accounts/API tokens based on product metadata (e.g., “requires_age_verification = true”)? How would token switching work at label creation?

Considered Solutions:

  • ShipStation split shipping (but costs ~£55/month and merchant wants to stay in DPD portal)
  • Custom middleware or app
  • Clearer front-end messaging about delivery restrictions

The discussion seeks technical guidance on conditional API routing between two courier accounts from a single Shopify store.

Summarized with AI on November 5. AI used: claude-sonnet-4-5-20250929.

Hi all,

I’m a front-end dev working with a UK merchant using DPD(courier) via the Shopify DPD API integration. Because they sell alcohol as well as fresh produce (meat & cheese), DPD have put them on an age-verified only service(as they do not supply a mixed service). That means every DPD shipment has to be handed to the customer (no safe place). When a customer isn’t in, the parcel goes back and the fresh/temperature-sensitive items have to be binned/refunded.

What DPD suggested: open two DPD accounts — 1) age-verified, 2) standard — and add a second DPD API to Shopify.

Our concerns:

  1. Two DPD accounts = two API tokens, that are tied to the account.

  2. What we actually need is: “If order contains alcohol → send via age-verified DPD API; else → send via standard DPD API”

  3. But I’m not sure Shopify + DPD can conditionally call different DPD accounts/APIs at fulfilment time based on line-item rules. Is that even possible?

Things we considered:

  • ShipStation split shipping to split/reroute orders. The problem: mixed baskets (alcohol + non-alcohol) would effectively mean 2 shipments / higher cost, and they still want everything in DPD / DPD portal. Also ShipStation is ~£55/month, so feels heavy just to solve this.

  • Clearer front-end messaging (“age-verified delivery,” “can’t leave in a safe place,” “fresh product”) — we’ve done this to manage expectations.

Question for the community:

Has anyone actually run two DPD(or other courier) accounts from one Shopify store and routed orders to the correct courier API token based on product tags/metafields (e.g. “requires_age_verification = true”)? If so:

  • how did you switch tokens/accounts at the point of creating the label?

  • was it native, via an app, or custom middleware?

Thanks!

Hello,

If you are interested in getting the shipping fees solution only (without fulfillment), our app JsRates might be help with this. We can setup two separate shipping rates based the two APIs (assuming the APIs return shipping quotes) and we can also display two separate shipping rate messages at checkout (such as, “age-verified delivery,” “can’t leave in a safe place,” “fresh product”). The app handles only shipping fees - it does not handle fulfillment. If you are keen, contact customer support in the app for further discussion.