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. Extra Tools
  3. Advanced REST API: JSON CRUD, OpenAPI Swagger Docs, API Keys, OAuth2, Webhooks with HMAC v 18.0
  4. Sales Conditions FAQ

Advanced REST API: JSON CRUD, OpenAPI Swagger Docs, API Keys, OAuth2, Webhooks with HMAC

by Viyug Infotech https://viyuginfotech.com
Odoo

$ 86.56

v 18.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Versions 16.0 17.0 18.0 19.0 20.0
You bought this module and need support? Click here!
Versions 16.0 17.0 18.0 19.0 20.0
  • Description
  • Manifest
  • License
Advanced REST API for Odoo

A secure REST API for Odoo, configured in minutes

Publish the models you choose as JSON resources with scoped API keys or OAuth2, let integrators explore an interactive documentation page, push changes to other systems with signed webhooks and follow every call in the request log.

REST API OpenAPI / Swagger docs API keys OAuth2 Webhooks Rate limits

3
ways to authenticate: keys, OAuth2, Odoo API keys
OpenAPI 3
spec and docs page generated live
6 retries
per webhook delivery, then dead letter

Free setup call with every purchase

After you buy, book a free 30-minute online call: we install the app with you and set it up for your company. Questions are answered within 24 hours, Monday to Saturday, at support@viyuginfotech.com or on WhatsApp (QR code at the end of this page).

Before and after

For companies connecting webshops, mobile apps, BI, automation tools (Zapier, Make, n8n) or partners to Odoo.

Before

  • Integrators get an all-or-nothing login and call any model through XML-RPC
  • Passwords or long-lived tokens copied into scripts, no expiry, no limits
  • Polling Odoo every few minutes to find out what changed
  • No trace of who called what when an integration breaks

After

  • Each partner gets a key for the resources, fields and operations you chose
  • Hashed, expiring keys or short-lived OAuth2 tokens, rate limits and IP allow-lists
  • Signed webhooks push creates, updates and deletes the moment they happen
  • A request log with bodies, timing and replay, and a request id in every answer

What you get

🔗

Any model as a resource

List, read, create (one or a batch), update, delete and upsert any business model, with field selection, JSON domains, simple filters, sorting, paging links and total count.

🔑

Scoped, hashed, expiring keys

Keys per user, per resource and per operation, hashed at rest, shown once, with expiry, rotation, revocation, rate limit and IP allow-list.

🎫

OAuth2 client credentials

Client ID and secret for server integrations, short-lived tokens, scope narrowing, revocation endpoint and Basic or form client authentication.

🤝

Works with Odoo API keys

Users can also call the REST API with the API key from their Odoo preferences, the same key used for XML-RPC and JSON-RPC. Switch it off in the settings.

🛡

Security first

Never sudo for data: access rights, record rules, field groups and companies of the key user apply. No session cookies, no passwords in requests, failed-login throttle per IP.

⚙

Methods, files and reports

Call allowed public methods on records or on the model, upload and download binary fields and attachments, print published reports as PDF.

📊

Aggregates

Group by up to three fields (dates by day, week, month, quarter or year) with sum, average, minimum, maximum and distinct counts.

📄

OpenAPI 3 and docs page

The specification is generated from your configuration and served with an interactive documentation page by Odoo itself. Import openapi.json into Postman, Insomnia or a code generator.

📤

Webhooks with HMAC

Create, update and delete events with trigger fields, filters, payload fields, signatures, retries with back-off, dead letters, resend and a private-network guard.

📝

Request log and replay

Status, timing, key, IP, redacted bodies, request id in every answer, graph and pivot analysis, one-click replay, retention period.

🔄

Retry-safe writes

Idempotency-Key on create returns the first answer to a retried request; upsert finds an existing record by a key field such as a reference.

🏢

Multi-company

Keys work in their main company and the other companies you allow; clients pick one with the X-Company-Id header. Keys, clients, webhooks and logs follow company rules.

How it works

1

Publish resources

