API integration
API integration
Many business integrations come down to calling another product's API: fetching orders, creating invoices, updating stock or reading customer records. Each API has its own rules about how you sign in, how fast you may call it, how results are split into pages, how versions change and how errors are reported. An integration that follows those rules runs quietly for years; one that ignores them breaks at busy times, gets blocked or silently misses data.
This page explains the technical details that make an API integration dependable.
Illustrative diagram
- Valid token
- Send request
- Follow pagination
- Respect rate limits
- Retry safely
- Record result
What every API integration must handle
| Concern | What to get right |
|---|---|
| Authentication | API keys or OAuth tokens stored securely and renewed before expiry |
| Rate limits | Stay within limits; slow down when the API responds with 429 Too Many Requests |
| Pagination | Fetch every page of results, not just the first |
| Versions | Use a supported version and plan for deprecations |
| Errors | Distinguish temporary failures from permanent ones |
| Retries | Retry safely without creating duplicates |
Authentication: keys and OAuth
APIs commonly use either a secret key or OAuth. OAuth 2.0, defined in RFC 6749, lets an application obtain limited access to a service on behalf of a user or account, usually through a token that expires and must be refreshed. Whichever method an API uses, credentials must be stored as secrets, never in code or shared documents, scoped to the minimum permissions needed and renewed before they expire. An integration that stops when a token quietly expires is a common, avoidable failure.
Use separate credentials per integration so one can be revoked without affecting others.
Rate limits and slowing down
APIs limit how many requests you may make in a period. RFC 6585 defines the 429 Too Many Requests status for this, and responses may include a Retry-After header saying how long to wait. A well-built integration watches for these signals, waits before trying again and spreads bulk work over time rather than firing thousands of requests at once. Ignoring limits can lead to blocked access at exactly the moment volumes are highest.
Check each vendor's documented limits, which often differ by plan.
Retrying without duplicates
Know which calls are safe to repeat
- Under RFC 9110, PUT, DELETE and safe methods such as GET are idempotent
- POST is not, so repeating it can create duplicates
- Use the vendor's idempotency keys where offered
Retry sensibly
- Only for temporary errors
- Wait longer between attempts
- Stop after a limit and queue the item for review
Record outcomes
- Log requests and responses without secrets
- Store the vendor's IDs for created records
- Alert on repeated failures
Pagination: getting all the data
APIs rarely return thousands of records in one response. Instead they return a page of results with a way to fetch the next, such as a page number, an offset or a cursor. Integrations that read only the first page work in testing with small data and then quietly miss records in production. Follow the vendor's pagination method to the end, handle records that change while you are paging and, for large data sets, prefer the vendor's change feeds or 'modified since' filters over re-reading everything.
Record where each sync stopped so the next run can continue from there.
Versions and deprecations
Vendors release new API versions and retire old ones, usually with notice. Build against a current, supported version, subscribe to the vendor's developer announcements and plan updates before deprecation dates. Test against new versions in the sandbox before switching. An integration built on an old version may keep working for a while, then fail on a fixed date.
Sandboxes and test data
Many APIs provide a sandbox or test account that behaves like the live system without affecting real data. Develop and test there first, including error cases such as invalid data, expired tokens and rate limits. Where no sandbox exists, agree a careful plan for testing against live data with clearly marked test records.
Running it reliably
Queues for failed items, alerts and reconciliation keep integrations healthy after launch; the software integration services page covers those operating practices in detail.
Timeouts
Set sensible timeouts on every call, so a slow vendor does not hold up your own system indefinitely.
Questions about API integration
What is an API integration?
Software that calls another product's API to read or change data according to its rules.
What is OAuth?
OAuth 2.0 (RFC 6749) lets an application get limited access to a service, usually through expiring tokens.
What does a 429 response mean?
Too many requests in a period (RFC 6585); wait, often as indicated by Retry-After, before trying again.
Why can retries create duplicates?
Non-idempotent requests such as POST can create a record each time they are repeated.
Should we test against the live system?
Use the vendor's sandbox or test account first wherever one exists.
What happens when the vendor changes its API?
Watch deprecation notices and update before old versions are retired.
Sources referenced
Platform features, guidance and rules change. We check the current versions before committing to an approach. This page is general information, not legal advice.
- IETF: RFC 6749: The OAuth 2.0 Authorization Framework (opens in a new tab) — reviewed 2026-10-23
- IETF: RFC 6585: Additional HTTP Status Codes (opens in a new tab) — reviewed 2026-10-23
- IETF: RFC 9110: HTTP Semantics (opens in a new tab) — reviewed 2026-10-23
Request a Custom Quote
Ask about API integration
Thank you — your enquiry has been sent.
We have received your message and will reply by email. If you need to add anything, email info@letgetgrow.com.