Home / Insights / Business Operations and Integration

Business Operations and Integration

Building a TMS Integration Layer: Connecting Carriers Through EDI, APIs and Everything in Between

A transport management system is only as useful as its connections to carriers. Some carriers speak X12 EDI over AS2, some offer modern REST APIs, and some still send spreadsheets by email. This guide explains how to build an integration layer that absorbs that variety without rewriting the TMS each time you add a carrier.

TopicsBusiness Operations and IntegrationArchitecture and Modernization

Key takeaways

  • Separate carrier connectivity from TMS business logic: a canonical shipment model plus one adapter per carrier keeps the core stable as the carrier base grows.
  • Expect to support several channels at once (EDI, REST APIs, files and portals) for years; design for mixed connectivity rather than waiting for every carrier to offer an API.
  • Normalise carrier status codes into your own small event vocabulary; customers and dispatchers should never see raw carrier codes.
  • Track every message end to end, including acknowledgements, so you can prove what was sent, when, and whether the carrier accepted it.
  • Measure carrier onboarding time; a good integration layer turns a new carrier from a project into a configuration and mapping task.

Shippers, freight forwarders and third-party logistics providers often discover the same thing a year after rolling out a TMS: planning and rating work well, but carrier connectivity is a constant drain. Each new carrier needs a different format, a different transport and a different interpretation of what “delivered” means. Tenders go unanswered because an acknowledgement was lost, tracking pages show stale statuses, and freight invoices are matched by hand.

This article is for logistics IT leads, operations managers and founders of logistics platforms who need carrier connectivity that scales. It covers the main connectivity options, a reference architecture for an integration layer, the core message flows, reliability techniques, and the build-or-buy question. It reflects how we approach logistics software projects, where integrations with TMS and WMS platforms are agreed up front, through APIs or file-based exchange, before any feature work begins.

The underlying idea is simple: the TMS should think in terms of shipments, tenders, events and invoices. Everything carrier-specific belongs in a layer underneath it.

Why does a TMS need a dedicated integration layer?

Most TMS products ship with some carrier connectors. They rarely cover every carrier a business uses, especially regional hauliers, couriers in new markets or partners acquired through growth. Teams then bolt on custom code inside the TMS, and within a couple of years the system is full of carrier-specific branches that nobody wants to touch.

The variety you are absorbing

  • Formats: ANSI X12 and UN/EDIFACT EDI, carrier-specific JSON or XML, CSV files, PDF documents.
  • Transports: AS2, SFTP, value-added networks, HTTPS APIs, webhooks, email.
  • Semantics: different status code sets, reference number conventions, time zone handling and rules for partial deliveries.
  • Behaviour: synchronous responses, asynchronous acknowledgements, batch windows and rate limits.

What the layer gives you

  1. A stable core. The TMS calls one internal interface regardless of carrier.
  2. Faster onboarding. A new carrier means a new adapter and mapping, not changes to planning logic.
  3. Observability. One place to see every message, its status and its errors.
  4. Portability. If you replace the TMS later, carrier connections survive.

Action: list your current and expected carriers with their available channels. If more than a handful need custom work, a dedicated layer is likely to pay back quickly.

What are the carrier connectivity options, and how do they compare?

EDI (X12 and EDIFACT)

EDI remains the backbone of large-carrier connectivity, particularly for truckload and less-than-truckload in North America. X12, chartered by the American National Standards Institute, maintains the transaction sets most motor carriers use, including the 204 Motor Carrier Load Tender, the 214 Transportation Carrier Shipment Status Message and the 210 Motor Carrier Freight Details and Invoice. In Europe and Asia, EDIFACT messages fill similar roles. EDI is mature and widely supported but rigid, and each partner usually has its own implementation guide that tweaks the standard.

EDI transports: AS2, SFTP and VANs

