Carrier API Integrations

Overview

Every carrier has an API. Every API is different. Different authentication models, different data structures for the same underlying concepts, different approaches to label generation, different tracking event schemas, different webhook implementations, different rate quote interfaces, different shipment creation flows, and different error handling conventions. Integrating with one carrier takes days of careful API study, implementation, testing, and edge case handling. Integrating with five carriers, maintaining those integrations as carriers update their APIs, and adding new carriers as the business grows is an ongoing engineering commitment that compounds in complexity with every carrier added.

The operational value of carrier integrations is immediate and direct. Labels generated within the order management or warehouse system without manual data entry into the carrier portal. Tracking data returned to the customer-facing systems without manual status updates. Rate quotes retrieved and compared at the point of shipment booking without checking multiple carrier portals. Collection bookings confirmed without a telephone call. These are the efficiencies that carrier integrations deliver — and the operational overhead that businesses without them carry as a tax on every shipment they process.

We build carrier API integrations for logistics operations, e-commerce businesses, 3PL providers, and any organisation that ships products through multiple carriers and needs those carrier relationships to be integrated into their operational systems rather than managed through manual interaction with carrier portals. We build against the full range of carriers used by our clients — from the major national and international carriers to the specialist services that specific shipment types or routes require — and we maintain those integrations as carrier APIs evolve.


What Carrier Integrations Cover

Label generation. The primary function of most carrier integrations is label generation — creating a shipment record in the carrier's system and receiving the shipping label that is applied to the package. Label generation via API eliminates the manual data entry into carrier portals that is the alternative — reducing the time per shipment, eliminating the transcription errors that manual entry produces, and allowing label generation to be integrated into the packing workflow rather than requiring a separate step in the carrier portal.

Label generation needs to handle the full range of shipment parameters that carriers expose through their APIs — service level selection, package dimensions and weight, dangerous goods declarations, special handling instructions, delivery instructions, insurance declarations, and the carrier-specific parameters that specific services require. The integration maps the shipment data from the internal system to the carrier's API structure, handles the response, stores the tracking reference, and produces the label in the format the packing station requires — ZPL for label printers, PDF for standard printers.

Multi-label generation for shipments with multiple packages — each package in the shipment getting its own label with its own tracking barcode, all linked to the single shipment record — handles the common case in warehouse operations where a single order ships in multiple boxes.

Tracking and status updates. After a label is generated, the customer and the operations team need to know where the shipment is. Carrier tracking APIs expose the events that are scanned as the shipment moves through the carrier network — collection scan, hub processing, out for delivery, delivered, attempted delivery, exception. Retrieving these events and surfacing them in the operational and customer-facing systems gives everyone the visibility they need without manual status checks against carrier tracking portals.

Tracking integration has two models: polling and webhooks. Polling-based tracking retrieves the current status of each shipment at defined intervals — suitable for lower-volume operations or carriers that do not support webhooks. Webhook-based tracking receives status events from the carrier as they occur — reducing latency between the physical event and the system update, and eliminating the unnecessary API calls that polling makes when no status has changed.

For customer-facing tracking, the carrier's raw event data is translated into the customer-friendly status language that communicates progress clearly — not the carrier's internal scan codes, but the human-readable status descriptions that customers understand and that match the expectations the brand has set.

Rate quoting and carrier selection. For operations that choose the carrier and service level at the point of shipment booking — based on cost, transit time, service reliability, or destination accessibility — rate quote integrations retrieve live rates from multiple carriers simultaneously, allowing the best option to be selected programmatically or presented to the operator for selection.

Rate quote integration handles the parameters that carrier rate calculations depend on — origin and destination postcode, package dimensions and weight, service level, declared value, and the account-specific rate agreements that contracted rates depend on. The rate response is normalised across carriers — converting different rate structures and transit time formats into a comparable view — so that carrier selection logic can operate on consistent data regardless of how each carrier expresses their rate.

