Architecture
Multi-Carrier Tracking Architecture: Build, Buy, or Combine Both?
An engineering decision guide for official carrier APIs, aggregators, scraping fallbacks, normalized events, resilience, compliance, and the true cost of multi-carrier tracking.
The first carrier integration is deceptively easy. The tenth changes the shape of the system: credentials expire on different schedules, statuses conflict, tracking numbers overlap, webhook guarantees vary, and international handoffs introduce carriers the merchant never selected.
Teams usually choose among three approaches: integrate official APIs directly, buy a normalized aggregator, or combine authoritative carrier connections with a normalized layer and controlled fallbacks. The right choice depends on coverage, operational depth, time to market, and the cost of being wrong.
Direct carrier integrations
Official APIs provide the deepest data and clearest commercial relationship. They are the right foundation for label purchase, claims, pickup scheduling, proof of delivery, and carrier-specific operations. If your network is genuinely limited to one or two strategic carriers, direct integration can be efficient.
The cost is multiplication. Every carrier adds onboarding, authentication, sandbox behaviour, schemas, status mapping, rate limits, outages, and version migrations. The long tail of customer-entered tracking numbers remains uncovered.
Normalized tracking providers
An aggregator offers one contract across many carriers: submit a number, receive a detected carrier, normalized status, event history, and often webhooks. This shortens launch time and keeps product code independent of carrier vocabulary.
Evaluate providers on successful tracked shipments, not catalog size alone. Ask how they distinguish no data from upstream failure, expose source freshness, handle handoffs, retry webhooks, and communicate degraded coverage.
Controlled fallback sources
Some networks have no accessible official API or offer poor coverage outside a contracted shipper account. Fallback sources can fill gaps, but they introduce legal, reliability, latency, and anti-automation risk. They need explicit monitoring and graceful failure rather than a silent empty response.
Use a source registry with health scores, timeouts, block detection, and circuit breakers. Preserve which source produced the result internally so engineers can investigate quality without exposing upstream implementation details to customers.
Normalize without erasing evidence
A compact status enum makes product logic stable, but raw carrier events remain valuable evidence. Store both. The normalized status powers UI, alerts, and analytics; the original description, time, and location support customer service and mapping improvements.
Version the mapping logic. When a rule changes, you should know whether historical statuses were produced by an older parser rather than assuming the carrier changed its data.
Design the request path for partial failure
Carrier networks will fail independently. Bound every source with a timeout, avoid retrying all sources in parallel without limits, cache recent success, and return a structured upstream-unavailable error when no source is usable. A fabricated pending response is worse than an honest temporary failure because it looks like shipment truth.
Attach a request ID to every call and correlate it with source attempts, parsing outcomes, cache operations, and customer webhooks. This turns a vague support report into an inspectable trace.
Compare total cost, not price per lookup
Direct APIs can look free while consuming engineering and on-call time. Aggregators can look expensive while replacing months of integration work. Fallback infrastructure adds browser compute, proxies, monitoring, and maintenance. Model all four categories over the expected shipment volume.
Also price failure: support contacts, reshipments, missed exceptions, and customer churn. The cheapest lookup is not valuable if it returns stale or misleading information.
A pragmatic hybrid roadmap
Start with one normalized contract so product teams can ship. Measure actual carrier mix and lookup success. Add direct sources where volume or operational depth justifies them, and keep carefully monitored fallbacks for the remaining long tail. The application should not change when the source strategy does.
Trace is built around this separation: one developer-facing API, carrier auto-detection, source failover, normalized events, caching, and signed webhooks. It lets the source layer evolve while customer integrations remain stable.
Build tracking into your product
Create a Trace account, generate an API key, and test package tracking from the dashboard.