AS2, defined in IETF RFC 4130, carries EDI or other structured data over HTTP with optional S/MIME signing and encryption, and returns a Message Disposition Notification (MDN) as a receipt. A signed MDN includes a hash of the received content, which gives you non-repudiation of delivery. SFTP is simpler but provides no built-in receipt. Value-added networks handle routing and mailboxing for a fee.

Carrier REST APIs

Many parcel carriers and newer freight carriers offer APIs for rating, booking, labels and tracking, often with webhooks for status updates. They are faster to develop against and return errors immediately, but versions change, rate limits apply and authentication schemes vary.

Aggregators and connectivity platforms

Third-party platforms normalise many carriers behind one API. They shorten time to market for parcel and common carriers, at the cost of per-transaction fees, another dependency and sometimes less control over carrier-specific features.

Files, email and portals

Smaller carriers may only exchange CSV files, emailed spreadsheets or require manual entry in a portal. These still need a place in the architecture, even if the adapter is a document-processing step or a structured form for a dispatcher.

ChannelTypical carriersStrengthsWeaknessesOnboarding effort
EDI over AS2Large truckload, LTL, ocean and railStandardised, receipts via MDN, widely supportedPartner-specific guides, certificate management, batch-orientedMedium to high per partner
EDI over SFTP or VANMid-size carriers, forwardersSimple transport, familiar to carriersNo native receipts (SFTP), VAN feesMedium
Carrier REST APIParcel, digital freight carriersReal time, immediate errors, webhooksVersion churn, rate limits, varied authLow to medium
Aggregator APIParcel and common carriersMany carriers via one integrationFees, dependency, feature gapsLow
Files, email, portalSmall regional hauliersWorks with any partnerManual steps, delays, data qualityLow technically, high operationally

Action: for each carrier, record the channel, the message types supported and who on their side owns integration. That inventory drives your adapter backlog.

What does a good integration layer architecture look like?

The pattern we recommend is a hub with a canonical model at the centre and adapters at the edges.

Core components

  • Canonical model: your own definitions of shipment, stop, handling unit, tender, tender response, status event and freight invoice. Keep it small and business-oriented.
  • Carrier adapters: one per carrier or per channel family, responsible for transport (AS2, SFTP, HTTPS), format (EDI, JSON, CSV) and mapping to and from the canonical model.
  • Message store: every inbound and outbound message, raw and translated, with correlation IDs linking it to the shipment.
  • Routing and orchestration: decides which carrier receives a tender, handles timeouts and fallbacks to the next carrier.
  • Event normaliser: converts carrier-specific status codes into your event vocabulary.
  • Partner configuration: endpoints, certificates, identifiers, schedules and mapping versions per carrier, held as data rather than code.
  • Monitoring and replay: dashboards for failures and the ability to resend or reprocess a message safely.

Normalise status events

Carriers express status in dozens of codes. Your dispatchers and customers need perhaps eight to twelve meaningful events: booked, picked up, in transit, delayed, out for delivery, delivered, exception, returned. Map every carrier code to one of these, keep the raw code for audit, and attach a reason where available. This is also what makes proactive customer updates possible, as described in our article on order tracking automation.

Identify handling units consistently

Use a standard identifier for pallets and parcels where your partners support it. The GS1 Serial Shipping Container Code (SSCC) identifies any logistic unit, such as a case, pallet or parcel, and gives each packed unit its own identity through storage and transport. Carrying the SSCC through tenders, labels and status events makes reconciliation far easier than relying on each carrier’s internal tracking numbers.

Action: draft your canonical model and event vocabulary before writing the first adapter. Changing it after ten adapters exist is expensive.

Which message flows matter most, and how should they work?

1. Tendering

The TMS selects a carrier and sends a tender (an X12 204 for EDI carriers, or an API booking call). The carrier accepts or rejects, for EDI usually with a 990 response. Design for silence: if no response arrives within an agreed window, the orchestration layer should alert a planner or tender to the next carrier automatically.

2. Acknowledgements

