Real-time calls or scheduled files — a choice about volume, latency and what happens when it breaks.
API integration exchanges data through synchronous or event-driven calls, usually one record at a time. File-based integration moves batches on a schedule. APIs suit low-latency, low-volume, transactional exchange; files suit high-volume bulk movement where latency is acceptable.
APIs are assumed to be the modern choice and files the legacy one, which is not how the decision should be made. Loading two million rows nightly through a per-record API is slower, more fragile and harder to restart than a file. The right question is the volume, the latency actually needed, and what recovery looks like when it fails at three in the morning.
Hundreds of records favours an API. Hundreds of thousands favours a file, or a bulk endpoint designed for volume.
Ask what decision depends on freshness. Order status may need seconds; a nightly product catalogue does not.
APIs reject per record with an immediate response. Files typically fail per batch, so partial-failure handling must be designed.
A rerun must not duplicate. Idempotency keys for APIs, control records and sequence numbers for files.
A file that silently stops arriving is the classic undetected failure. Alert on absence, not only on error.
A business integrating its ERP with a payroll bureau is advised that file transfer is outdated and an API would be better. The advice is generic and, here, wrong.
Payroll input is produced once per cycle, is large, is reviewed and approved before submission, and has no real-time component — nobody needs to know within seconds that a payroll record was accepted. A file containing the approved payroll input, transferred securely on a schedule, matches the shape of the business process exactly. An API would add complexity, require handling partial failures mid-submission, and provide latency nobody needs.
The same business's stock availability feed to its web storefront is the opposite case: small, frequent, latency-sensitive, and useless if it is a day old. That one genuinely needs an API. The useful rule is to choose by the shape of the data flow — volume, frequency, latency requirement and error-handling need — rather than by which technology is more current.
| Term | What it means |
|---|---|
| Synchronous | The caller waits for a response and learns the outcome immediately. |
| Asynchronous | The message is sent and processed independently, with the outcome learned later. |
| Batch window | The period in which a file-based transfer runs, usually overnight. |
| Idempotency | Processing a repeated message without duplicating its effect. |
| Backpressure | What happens when the receiver cannot keep up with the sender. |
Latency per call multiplied by volume turns a ten-minute file into an overnight job that may not finish.
Nothing fails, nothing is logged, and the data is quietly stale for days.
Any retry risks duplicates, which makes safe recovery impossible.
It raises cost and failure surface. Ask which decision changes with fresher data.
| Metric | What it tells you | What distorts it |
|---|---|---|
| End-to-end latency | Time from event to the other system reflecting it, against what the process needs. | |
| Failure detection time | How quickly a failed transfer is noticed. File-based integrations often fail silently. | |
| Reprocessing rate | How often transfers must be rerun, which points at data or validation problems. | |
| Volume per transfer | Whether the mechanism matches the volume. Very large API batches and very small files are both mismatches. |
We build and support the systems this page describes. Start with a free working proof of concept — no cost, no commitment.