Carrier selection rules that automate the selection decision — always use the cheapest carrier within a defined transit time, use carrier A for domestic and carrier B for international, use carrier C for heavy items above a defined weight — reduce the manual selection decision to a configuration rather than an operational step.

Collection booking. For carriers that require collection bookings — a scheduled collection rather than a standing arrangement — collection booking APIs create the collection request and return the collection reference that the operations team needs to manage the pickup. Collection booking integrated with the dispatch workflow creates the collection request at the point the shipment is confirmed for dispatch, without requiring a separate booking step in the carrier portal.

Manifesting and end-of-day processing. Carriers typically require a manifest at the end of the day — a summary of all shipments handed over for collection, confirming to the carrier the shipments that are in their custody. Manifest generation via API produces the carrier's required manifest format from the day's shipment data, completing the end-of-day handover process without manual manifest preparation.

Returns management. Returns labels — pre-printed return labels included in the shipment, or on-demand return labels generated when the customer initiates a return — require the same carrier API integration as outbound labels but with the origin and destination reversed and the returns-specific service level applied. Returns label generation integrated with the returns management workflow produces labels at the point the return is authorised without requiring manual label creation.

Address validation. Carrier address validation APIs check delivery addresses against the carrier's address database before shipment creation — identifying incomplete addresses, incorrect postcodes, and undeliverable addresses before a label is generated and a shipment is sent to an address it cannot be delivered to. Address validation at the point of order entry or at the point of shipment creation catches the address problems that cause delivery failures and the costly redelivery or return that follows.


Carrier Coverage

The carriers we integrate with span the range of services that logistics operations use:

Dutch and Benelux carriers. PostNL — the primary Dutch domestic carrier with API coverage for label generation, tracking, returns, and the full range of PostNL consumer and business services. DHL Parcel Benelux — label generation and tracking for domestic and cross-border Benelux shipments. DPD Netherlands — label generation, tracking, and the DPD pickup point network. GLS Netherlands — label generation and tracking for business parcel services.

International parcel carriers. DHL Express — international express label generation, tracking, and rate quoting across the DHL Express international network. FedEx — international express and economy services via the FedEx API. UPS — international parcel and freight services via the UPS API. TNT/FedEx — integration for carriers operating under the TNT brand in specific markets.

Express and courier services. Same-day and next-day express courier services for time-critical shipments — carrier-specific API integration for the specialist express services that the operation requires.

Specialist and niche carriers. Pallet networks, chilled and frozen carriers, hazardous goods specialists, oversized freight carriers — the specialist services that specific shipment types require, integrated where the carrier provides an API and through file-based or manual integration where they do not.

Fulfilment platforms. SendCloud — the carrier aggregation platform used by many Dutch e-commerce operations, providing a single API interface to multiple carriers. MyParcel — the PostNL-based parcel platform with its own API abstraction layer. Integration with these aggregation platforms provides access to their carrier networks through a single integration rather than individual carrier connections.


Integration Architecture

Direct carrier integration. Building directly against each carrier's API provides the deepest integration and the greatest control — accessing all carrier capabilities, implementing carrier-specific logic, and not being constrained by what an aggregation layer exposes. Direct integration is the right approach when specific carrier capabilities are needed that aggregation platforms do not expose, when the shipment volume justifies the integration investment, or when the contractual rate agreements are specific to the carrier account and need to be applied directly.

Aggregation platform integration. Integrating through a carrier aggregation platform — SendCloud, MyParcel, Shippo, EasyPost — provides access to multiple carriers through a single, normalised API. The aggregation platform handles the individual carrier connections, the label generation, and the tracking retrieval for all connected carriers. This approach is faster to implement for multi-carrier coverage and reduces the maintenance burden of managing individual carrier API changes, at the cost of the limitations that the aggregation layer imposes on what is accessible from each carrier's API.

