API and EDI — taking the best from both worlds

APIs are not killing EDI — they are complementary. We show how modern architectures combine EDI for batch flow and APIs for real-time queries.

The „EDI vs API“ debate has taken on the tone of a religious dispute in recent years — as if the choice were between the old and the new world. In practice, serious B2B architectures use both. EDI and APIs solve different problems and are complementary, not rivals.

This article explains the distinction, where each has an edge, how they combine in modern hybrid architecture and how the REDOK platform supports both approaches under one contract and one operational dashboard.

EDI — „documents move“

EDI is document-oriented. A typical flow: one structured document (UBL invoice, EDIFACT ORDERS) leaves your ERP, passes through the gateway and arrives in the partner's ERP. Communication is asynchronous — you send the document and continue working; the delivery acknowledgement arrives minutes or hours later. Typical volume: thousands to hundreds of thousands of documents per day in mid- to large-sized environments.

EDI is the gold standard for high-volume batch flows: invoices, purchase orders, dispatch notes. Asynchronous transport, guaranteed delivery, legal validity and audit trail are critical here. EDI documents are the „document of record“ — what stays in the archive for 11 years and what you show at audit time.

API — „data is accessed“

An API is data-oriented. A typical flow: one call (HTTP GET, REST endpoint) requests a specific datum (order status, available stock for an article, latest price list). The response arrives in milliseconds. Volume can be very high (tens of thousands of calls per hour), but each call is „lightweight“ — no structured documentation, no archive.

APIs are ideal for real-time use cases: shipment status check, partner lookup, stock availability query, master data sync. Legal validity and the archive layer are not critical there — this is the live operational layer.

Complementarity in modern architecture

A typical hybrid pattern looks like this: EDI carries the document of record (invoice, PO, dispatch note) — legally valid, archived, queued for batch processing. In parallel, an API is used for all „live“ calls — a customer-facing portal shows order status (API GET), checks stock availability (API GET), syncs a new price list (API PUT/POST).

Another common pattern: EDI for initial document delivery, API for follow-up. The invoice is sent as a Peppol BIS document (EDI), but the partner can pull its status („received“, „validated“, „approved“, „paid“) through an API — without firing additional EDI messages for each status update.

REDOK support for both approaches

  • EDI side: UBL 2.1, EDIFACT D96A, Peppol BIS Billing 3.0, ANSI X12 — over sFTP, AS2, AS4 and file-drop.
  • API side: REST/JSON API with OAuth 2.0 authentication — endpoints for document status, partner lookup, master data sync, archive retrieval.
  • Webhook side: REDOK can call your endpoint when certain events happen (document received, validation failed, archive uploaded).
  • Unified operational view: both EDI and API traffic in the same dashboard, the same logs, the same SLA.

When to choose what

Rule of thumb: if the answer to „does this document need to be in the archive for 11 years and have legal validity?“ is YES → EDI. If the answer to „does this response need to come back in the same second?“ is YES → API. If both are YES — then a hybrid, where EDI carries the document and the API serves live status.

Summary

APIs and EDI are not rivals — they are complementary tools. EDI solves high-volume, asynchronous, legally valid flows. APIs solve real-time, lightweight, operational ones. The best architecture combines both, instead of choosing one at the expense of the other.

The REDOK team runs an architecture review where we map where EDI has the edge, where APIs have the edge and where hybrid delivers the most value. Reach out through the contact form.

← Back to blog
API and EDI — taking the best from both worlds | REDOK