Connecting two business apps directly is a small engineering project, not a one-click setup. The difference between a fragile link and a dependable one is mostly in the details: how you authenticate, how you map fields, and what happens when a request fails.
A documented, logged integration that moves records between two systems, handles failures predictably, and can be tested without touching production data.
Step-by-step
-
Read both API contracts first
Before writing code, read the authentication model, rate limits, pagination, and error formats for both systems. Note which side owns each field and whether updates are full replacements or partial patches. Most integration bugs are contract misunderstandings.
Tip: Write a one-page table of endpoints and payload shapes. It becomes your integration spec.
-
Choose the right authentication
Prefer OAuth or scoped API keys over shared admin credentials. Store secrets in a managed vault or environment variables, never in source control. Confirm the token refresh behaviour and what happens when a token expires mid-run.
Tip: Create a dedicated integration user with the minimum permissions it needs.
-
Map fields explicitly
Build a field map from source to destination, including types and transformations: dates, currencies, phone formats, and picklist values. Decide what happens when a mandatory field is empty. Do not rely on similar names meaning the same thing.
Tip: Keep a “do not overwrite” list for fields owned by the destination system.
-
Handle pagination and rate limits
Assume both APIs paginate and throttle. Loop through pages until exhausted, respect retry-after headers, and back off exponentially on rate-limit responses. A sync that works with ten records often fails with ten thousand.
Tip: Record the last successful cursor so a restart does not begin from zero.
-
Make writes idempotent
Networks retry, jobs restart, and the same record can arrive twice. Use a stable external ID or idempotency key so a repeated request updates the existing record instead of creating a duplicate. Test by sending the same payload twice.
Tip: If the destination has no unique constraint, keep a sync table mapping source IDs to destination IDs.
-
Log every request and response
Store a correlation ID, timestamp, endpoint, status, and a redacted payload for each call. When a record goes missing, logs are the difference between a ten-minute fix and a day of guessing. Avoid logging secrets or full customer records.
Tip: Log the source record ID on both sides of the integration so you can trace a record end to end.
-
Test against a sandbox, then replay
Run the integration against sandbox data first, including empty fields, duplicates, and invalid values. Then replay a day of real events in a controlled environment before switching on the live schedule.
Tip: Keep a small synthetic test set that covers each edge case and re-run it after every change.
Common questions
When should we use an integration platform instead of direct APIs?
Use a platform when the workflow is simple, the apps are well supported, and speed matters more than control. Go direct when you need custom logic, high volume, or strict data handling.
How do we handle API changes?
Pin API versions where possible, subscribe to provider changelogs, and keep contract tests that fail loudly when a response shape changes.
Do we need a queue?
For anything beyond low volume or simple request-response, yes. A queue separates receiving an event from processing it and makes retries much safer.