Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries ⟶
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    • Affiliate Program
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Productivity
  3. Odoo REST API v 19.0
  4. Sales Conditions FAQ

Odoo REST API

by Modvanta https://modvantaapps.tech/odoo-apps/rest-api/
Odoo

$ 19.94

v 19.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
You bought this module and need support? Click here!
  • Description
  • Manifest
  • License
Odoo REST API with OAuth2 - Odoo 19 module by Modvanta
Odoo 19 REST API OAuth2 + PKCE OpenAPI / Swagger Report API Attachments Custom endpoints Audit log
Buy Now - $20Ask a Question

Built and supported by Modvanta - modvantaapps@gmail.com

What it does

A REST API and OAuth2 server for Odoo, documented from your own permissions

Connecting a webshop, a mobile app or a data tool to Odoo usually means XML-RPC and a full user login. This module adds a plain JSON REST API under /api/v1 with standard verbs and status codes, API keys that only work for this API, and an OAuth2 server for applications that act for a person.

You decide what each integration may touch: resources per model, readable and writable fields, which reports it may print, whether it may read or upload attachments, and no-code custom endpoints for one job. Scopes narrow each key and each OAuth2 client further. Every call runs as an Odoo user, so record rules and multi-company rules always apply, and every call is logged.

Who it is for

For businesses connecting other software to Odoo

Developers and integrators

OAuth2, OpenAPI, Postman, ETags, paging headers and idempotent creates.

Owners and IT

Each integration gets its own scopes, rate limit and kill switch.

App builders

Mobile and web apps sign people in with OAuth2 and PKCE.

Key features

What you get

1OAuth2 server: client credentials

Register a server-side application, generate its secret (shown once, stored only as a hash) and choose the Odoo user it acts as, its scopes, token lifetime and its own calls-per-minute limit. The token endpoint answers with a Bearer token that expires; Revoke All Tokens stops every live one at once.

OAuth2 server: client credentials

2Authorization code with PKCE for apps

A mobile or browser app is a public client: no secret, PKCE (S256) is required. Redirect URIs are matched exactly, character for character, so a look-alike URL is refused instead of receiving the code.

Authorization code with PKCE for apps

3The person approves, the app acts as them

The user signs in to Odoo and sees which application asks for which scopes. Allow sends a single-use code to the registered redirect URI; the app exchanges it with its PKCE verifier for an access token and a refresh token. The page cannot be framed by another site.

The person approves, the app acts as them

4Tokens you can see and revoke

Every issued token with its client, user, grant, scopes and expiry. Refresh tokens rotate: each one works once, and a refresh token that comes back after use revokes the whole chain. Revocation and introspection endpoints follow RFC 7009 and RFC 7662.

Tokens you can see and revoke

5API keys with scopes and their own rate limit

Generate a key from the user form and give it scopes such as partners:read reports, plus its own calls per minute. Keys only work for this API, never for XML-RPC. The key is shown once; Odoo keeps a hash.

API keys with scopes and their own rate limit

6One list of every key

Scopes, rate limit and expiry for each key, and a Revoke button that stops the key at once.

One list of every key

7Report API and attachments per resource

Pick which reports a resource may print: GET /api/v1/partners/<id>/report/card returned a real PDF on our bench. Allow attachments read only, or upload and delete too. A report or file is only served for a record the caller can read through the resource, record rules included.

Report API and attachments per resource

8No-code custom endpoint builder

Shape a URL for one job, such as /api/v1/custom/contacts-by-city?city=..., without code: model, operation (list, count, read, create, update or run an action), a fixed filter, returned fields and parameters, each mapped to one field and cast to its type. Nothing typed here is executed as code.

No-code custom endpoint builder

9OpenAPI 3.1 and Swagger UI, generated

The document is built from the same settings that enforce access, so it lists the report, attachment and custom endpoint routes, the OAuth2 flows and the scope each call needs, and nothing else.

OpenAPI 3.1 and Swagger UI, generated

10Model explorer and Postman collection

