Odoo consultants for regulated manufacturers · code you keep

Integrations · Odoo guide

How do I use the Odoo API to sync data with another system?

Use Odoo external API via XML-RPC or JSON-RPC with uid authentication, or REST in newer endpoints, calling execute_kw on models like product.product, sale.order, and stock.picking. Respect create/write constraints, batch in chunks, store external IDs on custom fields, and use cron or queue workers with idempotency keys and error logging for reliable two-way sync.

By Chase Robbins, Operator & Founder at The ERP Firm · Last updated October 24, 2026

Steps

  1. Create dedicated integration user with least-privilege groups and API key if on Odoo 14+.
  2. Prototype read search_read on target models with domain filters and field lists.
  3. Add x_external_id or integration reference fields for upsert matching.
  4. Implement create/write with context tracking_disable or mail not suppressed per policy.
  5. Use @api.model_create_multi patterns in custom imports for performance on bulk loads.
  6. Wrap calls in retry with exponential backoff; handle concurrent update exceptions.
  7. Monitor ir.logging or application logs; alert on failed job queue entries.

Common mistakes

  • Using admin user for integrations without rate limits.
  • Writing related records in separate calls without transactions causing orphans.
  • Ignoring required fields on stock.move.line during picking imports.
  • Skipping timezone on datetime fields in JSON payloads.
  • Full table scans without indexed domains slowing production.

Odoo version notes

XML-RPC and JSON-RPC are stable on Odoo 16–18 Community and Enterprise. Official REST improves gradually—verify docs per version. Odoo.sh may throttle long jobs; use queue_job OCA. External API deprecations are rare but test staging on each minor upgrade.

When to bring in help

If the fix touches custom modules, regulated traceability, or production outages, a focused rescue sprint beats months of trial and error. See our Odoo service.

FAQ

Follow-up questions

JSON-RPC or REST?
JSON-RPC matches most Python examples; REST suits modern middleware when endpoints exist for your models.
How to authenticate safely?
Use API keys on integration users, rotate secrets, and restrict IP on firewall or Odoo.sh rules.
Can webhooks replace polling?
Odoo bus is internal; outbound webhooks need custom server actions or middleware listening to write events.

Book a scoping call for your Odoo environment.

Bring your version, user count, and the workflow that is blocked today.

Book a scoping call