Hybrid approach. For many operations, the right architecture combines direct integration with strategic carriers — where the volume and capability requirements justify it — with aggregation platform integration for the remaining carriers. This provides deep integration with the primary carriers and broad coverage through the aggregation layer without requiring direct integration investment for every carrier in the portfolio.

Normalisation layer. Regardless of whether integration is direct or through aggregation platforms, a normalisation layer above the carrier integrations presents a consistent interface to the operational systems that consume carrier data — a single label generation function, a single tracking event model, a single rate quote structure — that abstracts the carrier-specific differences. When a carrier changes their API or a new carrier is added, the change is contained within the normalisation layer rather than requiring changes throughout the operational systems.


Error Handling and Resilience

Carrier APIs fail. Rate limits are hit. Services are temporarily unavailable. Response times spike during peak periods. Carrier systems have maintenance windows. Label generation requests that fail silently — or that fail with an unhelpful error message that the operational system does not handle — leave shipments without labels and operations teams without the visibility to know why.

Carrier integration reliability requires explicit error handling at every failure point:

Transient failure retry. API calls that fail with transient errors — network timeouts, temporary service unavailability, rate limit responses — are retried with appropriate backoff rather than failing immediately. Retry logic handles the difference between errors that should be retried and errors that indicate a genuine problem with the request data.

Circuit breaker patterns. When a carrier API is consistently failing, continuing to send requests compounds the problem and delays the detection of the failure. Circuit breaker patterns detect sustained failure conditions, open the circuit to prevent further requests during the outage, and close it again when the service recovers.

Fallback routing. For operations where shipment continuity is critical, fallback routing logic automatically routes shipments to an alternative carrier when the primary carrier's API is unavailable — ensuring that shipments continue to move even when a carrier integration is degraded.

Operational alerting. Carrier API failures, sustained error rates, and unusual response latency are surfaced through operational alerts — giving the logistics team visibility into integration health before failures affect shipment processing.


Technologies Used

  • Rust / Axum — high-performance label generation service, tracking event processing, rate quote aggregation
  • C# / ASP.NET Core — carrier API client implementations, complex shipping logic, enterprise system integration
  • React / Next.js — carrier integration management interface, label preview, tracking visibility dashboards
  • TypeScript — type-safe API client code and frontend throughout
  • SQL (PostgreSQL, MySQL) — shipment records, tracking history, rate quote logs, carrier configuration
  • Redis — rate limit management, tracking event queuing, circuit breaker state
  • PostNL API — Dutch domestic carrier integration
  • SendCloud API — carrier aggregation platform integration
  • MyParcel API — PostNL-based parcel platform integration
  • DHL Express / DHL Parcel APIs — international and domestic DHL integration
  • FedEx / UPS / GLS / DPD APIs — international and domestic carrier integrations
  • ZPL / PDF — label format output for thermal and standard printers
  • REST / Webhooks — carrier API connectivity and tracking event receipt
  • SMTP / SMS — shipment and tracking notification delivery

The Operational Cost of Manual Carrier Management

Every shipment processed through manual carrier portal interaction rather than API integration carries a cost — the time to enter the shipment data, the risk of transcription errors, the delay between shipment creation and tracking visibility, the manual effort of copying tracking numbers back to the order management system, the separate end-of-day manifesting step. At low volumes this cost is manageable. At the volumes that growing logistics operations handle, it becomes a significant operational overhead that scales with every shipment added.

Carrier API integration converts this per-shipment overhead into a fixed infrastructure investment — paid once, producing efficiency on every shipment thereafter. The break-even point depends on shipment volume and labour costs, but for most operations processing more than a few hundred shipments per month, the integration investment is recovered quickly and the ongoing benefit is substantial.


Every Carrier, Integrated

The carrier portfolio of a logistics operation is not static — new routes are added, new services are required, carrier performance changes, new entrants offer better terms. Carrier integrations built with a normalisation layer that abstracts carrier-specific differences make adding a new carrier a contained integration task rather than a project that touches every system in the operation.