Pick models, fields, records and operations.

2

Hand out keys

API keys or OAuth2 clients scoped to those resources.

3

Clients call /rest/v1

JSON in and out, documented by the OpenAPI file.

4

Odoo pushes events

Webhooks deliver signed changes with retries.

Setup in 5 steps

1. Install and open REST API

The menu shows the overview, resources, keys, webhooks and the log.

2. Run Quick Setup

Choose models, access level and the user the key acts as; copy the secret.

curl -H "Authorization: Bearer $API_KEY" \
"$ODOO/rest/v1/contacts?limit=5"

3. Refine the resources

Fields, record filter, methods, reports and upsert key per resource.

4. Share the documentation

Send the docs page or openapi.json to the integration developer.

5. Add webhooks

Point events at the other system and give it the signing secret.

Workflow walkthrough

From publishing a resource to a signed webhook arriving at the other system.

1

Quick setup in one dialog

Pick the models to publish (here contacts and sales orders), the access level and the Odoo user the key acts as. Each model becomes a resource with suggested response fields; nothing is exposed that you did not choose.

Quick setup in one dialog
2

The secret is shown once

The key is stored only as a SHA-256 hash. Copy the secret and the ready-to-run curl command now; a lost secret is rotated, never displayed again.

The secret is shown once
3

Resources: fields, records and operations

A resource maps one model to /rest/v1/<path>. Choose the fields clients may read and write, the fields returned by default, a record filter (for example only companies), list/create/update/delete, attachments and an upsert key. Passwords, tokens and secrets are never exposed, whatever you select.

Resources: fields, records and operations
4

Business methods and PDF reports

Allow public methods such as action_confirm or action_post, and printable reports. Clients confirm an order with POST /sales-orders/<id>/call/action_confirm and download the quotation PDF from /report/<name>.

Business methods and PDF reports
5

API keys scoped per resource and operation

Each key acts as one Odoo user and reaches only the listed resources with at most the ticked operations. Expiry date, rate limit per minute, IP allow-list, other companies, usage counter and rotate or revoke in one click.

API keys scoped per resource and operation
6

OAuth2 client credentials

For server-to-server integrations: a client ID and a hashed secret exchanged at /rest/v1/oauth/token for short-lived bearer tokens, optionally narrowed with scope. Rate limit and IP allow-list apply to all tokens of the client; revoke all tokens at once.

OAuth2 client credentials
7

Documentation page served by Odoo

An interactive documentation page generated from the live OpenAPI 3 file: authentication, filters, paging, idempotency, errors and webhook verification code. It loads nothing from external sites.

Documentation page served by Odoo
8

Try requests from the documentation

Paste a key, fill fields, domain, order or limit and send the request. The answer shows status, time, total count, remaining rate limit and request id, with curl, Python and JavaScript snippets for the same call.

Try requests from the documentation
9

From any client: list, filter, create

A real exchange: list companies with selected fields, a JSON domain and paging links, then create a contact with an Idempotency-Key. The retry with the same key returns the first answer instead of creating a duplicate.

From any client: list, filter, create
10

Token, method call and PDF in three calls

Get an OAuth2 token, confirm a quotation through its business method, read the order back and download its PDF. Every step runs with the access rights of the key user.

Token, method call and PDF in three calls
11

Outgoing webhooks on create, update and delete

Pick the model, the events, the fields that trigger an update, a record filter and the payload fields. Here the warehouse is told about confirmed orders only. Extra headers, timeout and attempts per webhook.

Outgoing webhooks on create, update and delete
12

Signed deliveries on the receiving side

Each delivery carries the event, a delivery id and an HMAC-SHA256 signature over the time stamp and the raw body. The receiver verifies it with the shared secret in a few lines of code, shown in the documentation.

Signed deliveries on the receiving side
13

Retries, dead letters and resend

Deliveries are queued in the same transaction as the change, sent by a background job and retried after 1 minute, 5 minutes, 30 minutes, 2, 6 and 12 hours. Failures end as dead letters you can retry or resend.

