A dependable API integration is a product workflow with external dependencies, not a single request. Before implementation, define the contract, source of truth, authentication, limits, success state, failure behavior, and who can resolve a problem after launch.
Map the contract and source of truth
Document required inputs, returned fields, identifiers, versioning, and which system owns each record. Define how duplicates, missing data, and conflicting updates are resolved.
| Record (example) | Owner | Direction | On conflict |
|---|---|---|---|
| Customer profile | Your application | Push to provider | Your value wins; provider is updated |
| Payment status | Payment provider | Pull or webhook | Provider wins; fetch current state |
| Order line items | Your application | Push on create | Immutable after submission |
| Shipping updates | Carrier API | Webhook + reconciliation | Latest provider timestamp wins |
An illustrative mapping — write your own before the first request is sent.
Design authentication and permissions
Clarify OAuth or key ownership, scopes, token storage, rotation, test environments, and whether individual users or one service account authorize the connection.
Make failures recoverable
Plan timeouts, rate limits, validation errors, retries, idempotency, webhook ordering, dead-letter handling, and a visible state that explains what needs attention.
Test operations, not only requests
Verify sandbox and production differences, logging, alerting, replay, reconciliation, privacy, and the manual process for incidents. Assign ownership for credentials and provider changes after handoff.
Integration readiness checklist
- Contract documented: inputs, fields, identifiers, versioning
- Source of truth decided for every shared record
- Credentials owned by the client, with rotation steps
- Rate limits and timeouts known and handled
- Idempotency keys on every write
- Retry and dead-letter behavior defined
- Webhook signatures verified
- Sandbox and production differences tested
- Logging and alerting on failures and on silence
- A named owner for incidents and provider changes
Decision checklist
- Contract documented: inputs, fields, identifiers, versioning
- Source of truth decided for every shared record
- Credentials owned by the client, with rotation steps
- Rate limits and timeouts known and handled
- Idempotency keys on every write
Common mistakes
- Planning the request and not the failure.
- Two systems both believing they own a record.
- Credentials tied to one person’s account.
- No way to replay or reconcile after an outage.
Primary references
These official resources support the implementation details and should be checked again when provider behavior changes.

