ERP API Integration Explained: REST, Webhooks, Auth and Idempotency
A plain-English explanation of ERP API integration: REST APIs, webhooks, authentication methods, idempotency, pagination, rate limits and error handling.
Integration · Commerce
Overview
We integrate Amazon through the Selling Partner API (SP-API), using order data, inventory reports and settlement reports to keep the ERP accurate.
01Data
| Entity | Direction | Notes |
|---|---|---|
| Orders (FBM) | App → ERP | Merchant-fulfilled orders imported for picking and shipping. |
| Shipment confirmation | ERP → App | Tracking and carrier posted back for FBM orders. |
| Orders (FBA) | App → ERP | FBA sales recorded to deduct stock held at Amazon and record revenue. |
| Inventory levels | ⇄ Both | FBM quantities pushed to Amazon; FBA inventory pulled from reports. |
| Inbound FBA shipments | ERP → App | Transfers to Amazon fulfilment centres tracked as stock in transit. |
| Settlements & fees | App → ERP | Settlement reports split into sales, fees, refunds and reimbursements. |
02Use cases
Stock at Amazon shown as a separate location in the ERP.
Payouts matched to orders and fees automatically.
Several Amazon regions alongside other channels.
03 — Architecture
SP-API is rate-limited per operation, so the integration combines event notifications with scheduled polling of orders and report requests. Reports (inventory, settlements, returns) are requested, downloaded and parsed asynchronously.
Settlement data is posted to a clearing account in the ERP, with fees mapped to expense accounts, so the bank payout reconciles against a single balance.
04Reliability
A registered SP-API application authorised by the seller account through Login with Amazon (LWA) OAuth, with refresh tokens stored securely and access tokens refreshed automatically.
Throttling responses are expected and handled. Orders with unmapped SKUs or ASINs are held for review. Report parsing errors are logged with the report ID for reprocessing.
Operation-specific rate limits are respected with backoff and token-bucket pacing. Failed report downloads are retried; settlements are reprocessed idempotently by settlement ID.
05 — Data mapping
| Amazon | ERP |
|---|---|
| AmazonOrderId | Sales order reference |
| SellerSKU / ASIN | ProductSKU mapping table per marketplace |
| MarketplaceId | Sales channel / company |
| Settlement fee types | Expense accountsMapped once, applied automatically |
| FulfillmentChannel | Warehouse (own vs FBA) |
06 — Automation
07 — Security
Refresh tokens are stored encrypted. Amazon's data protection policy restricts how buyer personal information may be stored; we design data retention to comply with it.
Related
Other integrations
Insights
A plain-English explanation of ERP API integration: REST APIs, webhooks, authentication methods, idempotency, pagination, rate limits and error handling.
How to integrate an ERP with eCommerce, CRM, payments and other systems: data ownership, integration patterns, middleware, error handling, monitoring and common failure modes.
How to integrate RFID readers with Odoo inventory: middleware design, mapping EPCs to products and serials, receiving and counting flows, performance and what to build vs buy.
FAQ
Yes, as a separate warehouse location updated from Amazon inventory and order data.
Settlement reports are parsed and fees posted to mapped accounts, reconciling to the payout.
Yes, with per-marketplace mapping for currency, tax and SKUs.
Next step
Tell us your volumes, channels and data rules. We will outline the architecture and the risks before anything is built.