Short answer
An API-based integration exchanges data between systems through their published application programming interfaces rather than through shared databases or file transfers. The integration authenticates, calls documented endpoints to read or write records, and handles responses, errors, pagination, and rate limits. APIs preserve each system's business rules and are the preferred way to integrate ecommerce platforms with ERPs.
An API (application programming interface) is a documented way for one program to ask another to do something — return a list of orders, create a product, update a stock level. An API-based integration connects systems exclusively through these interfaces.
How it works
- Authenticate. The integration proves its identity, typically with an access token, an API key, or an OAuth flow.
- Call an endpoint. It sends a request (for example, “get orders updated since 10:00”).
- Handle the response. It reads the data, follows pagination for large results, and checks for errors.
- Respect limits. It slows down when the API signals that rate limits are near.
Common API styles
| Style | Characteristics | Seen in |
|---|---|---|
| REST | Resources at URLs, HTTP methods (GET, POST, PUT, DELETE), JSON bodies | WooCommerce, BigCommerce, Adobe Commerce, most ERPs |
| GraphQL | One endpoint; clients specify exactly which fields to return | Shopify Admin API, Adobe Commerce (storefront-oriented) |
| SOAP | XML messages with a formal contract (WSDL) | Older ERPs, Adobe Commerce |
| File-based | CSV/XML exchanged via SFTP or folders | Legacy ERPs, batch imports |
Why APIs are preferred
- Business rules stay in force. The ERP validates data and runs its logic when records arrive through its API.
- Stability. APIs are versioned contracts; database schemas are internal and can change without notice.
- Security. APIs can grant narrow permissions; database access is usually all-or-nothing.
- Auditability. API calls can be logged and attributed.
Practical concerns
- Versioning: platforms release new API versions and retire old ones. Shopify, for instance, releases quarterly versions supported for at least 12 months.
- Rate limits: each platform limits usage differently — request counts per window, or calculated query cost.
- Pagination: large result sets come in pages; integrations must follow cursors or page numbers.
- Errors: some APIs (including GraphQL APIs) can return HTTP 200 with errors in the body, so status codes alone are not enough.
- Idempotency: creates must be safe to retry; see idempotency.
APIs and webhooks together
APIs are request-driven: you ask, they answer. To learn about changes without constantly asking, platforms also offer webhooks. Most integrations combine both — webhooks to learn something changed, APIs to fetch the details and write results.
Summary
API-based integrations connect systems through documented, versioned interfaces that preserve business rules and permissions. They require handling of authentication, pagination, errors, rate limits, and version changes, and they work best combined with webhooks for change detection.
Frequently asked questions
Is REST or GraphQL better for integrations?
Neither is universally better. GraphQL lets you request exactly the fields you need in one call; REST is simpler and widely supported. Use whichever the platform recommends — Shopify, for example, labels its REST Admin API as legacy and recommends GraphQL.
Why not write directly to the ERP database?
Direct database writes bypass validation, business logic, and audit trails, and they break when the schema changes. Use an API, and if the ERP has none, building a thin API in front of it is usually worth it.
What is a rate limit?
A cap on how many requests or how much query cost a client can use in a time window. Exceeding it returns an error such as HTTP 429, and the client must wait.
Sources and further reading
Platform-specific statements on this page were checked against these sources on . Vendor APIs change; confirm details in the current documentation before you build.
- [1] RFC 9110: HTTP Semantics — IETF
- [2] GraphQL specification — GraphQL Foundation
- [3] RFC 6585: 429 Too Many Requests — IETF
- [4] Shopify REST Admin API (legacy notice) — Shopify
Related reading
- Concepts What Are Webhooks? What webhooks are, how they deliver change notifications between systems, how to verify them, and the delivery behaviors integrations must be designed around.
- Concepts What Is Ecommerce ERP Integration? What ecommerce ERP integration means, which workflows it automates, how data flows between store and ERP, and the main approaches used to build it.
- Concepts What Are Retry Strategies? How integrations retry failed operations — immediate, fixed, exponential backoff, jitter, Retry-After, attempt limits, and circuit breakers — and which errors to retry.
- Platforms Shopify ERP Integration How Shopify connects to an ERP — the GraphQL Admin API, webhooks, inventory states, fulfillment orders, rate limits — plus the sync patterns and pitfalls that matter.
- Platforms Magento and Adobe Commerce ERP Integration How Magento Open Source and Adobe Commerce connect to an ERP — REST and asynchronous bulk APIs, message queues, Multi-Source Inventory, webhooks, and Adobe I/O Events.