People and companies
- res.partner holds customers, vendors and their contacts in one model.
- Filter with is_company to separate companies from people.
Open Odoo's developer docs on the 19.0 tab and the API page talks about JSON-2 and bearer keys. Switch to 17.0 and it's XML-RPC with execute_kw. Both are right for their version, which is why tutorials disagree. The model and method names are the same underneath, so once you know which page applies, the rest of the reference carries over.
Same models, same methods, different envelope.
New work belongs on JSON-2 if your version has it. Moving old code is mostly a change to how each call is addressed and authenticated, since the model and method names carry over.
Technical names, the ones the API expects. Labels in the Odoo screens can differ.
A successful JSON-2 call returns HTTP 200 and whatever the method returns, as JSON. A failure returns a 4xx or 5xx and an object with name, message, arguments, context and debug, the last being the server's traceback. The name is usually the quickest clue: an access error, a validation error from a required field, or a missing record.
The API applies the same access rights, record rules and field permissions as the Odoo screens, so an access error usually means the key's user lacks a group, not that the endpoint is wrong. Odoo's docs recommend a dedicated user for integrations rather than a person's login.
Keys have rules of their own. A key lasts at most three months. Generating keys from code through res.users.apikeys needs Settings administration rights unless an admin allows other users, and each user can generate 10 that way by default; an eleventh returns HTTP 422. On 19, Odoo's docs also point to a /doc page on your own database that lists its models, fields and methods. The docs mark that section as under construction.
n-frames writes and maintains Odoo integrations from this reference for companies already running Odoo: the connector to an outside system, the move off XML-RPC, and the monitoring that catches an expiring key before the sync stops. The Odoo API overview walks through a first JSON-2 request, and Odoo integrations covers what usually gets connected.
In the developer reference at odoo.com/documentation, under the version tab you run. On 19.0 it's the External JSON-2 API page, with the older calls on External RPC API. On 17.0 and 18.0 it's a page called External API. Your own fields aren't in any public page, so check your database.
Not resource by resource. JSON-2 on Odoo 19 is the closest: plain JSON over HTTPS with a bearer key, but every call is a POST that names a model and a method. Older versions use XML-RPC and JSON-RPC, which can read, write and search the same models.
Yes. For JSON-2 any HTTP library works, such as requests, posting JSON with the bearer header. For XML-RPC, Python's standard xmlrpc.client is what Odoo's own examples use. Other languages work the same way, since it's all HTTP.
Yes, when you host Community yourself the external API comes with it. The catch is Odoo Online: there, Odoo's docs say external API access needs the Custom plan, so the free One App plan and Standard don't get it. Which models you can reach depends on the apps installed.
Yes. Custom models and custom fields answer to the same methods as standard ones, by their technical names. Call fields_get on the model to see them, since the public docs can't list fields that only exist in your database.