B2B communication protocols
REST API integration
REST APIs are how most cloud applications, online stores and marketplaces share data. ECOM calls and exposes REST APIs, handles authentication, paging, limits and retries, and maps API data to EDI partners and your ERP.
- Style
- Resources and HTTP methods
- Data
- Usually JSON
- Authentication
- OAuth 2.0, API keys, tokens
- Contracts
- Often OpenAPI definitions
The gateway handles the mechanics of each API and maps the data to the rest of your business.
Overview
What REST APIs is
A REST API organizes data as resources, such as /orders or /products/123, and uses HTTP methods to work with them: GET to read, POST to create, PUT or PATCH to update, DELETE to remove. Data is usually JSON.
Each API has its own rules: how to authenticate, how many requests per minute are allowed, how long lists are split into pages, and how errors are reported. Integration means handling all of these reliably.
Where businesses use it
Marketplaces and online stores
Orders, inventory, prices and shipments through platform APIs.
Cloud ERP and SaaS
Reading and writing records in cloud ERPs, CRMs and shipping tools.
Partner APIs
Partners that offer APIs in addition to or instead of EDI.
How it works
How a REST integration works
The client obtains a token, for example with OAuth 2.0 client credentials, and calls endpoints with it. Lists come back in pages; the client follows the next-page cursor until it has everything. Responses use HTTP status codes: 2xx success, 4xx client errors, 429 too many requests, 5xx server errors.
APIs can also push events with webhooks, calling your URL when an order is created, which avoids constant polling.
The token is reused until it expires. Pages are followed to the end, and rate limits are respected by waiting before retrying.
In depth
REST integration in practice
Authentication
OAuth 2.0 flows, API keys and signed requests, with secrets stored securely and tokens refreshed.
Pagination
Cursor, offset and page-number styles are followed to the last page.
Rate limits
429 responses and limit headers are respected with waits and backoff.
Idempotency and duplicates
Idempotency keys or existence checks stop retries from creating duplicates.
Change detection
Updated-since filters or webhooks pick up only new and changed records.
Versions
API version changes are tracked and maps updated before old versions retire.
In practice
Example: marketplace orders to a retailer-style EDI flow
A seller takes orders on a marketplace API and fulfills them through a 3PL that uses EDI.
APIs on one side, EDI on the other, with the gateway mapping between them.
Connections
How REST APIs connects your business
Cloud platforms
Marketplaces, stores and SaaS applications.
EDI partners
API data becomes EDI documents and back.
ERP
Records are created and updated through ERP APIs or files.
Events
Webhooks and queues trigger flows as events happen.
ECOM
How ECOM supports REST APIs
ECOM supports REST APIs with dedicated implementation, mapping, communication and support teams, and with specialists who know the industries your partners work in.
Implementation team
Plans the REST APIs setup with you, configures it on the gateway and runs the tests with your partners and systems.
Mapping team
Builds and maintains the maps, code conversions and validation rules between partner data and your applications.
Communication team
Sets up and monitors partner connections, certificates, keys and credentials, and coordinates changes with each partner.
Support team
Watches the flows, investigates failed or missing documents, and works the issue through with you and your partner.
For REST APIs in particular
- API clients and endpoints with authentication, paging, rate-limit and retry handling.
- Mapping between API JSON and EDI, files and your ERP.
- Partner onboarding for REST APIs: exchanging connection details, testing in both directions and confirming the go-live date with each partner.
- Monitoring of every connection, with alerts for failed, missing or unacknowledged transfers.
Frequently asked questions
Can REST APIs replace EDI?
Sometimes, when both partners offer APIs. Many partners still require EDI, so most companies run both, and the gateway maps between them.
How do you handle API rate limits?
Requests are paced to stay within limits, and 429 responses are handled by waiting and retrying with backoff.
What authentication methods are supported?
Common methods such as OAuth 2.0, API keys, bearer tokens and client certificates, as each API requires.
Can ECOM expose an API for our partners?
Yes. The gateway can expose REST endpoints and map requests to your systems.
Talk to an EDI/API Expert
Tell us which partners, systems and REST APIs requirements you are working with. An ECOM specialist will review them with you and outline the setup, the maps and the tests.