API integration

On this page 7

API integration is the practice of connecting two or more software systems through their application programming interfaces so that data and actions flow between them automatically. In automation and system integration, it is the standard way for a workflow to read records from one service, transform them and write them into another without human copying.

An integration combines a transport and protocol such as HTTPS with REST, GraphQL or SOAP, an authentication method, a data contract describing fields and formats, and a triggering strategy that decides when the exchange runs. Its quality is measured less by whether it works once and more by how it behaves under rate limits, outages, schema changes and duplicate events.

How an API integration works

Every API integration follows a request and response cycle wrapped in workflow logic. A client builds a request with a method, endpoint, headers and body, the server validates it and returns a status code and payload, and the integration then maps the response into the target system’s structure.

  1. Trigger: an event, a schedule or a polling cycle starts the exchange.
  2. Authenticate: the client attaches an API key, an OAuth 2.0 access token or a signed request.
  3. Request: the client calls the endpoint, often with pagination or filtering parameters.
  4. Transform: fields are converted through data mapping, including types, units and identifiers.
  5. Deliver: the target system receives the data through its own API.
  6. Confirm and log: the result, status code and correlation identifier are recorded for auditing.

Most modern integrations use JSON over HTTPS. Older enterprise systems still expose SOAP with XML payloads, and some high-volume internal services use gRPC with binary Protocol Buffers for lower latency and strict typing.

Integration styles and triggering strategies

The triggering strategy determines latency, load and complexity more than any other design choice. The three main patterns are push through webhooks, pull through polling and time-based batch synchronization driven by a scheduled trigger.

StrategyHow data arrivesTypical latencyMain drawback
Webhook pushSource calls the integration on each eventSecondsRequires a public, secured endpoint
PollingIntegration asks the source for changes1 to 15 minutesWasted calls when nothing changed
Scheduled batchFull or delta export at fixed timesHoursStale data between runs
StreamingPersistent connection or event brokerSub-secondHigher operational complexity
Triggering strategies for API integration

Many robust designs are hybrid: webhooks deliver events quickly, while a periodic reconciliation poll catches events that were lost because of an outage or a failed delivery.

Authentication, limits and other key parameters

Production integrations are constrained by security and capacity parameters set by the API provider. Ignoring them is the most common reason an integration works in testing and fails at scale.

ParameterTypical valuesDesign consequence
AuthenticationAPI key, OAuth 2.0, mutual TLS, signed requestsToken storage and refresh logic
Access token lifetimeOften 15 minutes to a few hoursAutomatic refresh before expiry
Rate limitTens to thousands of requests per minuteThrottling and queueing
Page sizeCommonly 50 to 1,000 recordsPagination with cursors or offsets
TimeoutUsually 10 to 60 seconds per callRetries and asynchronous jobs
Payload sizeFrom kilobytes to tens of megabytesChunking or file-based transfer
API versionPath, header or date-based versioningPlanned upgrades before deprecation
Parameters every API integration must handle

Status codes guide the reaction. A 429 Too Many Requests or a 503 calls for waiting and retrying with backoff, while a 400 or 422 validation error will fail again and should be routed to human review instead of being retried.

API integration is one of several ways to move data between systems. It is preferred because it uses a documented, supported contract, whereas other methods depend on internal structures that can change without notice.

MethodCoupling to the sourceReliabilityWhen it is chosen
API integrationContract-basedHigh with proper error handlingDefault for modern software
File transferFormat-basedMedium, batch-orientedLegacy systems and bulk exports
Direct database accessTight, schema-dependentFragile across upgradesInternal systems under one owner
UI automationTight, screen-dependentLow to mediumNo API exists at all
Event brokerLoose, message-basedHigh at scaleMany producers and consumers
API integration and alternative integration methods

Common failure modes and how to prevent them

Integration failures rarely come from the happy path. They come from partial failures, retries and silent schema drift, which is why experienced teams design for these cases from the start.

SymptomLikely causeFix
Duplicate recordsRetries without idempotencyIdempotency keys or upsert by external ID
Missing recordsIgnored pagination or lost webhooksCursor pagination and reconciliation
Sudden 401 errorsExpired or revoked tokenAutomatic refresh and alerting
Bursts of 429 errorsParallel calls above the limitClient-side throttling and backoff
Wrong values in targetChanged field format or unitSchema validation and contract tests
Symptoms, causes and fixes in API integrations

Observability completes the design. Each exchange should carry a correlation identifier, and failed payloads should be kept in a dead letter queue so that they can be inspected and replayed after the cause is fixed.

Put simply

Software programs often need to share information. A web shop, for instance, must tell the accounting system about each new sale. An API is like a service counter with clear rules. You hand in a request on the correct form. You receive a precise answer.

API integration means building an automatic messenger that visits these counters for you. It carries information between systems. It also checks that nothing gets lost or doubled along the way.

In practice

A mid-sized distributor sells through its own online store and keeps stock and invoices in an enterprise resource planning system. Staff previously re-typed around 300 orders a day, which caused delays and typing errors. The team builds an API integration triggered by order webhooks, with OAuth 2.0 access to both systems and a mapping layer that converts product codes, tax rates and currencies.

Each order carries its store order number as an idempotency key, so a webhook delivered twice never creates two invoices. A nightly reconciliation compares order counts in both systems, and calls rejected with validation errors are routed to a review queue. After the change, orders appear in the ERP within seconds, and re-typing errors disappear from the monthly audit.