Every resource of a profile with its fields, types, relations and whether they can be changed, plus a Postman collection generated from the same document. The collection never contains a key.

Model explorer and Postman collection

11Settings

Kill switch, default calls per minute per key or client, If-Match on updates, audit log retention, the largest upload and the accepted file types. The type is detected from the file content, not trusted from the client; HTML, SVG and scripts are never accepted.

Settings

12Every call in the audit log

Method, path, user, credential, status and duration of each call, including the refused ones, and the OAuth consents and token issues.

Every call in the audit log

Also included from version 1.0

Changes that wait for a person (create, update, delete or an action returns 202 and is applied only after approval), ETag and If-Match so two clients cannot overwrite each other, Idempotency-Key so a retried call does not create a second record, RFC 9457 error bodies, and a field explorer on each resource.

How it works

Step by step

1

Install the module

The API answers under /api/v1 on your Odoo URL; a REST API menu appears in Odoo.

2

Expose resources

Pick the models, the URL name for each, what may be read and changed, reports and attachments.

3

Give access

Generate a scoped API key on a user, or register an OAuth2 client.

4

Call the API

Send the key or token as Authorization: Bearer <token>. GET, POST, PATCH and DELETE, reports, attachments and custom endpoints.

5

Share the docs

Open the generated Swagger page or export the Postman collection for your developers.

Settings

What you can configure

SettingWhereWhat it does
REST API EnabledSettingsKill switch for every call.
Calls per MinuteSettings, key, OAuth2 clientDefault per key or client; each key or client can have its own.
Attachment UploadsSettingsLargest file and accepted file types (detected from the content).
Require If-Match on UpdatesSettingsRefuses updates that do not carry the record's ETag.
Keep Audit Log (days)SettingsA daily job trims older rows.
ScopesAPI key, OAuth2 clientread, write, reports, attachments, endpoints, or per resource such as partners:read.
ResourcesREST API > ResourcesModel, rights, readable and writable fields, filter, page sizes, actions, reports, attachments.
Custom EndpointsREST API > Custom EndpointsURL, operation, model, fixed filter, fields, parameters.
OAuth2 ClientsREST API > OAuth2Client type, grants, user, redirect URIs, scopes, token lifetimes.

FAQ

Questions buyers ask

Does a call see more than the Odoo user could?

No. Every call runs as the key's user or the user who approved the OAuth2 app, so access rights, record rules and multi-company rules apply. On our tests a user of one company got 404 for another company's contact on read, update, delete, report, attachment and custom endpoint calls.

How are tokens and secrets stored?

As SHA-256 hashes of 256-bit random values, compared in constant time. API keys use Odoo's own key store. Secrets and keys are shown once.

Which OAuth2 flows are supported?

Client credentials, authorization code with PKCE (S256), refresh token with rotation, revocation and introspection, and the authorization server metadata at /.well-known/oauth-authorization-server.

Can a custom endpoint run Python?

No. Filters are literal domains, parameters are typed and mapped to fields, and an action endpoint can only call a public method that is not on a forbidden list.

What did you test?

132 automated tests run on every build, including cross-company and wrong-id tests on records, reports and attachments, PKCE and redirect URI checks, token replay, scope and rate limit checks, and a test that calls every operation listed in the generated OpenAPI document.

Where does Swagger come from?

The /api/v1/docs page loads the Swagger UI files from a public CDN, so the browser opening it needs internet access. The OpenAPI JSON itself is served by Odoo at /api/v1/openapi.json.

Compatibility

Works with

Odoo 19 Community Odoo 19 Enterprise Depends on: base, base_setup, mail

Built and tested on Odoo 19. No extra Python packages.

Connect your other software to Odoo safely

Questions before buying, help with setup, or a change you need: write to us and a developer answers.

Buy Now - $20Email Support

SUPPORT

modvantaapps@gmail.com

AUTHOR

Modvanta

INCLUDED

Source code, free bug fixes for Odoo 19

Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 4051
Technical Name mdv_rest_api
LicenseOPL-1
Websitehttps://modvantaapps.tech/odoo-apps/rest-api/
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with