Skip to content
ERP Builders
ERP Development

Odoo External API Guide for Integrations

How to integrate with Odoo's external API: authentication with API keys, JSON-2 vs XML-RPC, searching and writing records, integration users, limits and good practice.

By ERP Builders Architecture Group2 min read

Most Odoo projects connect to something else: a webshop, a WMS, a payment provider, a data warehouse. This guide covers the basics of integrating with Odoo safely.

API options

  • JSON-2 API in recent versions: HTTP requests with JSON bodies, authenticated with an API key. Our Odoo 20 guide covers the version changes.
  • XML-RPC and JSON-RPC: the long-standing external API. Still found in many existing integrations, and deprecated in newer versions, so plan to move.
  • Custom controllers: HTTP routes in a custom module, when you need a specific endpoint or webhook receiver.

Authentication

Create a dedicated user for each integration, give it only the access rights it needs, and generate an API key for it. Never use an administrator's password in an integration.

Core operations

The external API works on models, such as res.partner or sale.order, with methods including:

  • search_read to find and read records with a domain filter
  • create to add records
  • write to update records
  • unlink to delete, which should be rare

Business actions, such as confirming an order, are model methods like action_confirm.

Good practice

  • Read only the fields you need. Reading all fields is slow.
  • Batch writes. One call with 100 records beats 100 calls.
  • Use external IDs or a reference field to avoid duplicates on retry.
  • Handle errors and log them with enough detail to fix.
  • Respect business logic. Call Odoo methods instead of writing state fields directly.

Webhooks

To push changes out of Odoo, use automation rules that call a webhook URL, or a scheduled job that sends changes in batches. Recent versions support sending webhooks from automation rules.

Performance and limits

Heavy integrations compete with users. Schedule bulk syncs at quiet times and monitor server load. On Odoo Online, API access depends on your plan.

Testing

Test against a staging copy, never production. Include failures: network drops, duplicate messages and validation errors.

Version upgrades

API changes between versions can break integrations. Include integrations in every upgrade checklist.

See our Odoo integration service or ERP API integration explained.

Frequently asked questions

Does Odoo have a REST API?

Odoo's newer JSON-2 API is HTTP and JSON based. Older versions use XML-RPC and JSON-RPC. Custom REST endpoints can also be built in a module.

Should integrations use a user password?

No. Create a dedicated integration user and use an API key with only the rights the integration needs.

Written by

ERP Builders Architecture Group · Solution architecture

The engineers responsible for integration design, data migration tooling and performance work across ERP Builders projects.

Related articles

ERP Development2 min read

Why Is Odoo Slow? A Performance Tuning Guide

Find out why Odoo is slow and how to fix it: worker settings, PostgreSQL tuning, indexes, custom code, scheduled actions, attachments and when to scale the server.

ERP Development3 min read

Odoo 20 Access Rights: Migrating to ir.access

Odoo 20 removes record rules and merges them into access rights with domains. What changed, how to migrate ir.model.access.csv and ir.rule, and what to test.

Next step

Turn the plan into a working system.

Book a consultation with an ERP consultant. No sales script — just an honest look at your situation.