Two layers of acknowledgement exist and both matter. At the transport level, an AS2 MDN confirms the message arrived intact. At the document level, X12 defines the 997 Functional Acknowledgment for syntactical analysis and the 999 Implementation Acknowledgment, which also covers relational analysis against an implementation guide. Neither confirms business acceptance; a carrier can acknowledge a 204 syntactically and still reject the load. Track all three states separately.

3. Status updates

Status arrives via X12 214 messages, webhooks, API polling or files. Normalise each into your event vocabulary, de-duplicate, and handle out-of-order arrivals by event timestamp rather than receipt time.

4. Documents and proof of delivery

Proof-of-delivery images, signed delivery notes and bills of lading often arrive separately from status. Link them to the shipment by reference and handling-unit ID.

5. Freight invoicing

Freight invoices arrive as X12 210 messages, API payloads or PDFs. Match them automatically against the agreed rate and the executed shipment, and route only exceptions (accessorials, weight changes, unexpected surcharges) to people.

FlowEDI exampleAPI equivalentKey design concern
Tender204Booking requestTimeouts and fallback carriers
Tender response990Booking response or webhookDistinguish rejection from silence
Status214Tracking webhook or pollingCode normalisation, ordering, duplicates
Invoice210Invoice endpoint or PDFAutomatic matching, exception routing
Acknowledgement997 or 999, AS2 MDNHTTP response, request IDTrack transport, syntax and business acceptance separately

Action: define a service level for each flow, such as the maximum time to tender response or to first status after pickup, and alert when carriers breach it.

How do you make carrier messaging reliable?

Carrier integrations fail in predictable ways: endpoints time out, certificates expire, messages arrive twice or out of order, and partners change formats without notice. Reliability comes from assuming each of these will happen.

Idempotency and retries

Every outbound message should carry a unique control number or request ID, and every inbound message should be checked against those already processed. HTTP semantics, set out in RFC 9110, recognise that some requests can be retried automatically after a connection failure; your adapters should only retry operations that are safe to repeat, or make them safe by using idempotency keys that the carrier honours.

Store raw and translated messages

Keep the exact bytes received and sent alongside the translated canonical version. When a carrier disputes an invoice or a customer disputes a delivery time, the raw message is your evidence.

Monitor the absence of messages

Errors are easy to alert on. Missing messages are not. Alert when a tender has no response after the agreed window, when a shipment picked up hours ago has no status, or when a carrier’s daily file has not arrived.

Manage certificates and credentials as operations

AS2 relies on X.509 certificates, and APIs on keys or OAuth credentials. Track expiry dates centrally and rotate before they lapse; an expired certificate is one of the most common causes of a carrier going silent.

Version mappings

Treat each carrier mapping as versioned configuration with automated tests using sample messages from the carrier. When a partner changes their implementation guide, you can deploy a new mapping version without touching others.

Load testing matters too. Peak season multiplies status traffic; our article on building realistic load from real usage patterns describes an approach that applies equally to webhook and EDI ingestion.

Action: add three alerts this month: certificate expiry within 30 days, tender with no response, and shipment with no status since pickup.

Should you build, buy or blend, and what does it cost?

There is no universally right answer, but the trade-offs are consistent.

ApproachSuitsAdvantagesWatch-outs
TMS vendor connectors onlyStandard carriers already supported by the vendorFastest; vendor maintainsGaps for regional carriers; lock-in
Commercial EDI or integration platformHigh EDI volume, many trading partnersMature translation, AS2, partner managementLicence and per-partner fees; still needs mapping work
Aggregator for parcel plus custom for freightMixed parcel and freight networksQuick parcel coverage, control where it mattersTwo integration models to operate
Custom integration layerLogistics platforms where connectivity is a differentiatorFull control, canonical model owned by youEngineering and operational ownership required

Where the cost sits

  • Per-carrier onboarding: reading implementation guides, mapping, testing with the carrier and certification rounds.
  • Ongoing operations: monitoring, certificate rotation, partner changes and support tickets.
  • Transaction fees: VAN or aggregator charges that scale with volume.
  • Exceptions handling: people time for unmatched invoices and unknown status codes.

