What we do
Tools
Industries
Department
How we workLet's talk →
Home/Odoo
Odoo external API

The Odoo API: Which One Your Version Allows, and Your First Call

You've got the Odoo URL, an admin login and a request to pull orders into another system by Friday. Before writing anything, two things decide the route: which Odoo version you're on, and whether your plan lets outside code in at all.

Where Odoo stops

Odoo runs many modules, but everything it was never meant to replace still has to be connected to it.

Stuck on Odoo? Let's solve it →
Which Odoo API applies to you

Odoo 19 or later: the JSON-2 API. You POST JSON to /json/2/<model>/<method> with an Authorization: bearer <API key> header.

Older versions: XML-RPC at /xmlrpc/2/common and /xmlrpc/2/object, or the JSON-RPC equivalent. You authenticate once for a user ID, then call execute_kw with an API key standing in for the password.

Odoo Online: external API access needs the Custom plan. Odoo's docs say it isn't available on One App Free or Standard. Self-hosted Community and Enterprise don't have that gate.

From an API key to a working JSON-2 request

  1. 1

    Set up an integration user

    Calls run with the rights of whoever owns the key. A dedicated user with only the access groups the sync needs means a leaked key can't do more than the job requires, and nobody's personal login breaks the integration when they leave.

  2. 2

    Create the API key

    Preferences Account Security New API Key

    Log in as that user, give the key a description and a duration, and copy it. Odoo shows the value once.

    Watch for: the duration. Odoo's docs cap a key at three months, so put the renewal date somewhere a person will see it.

  3. 3

    Send a search_read

    POST to https://<your-domain>/json/2/res.partner/search_read with the bearer header, an X-Odoo-Database header naming the database, and a body such as {"domain": [["is_company", "=", true]], "fields": ["name"]}. A 200 comes back with a JSON list of matching records.

  4. 4

    Swap in the model you actually need

    Sales orders are sale.order, invoices are account.move, products are product.product. Custom models and custom fields answer the same way, by their technical names.

What breaks an Odoo integration months after it worked

The key expired

How you'll know: Every call suddenly fails authentication, around the same date the key was made a few months back.

Fix: Generate a new key for the integration user and store it as a setting, not in code. Schedule the next rotation before the current key runs out.

A record was written halfway

How you'll know: A sales order exists in Odoo but some of its lines don't, after a call failed partway through.

Fix: Each JSON-2 call is its own transaction and calls can't be chained into one. Send the order and its lines in a single create, or call one server method that does the whole job, and make retries check for the record first.

The sync still uses /xmlrpc or /jsonrpc

How you'll know: Your code imports xmlrpc.client, or posts to /jsonrpc with execute_kw.

Fix: Odoo has scheduled those endpoints for removal in Odoo Online 21.1 (winter 2027) and Odoo 22 (fall 2028). Moving to JSON-2 mostly means changing how you authenticate and address each call. The model and method names stay the same.

Access errors on records the admin can see

How you'll know: The integration user gets access denied, or empty results, where you get data.

Fix: The API applies record rules and access rights exactly as the UI does. Add the missing group to the integration user rather than running the sync as an administrator.

What usually sits on the other end of the key

Odoo's apps share one database, so sales, invoicing and stock already agree with each other. API work starts where something outside Odoo has to agree too: a scheduling or compliance tool with no Odoo module, a legacy system still holding history, or a BI dashboard finance opens every morning instead of Odoo's own reports.

n-frames builds those connections on Odoo's external API for companies whose Odoo is already live: the sync to the outside tool, the pipeline that keeps a dashboard current, and the move from XML-RPC to JSON-2 when an older integration needs it.

Production plans in Odoo, shifts somewhere else

Specialty food producer · Odoo for accounting and stock, a separate shift scheduling tool

Before

Production plans lived in Odoo and staffing lived in the scheduling tool. The two were squared up by hand in a Monday meeting.

After

A production order in Odoo now creates the matching shift needs in the scheduling tool through the API.

The Monday reconciliation meeting turned into a quick look.

Odoo questions developers get asked first

What is Odoo?

Odoo is an open-source suite of business apps (CRM, accounting, inventory, manufacturing, HR, eCommerce and many more) that share one database, so the apps you switch on work together from the start. Every model in it, standard or custom, can be reached through the external API.

Is Odoo free, and does the free version include API access?

Community is free and open source, and when you host it yourself the external API comes with it. On Odoo's own cloud there's also a One App Free plan, but the docs say external API access needs the Custom plan, so it isn't available on One App Free or Standard.

What is the difference between Odoo Community and Odoo Enterprise?

Community is the free, self-hosted edition with a smaller set of apps and no official support. Enterprise is a paid subscription that adds more apps, official support and hosting on Odoo's cloud. For API work the call pattern is the same on both; what you can reach depends on which apps are installed.

Is Odoo good for small businesses?

It can be, if you'd rather run one system across several jobs than stitch single-purpose tools together, and you've got help with the setup a modular ERP needs. It's less turnkey than a tool built for one job.

Is the JSON-2 API a REST API?

Not in the resource-per-URL sense. Every call is a POST naming a model and a method, the same model methods the older RPC endpoints exposed. The difference is plain JSON bodies and a bearer key instead of an RPC envelope.

Does n-frames implement Odoo from scratch?

No. Picking modules, configuring workflows and migrating data in is a separate kind of project with its own specialists. n-frames starts once Odoo is running, building the API connections between it and the rest of what the business uses.

Let's talk

Tell us the one thing your team does manually that eats up time. We read every message and reply within a day.