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 · Accounting
Overview
We build Xero integrations that respect its API limits and data model, and we migrate Xero data cleanly when the time comes.
01Data
| Entity | Direction | Notes |
|---|---|---|
| Contacts | ERP → App | Customers and suppliers created in Xero. |
| Invoices | ERP → App | Sales invoices with mapped accounts and tax rates. |
| Bills | ERP → App | Supplier bills for payables. |
| Payments | ⇄ Both | Based on where bank reconciliation is done. |
| Manual journals | ERP → App | Inventory valuation and COGS summaries. |
02Use cases
Keep accountants in Xero while operations run on ERP.
Entities on Xero with ERP operations.
Move to ERP accounting at a period end.
03 — Architecture
The Xero Accounting API enforces per-tenant rate limits, so the integration batches documents and schedules syncs. Webhooks can notify of contact and invoice changes in Xero.
Tracking categories in Xero map to ERP analytic dimensions where needed.
04Reliability
OAuth 2.0 with refresh tokens that must be used before expiry; the integration refreshes automatically and alerts if the connection lapses.
Errors such as locked periods or invalid account codes logged per document and surfaced in an exception list.
Rate-limit responses handled with backoff respecting retry-after headers; idempotent posting via stored Xero IDs.
05 — Data mapping
| Xero | ERP |
|---|---|
| ERP partner | Contact |
| ERP account | Account code |
| ERP tax | Tax rate |
| ERP analytic | Tracking category |
| ERP invoice | Invoice (ACCREC) |
06 — Automation
07 — Security
Encrypted token storage, minimal scopes and a named authorising admin.
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
It's possible, but two systems mean reconciliation. Many clients migrate once operations stabilise.
Yes, mapped to ERP analytic dimensions.
Yes, master data, open items and balances at a period end.
Next step
Describe the data that needs to move and who owns it. We will propose a design with error handling and monitoring included.