For example, a regional 3PL with 25 carriers might use its TMS vendor’s connectors for the five largest, an aggregator for parcel, and a small custom layer for the remaining regional hauliers who send files or use simple APIs. The canonical model sits in the custom layer so that all three sources produce the same events.

A carrier onboarding procedure

  1. Collect the carrier’s implementation guide, sample messages and test credentials.
  2. Map their identifiers, status codes and reference fields to your canonical model.
  3. Configure the partner profile: endpoints, certificates, schedules.
  4. Run automated mapping tests with their sample messages.
  5. Exchange test tenders, statuses and invoices in their test environment.
  6. Go live with a limited lane, monitor for a week, then expand.

Action: time your next carrier onboarding from first contact to first live tender. That number is the best single measure of how well your integration layer works.

Checklist: is your TMS integration layer production-ready?

  1. A canonical model for shipments, tenders, events and invoices is documented.
  2. Carrier-specific logic lives in adapters, not in the TMS core.
  3. Status codes from every carrier map to a small internal event vocabulary.
  4. Transport receipts, syntactic acknowledgements and business acceptance are tracked separately.
  5. Every message has a unique ID and duplicates are rejected.
  6. Raw and translated messages are stored with correlation to the shipment.
  7. Alerts cover missing messages, not only errors.
  8. Certificates and credentials have tracked expiry dates.
  9. Mappings are versioned and tested with real carrier samples.
  10. A repeatable carrier onboarding procedure exists and is timed.

Action: review this list with operations and IT together; the items operations care about most, such as missing statuses and unmatched invoices, usually show where to start.

Frequently asked questions

Is EDI being replaced by APIs?

APIs are growing, especially among parcel and digital freight carriers, but EDI remains deeply embedded with large carriers, ocean lines and rail. Most shippers and 3PLs will run both for years, which is why an integration layer that supports mixed connectivity is the safer design.

What is the difference between a 997 and business acceptance of a tender?

A 997 Functional Acknowledgment confirms that an EDI document was syntactically valid. It does not mean the carrier accepted the load. Business acceptance comes in a separate tender response, so track both states and alert when acceptance does not arrive.

Do we need AS2, or is SFTP enough?

SFTP works and many carriers accept it, but it provides no built-in delivery receipt. AS2 returns a Message Disposition Notification, and a signed MDN gives proof that the carrier received exactly what you sent. For high-value tenders and invoices, that evidence is often worth the extra setup.

Should we use an aggregator for all carriers?

Aggregators are efficient for parcel and common carriers, but they may not support regional hauliers or carrier-specific features you rely on. A blended model, with an aggregator for parcel and direct integrations where control matters, is common.

How long does it take to onboard a new EDI carrier?

It varies with the carrier’s responsiveness, the complexity of their implementation guide and their testing process. With a canonical model, versioned mappings and a repeatable procedure, most of the effort becomes mapping and testing rather than new development.

Sources and methodology

Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.

  1. X12: Transaction Sets — accessed 10 November 2026. Definitions of the 204, 210, 214, 997 and 999 transaction sets used in motor carrier EDI.
  2. IETF RFC 4130: AS2 (July 2005) — accessed 10 November 2026. AS2 transport over HTTP, S/MIME signing and encryption, and MDN receipts with message integrity checks.
  3. GS1: Serial Shipping Container Code (SSCC) — accessed 10 November 2026. Standard identifier for logistic units such as pallets, cases and parcels.
  4. IETF RFC 9110: HTTP Semantics (June 2022) — accessed 10 November 2026. HTTP semantics recognising that some requests can be automatically retried after connection failure.

Is carrier onboarding slowing down your logistics operation?

Tell us about your TMS, your carrier mix and the channels they use. We will help you design an integration layer and a faster onboarding process.