General Overview: API vs EDI

A quick overview of the main differences between API and EDI. Our TMS utilizes both methods across the shipment lifecycle to maximize efficiency.


API

APIs allow us to send electronic requests and receive immediate responses from carriers. They support functionalities such as rating, dispatching, tracking, and imaging. As a modern communication method, APIs are preferred for their speed and control.

Response Time: Typically, 10–45 seconds per request.
Tracking Updates: Requested every 5–15 minutes.


Pros:

  • Instantaneous responses and tracking updates.
  • More controllable, enabling real-time communication and adjustments.

Cons:

  • Sensitive to changes: Minor carrier-side changes can disrupt communication, requiring developer intervention to resolve issues.

 


EDI

EDI (Electronic Data Interchange) has been in use since the 1960s. Unlike API, EDI operates via file transfers between us and the carrier, functioning similarly to email. While slower, it offers a structured and stable communication format.

  • Supports Messages/File Types:
    • 204: Dispatch Request to the carrier.
    • 997: Automated Confirmation.
    • 990: Pickup Acknowledgment (with details or rejection reasons).
    • 214: Status Updates.
    • 210: Carrier Invoice/Bill.

Example Workflow:
For dispatching, we send a 204 request to the carrier and await their response. Responses could include:

  • 997: Confirmation of receipt.
  • 990: Pickup acknowledgment with a pickup number or rejection details.
    Tracking updates (214) are sent at the carrier’s discretion.

Pros:

  • Highly stable due to strict format requirements that ensure compatibility.
  • The only method currently supporting carrier invoice transmission (210).

Cons:

  • Slower than API: Dependent on the carrier’s timing for sending files.
  • Tracking updates are unscheduled and can involve delays.

 


Combining API and EDI

To capitalize on the strengths of both methods, our TMS integrates them strategically:

  • Dispatching:

    • Default to API for faster responses and pickup numbers.
    • Fall back to EDI if API dispatch fails, ensuring the carrier receives the request.
  • Tracking:

    • Prioritize API tracking requests for near-instant updates.
    • Supplement with EDI updates when carriers send tracking files.

This hybrid approach allows us to optimize shipment communication, leveraging API’s speed and EDI’s stability to minimize downtime and improve overall reliability.