Integrations

Carrier integration API: what one endpoint abstracts, and what it leaves to you

A multi-carrier API removes credential handling, format translation and polling. It does not remove the fact that carriers disagree about what a service is, what a label contains and what “delivered” means. The leaks are where integration projects overrun.

The short answer

A multi-carrier API is worth buying for the mechanical work and dangerous to trust for the semantic work. Authentication schemes, endpoint shapes, label formats, tracking polls and error codes are tedious, genuinely different per carrier, and change without notice. That is real work and it is reasonable to rent.

What does not abstract away is meaning. Which service level a carrier considers equivalent to another, what a surcharge is called, what has to be printed on a label for a given lane, and whether “delivered” means handed over, left at a door, or scanned at a depot. Those differences survive every layer you put on top, and they are what a support queue is made of.

What the abstraction genuinely removes

It is worth being specific about the value, because the criticism that follows is not an argument for building it yourself. A good multi-carrier layer removes:

  • Credential and account management. Every carrier has its own onboarding, its own test environment, and its own idea of how a token is refreshed. Holding that in one place rather than in each service that ships parcels is a straightforward win.
  • Protocol and format differences. REST, SOAP, XML with a schema from 2009, a CSV drop on an SFTP share. Normalising these into one request shape is unglamorous and expensive to maintain.
  • Label rendering. ZPL, PDF, PNG, EPL; different page sizes; different barcode placements. Producing a consistent artefact is a solved problem only if someone has already solved it.
  • Tracking surveillance. Carriers differ on whether tracking is push or pull, how often you may poll, and how they throttle. A layer that polls centrally and emits a normalised event stream saves each consumer from implementing it.
  • Error taxonomies. Mapping hundreds of carrier error codes onto a small set your own systems can act on — retryable, address problem, service unavailable, account problem.
  • Rate shopping. Querying several carriers for the same shipment and comparing like for like, which requires normalising surcharges before you can compare anything.

That is a substantial list. If your alternative is four engineers maintaining four carrier integrations, the case is not close.

Where it leaks

The leaks are predictable, and they are all the same kind of thing: the API can translate format, but it cannot decide policy. Six that show up in almost every integration:

Service levels are not comparable

Carrier A’s “express” and Carrier B’s “express” are different products with different cut-offs, different transit commitments and different delivery windows. An API can return both. It cannot tell you they are equivalent, because they are not — and the moment you treat them as one service in your own data model, your delivery promises become approximate.

Surcharges are named differently and applied differently

Oversize, overweight, remote area, residential delivery, fuel, peak season, address correction. The names differ, the thresholds differ, the calculation bases differ, and some are assessed after the fact rather than quoted. A rate response that looks comparable across carriers frequently is not, and the difference only appears on the invoice.

Label content rules are lane-specific

What must appear on the label depends on origin, destination, service and commodity — a customs declaration block, a specific barcode symbology, a required returns address, an IOSS number. A generic label renderer produces something printable; whether it clears is a separate question that surfaces at the border.

“Delivered” means different things

Scanned at the depot, out for delivery, handed to a person, left in a safe place, delivered to a neighbour, delivered to a pickup point. Normalising these into one status destroys the distinction that determines whether you have a proof of delivery and whether a claim will be paid. Most API layers expose both a normalised status and the raw one; use the raw one for anything that touches money or liability.

Returns are not the mirror of outbound

Some carriers issue a return label from the same endpoint. Some require a separate contract. Some only support returns to the original sender. Some treat a return as a new shipment with new charges. Building a returns journey on the assumption that it mirrors outbound is one of the more expensive assumptions in this space.

Local exceptions are invisible until they are not

Restricted commodities by destination, embargoes, holidays that are not national, addresses the carrier will not serve, cash-on-delivery rules. An abstraction layer will happily accept a shipment the carrier will later refuse, because the refusal is a business rule rather than a schema violation.

The semantic problems nobody scopes

Two consequences follow, and they explain most of the overrun on integration projects.

Someone still has to own the mapping. Deciding that Carrier A’s service 24 corresponds to your internal “next day” is a business decision with a cost attached, and it has to be revisited when the carrier changes its portfolio. It is not a one-off configuration; it is a maintained artefact. Projects that treat it as setup work end up with a mapping table nobody owns and a growing set of shipments routed to the wrong service.

Rate comparison is a modelling problem, not an API problem. To compare carriers honestly you need to normalise surcharge structures, apply your own volume and contract terms, and decide what to do about charges that are assessed after the fact. An API can give you the numbers. It cannot give you the model, and without one, “cheapest carrier” is a number you should not act on.

How to evaluate one

The questions that separate a genuine abstraction from a thin proxy:

  • Does it expose the carrier’s raw response alongside the normalised one? If not, you cannot debug a discrepancy, and you cannot use the raw status where it matters.
  • How are surcharges modelled? Ask to see a rate response for a shipment that attracts three surcharges across two carriers, and check whether the two are actually comparable.
  • What happens when a carrier changes an endpoint? Who notices, how fast, and does it appear in your logs or as failed shipments?
  • Is there a sandbox per carrier, and does it behave like production? Sandboxes that return fixed responses do not catch anything.
  • How is label content configured? Per carrier, per lane, per commodity, or hard-coded per carrier in a template you cannot edit?
  • What is the tracking model? Push or poll, what latency, and what does the normalised event look like — including whether raw status is preserved.
  • How do returns work? Same endpoint or separate flow, and does the commercial model match outbound.
  • What is the failure story? When a carrier API is down, does your shipment queue, fail, or silently fall back to another carrier?

What actually locks you in

Switching cost is usually misjudged. The API call is the easy part; a competent team can repoint an endpoint in days. What takes months is everything that accumulated around it:

  • The service-level mapping you built against their taxonomy, and the delivery promises your customers have been given against it.
  • Historical shipment and tracking data in their schema, which your customer service, claims and analytics all query.
  • Label templates tuned to a particular rendering behaviour.
  • Operational habits — which service the warehouse picks by default, what the exception process assumes.

The practical implication is that the decision to switch should be made on the semantic layer, not on the API surface. If a provider gives you the raw carrier data, keeps its mapping configurable and documented, and lets you export your history in a usable shape, switching is a project. If it hides the raw data behind a normalised status you cannot inspect, switching is a rewrite.

Which suggests the design rule: keep your own mapping and your own shipment record, and treat the integration layer as a transport. That keeps the decision reversible, and reversibility is most of what you are buying when you buy an abstraction.

Build, buy, or both

The honest split, in most operations:

  • Buy the transport. Credentials, formats, label rendering, polling, error normalisation. This is commodity work with no competitive advantage in doing it yourself.
  • Own the semantics. Service mapping, surcharge modelling, which carrier for which lane, what a delivery promise means, how exceptions are handled. This is your operation, and it is the part that determines whether your costs match your quotes.

A useful test of any integration layer is whether it lets you do the second while doing the first for you. If it insists on owning the mapping, you have outsourced a business decision to a vendor and taken on a switching cost you will discover later.

Connecting carriers without rebuilding it per client?

ByLogic exposes rates, labels, tracking and proof of delivery through one integration surface, with the carrier mapping kept as configuration you control. Book a review and we will map it against the carriers and lanes you actually run.

Book a free automation review