Retries, dead letters and resend
14

Request log with replay

Every call is logged with status, duration, key, user, resource, IP and the request and response bodies (secrets masked). Administrators replay a call with the same key to reproduce an integration problem.

Request log with replay
15

Overview of every resource

Requests, errors and average response time per resource for the last seven days, with graph and pivot views of the traffic in the Monitoring menu.

Overview of every resource

Compared with typical alternatives

FeatureThis appTypical alternatives
Fields, record filter and operations chosen per resourceYesWhole models exposed, per-model switches
Keys hashed, shown once, expiring, scoped per resource and operationYesPlain tokens, model-level rights
OAuth2 client credentials with scoped short-lived tokensYesMissing, or extra Python libraries needed
Accepts the Odoo API keys users already haveYesSeparate credentials only
Rate limit per key with standard headers, failed-login throttleYesOne global limit or none
IP allow-list per key and clientYesRarely available
Idempotency-Key on create, upsert and batch createYesDuplicates on network retries
Aggregates, files, attachments and PDF reportsYesPartly, often separate endpoints to code
OpenAPI 3 file and docs page without external CDNYesDocs loaded from a public CDN or a code generator site
Webhooks with HMAC signature, retries, dead letters and resendYesA separate paid module, or none
Request log with masked bodies and replayYesLog only, or nothing
Quick setup wizard with a ready curl commandYesConfiguration by hand

Questions

Does it replace the API that comes with Odoo?

No. It runs next to XML-RPC and JSON-RPC and adds what those do not: resource-level field and record control, scoped keys, OAuth2, rate limits, documentation, webhooks and a request log. Users can keep using their Odoo API keys with this API too.

Can a key read more than its user?

No. Requests run as the key user with their access rights, record rules, field groups and companies. The resource and the key can only narrow that further.

Are passwords or tokens ever returned?

No. Fields whose names hold passwords, tokens, secrets or API keys are refused in the configuration and filtered from answers, filters, sorting and webhook payloads.

How do I call it on a server with several databases?

Set dbfilter so that the host name selects one database, as on Odoo.sh. The address is shown in the settings.

Does it work behind nginx or a load balancer?

Yes. Run Odoo with proxy_mode so that the real client address is used for IP allow-lists, throttling and the log.

Can webhooks call services inside my network?

Only if you allow private network targets in the settings. It is off by default to prevent server-side request forgery.

Can browser applications call it?

Yes, list the allowed origins in the CORS setting. Keys travel in the Authorization or X-API-Key header, never in a cookie.

How do I import it into Postman or generate a client?

Import /rest/v1/openapi.json. Postman, Insomnia and OpenAPI code generators read it directly.

What do clients see when something is wrong?

A JSON error with status, code, message and request id, and the matching HTTP status: 400, 401, 403, 404, 409, 422 or 429 with Retry-After.

Who can configure it?

REST API administrators publish resources, clients and webhooks and read the full log. REST API users manage their own keys and see the log of their keys.

Need a hand?

Questions about connecting a system to Odoo, keys, OAuth2 or webhooks? Write to us and Viyug Infotech will get back to you.

Email support: support@viyuginfotech.com
Website: viyuginfotech.com

Scan with your phone to chat on WhatsApp or write us an email:

WhatsApp QR code for Viyug Infotech support

WhatsApp

+91 83207 42187

Email QR code for Viyug Infotech support

Email

Send us an email

Release notes

Initial release

  • Resources with field, record and operation control; batch create, upsert, aggregates, methods, files, attachments and reports
  • API keys, OAuth2 client credentials and Odoo API keys; rate limits, IP allow-lists, failed-login throttle
  • OpenAPI 3 file and interactive documentation page served by Odoo
  • Webhooks with HMAC signatures, retries, dead letters and resend; request log with replay
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 4046
Technical Name viyug_rest_api
LicenseOPL-1
Websitehttps://viyuginfotech.com
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