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
    • Approvals
    • 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
    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. Technical
  3. JSON/2 API – Odoo 19 Compatibility Layer v 16.0
  4. Sales Conditions FAQ

JSON/2 API – Odoo 19 Compatibility Layer

by David Carreres Gómez https://www.carreres.es/
Odoo
v 16.0 Third Party 8
Download for v 16.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 972
Technical Name odoo_rpc_to_json_2
LicenseLGPL-3
Websitehttps://www.carreres.es/
Versions 16.0 17.0 18.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 972
Technical Name odoo_rpc_to_json_2
LicenseLGPL-3
Websitehttps://www.carreres.es/
Versions 16.0 17.0 18.0
JSON/2 API Module Icon

JSON/2 API — Odoo 19 Compatibility Layer

Bring the power of Odoo 19’s modern API to your current Odoo 16, 17, or 18 instance — without migrating.

✓  Odoo 16 Ready ✓  Odoo 17 Ready ✓  Odoo 18 Ready

With the arrival of Odoo 19, the legacy XML-RPC protocol is formally replaced by the modern, high-performance JSON/2 API. This industrial-grade bridge module lets your existing Odoo instance expose the exact same endpoints — /json/2/<model>/<method> and /jsonrpc2 — so your integrations work today and keep working after the upgrade.

Why choose this module?

🛡️

Enterprise-Grade Security

Bearer token validation using timing-safe hmac.compare_digest. Keys are stored as SHA-256 hashes — never in plain text. Optional expiration dates for every key.

🔭

Dual Endpoint Support

RESTful /json/2/ interface (Odoo 19 native) and the classic /jsonrpc2 envelope. One module, total compatibility with every integrator and automation script.

📊

Audit Logs & Debugging

Every API call is automatically logged: client IP, user, duration in milliseconds, HTTP status, and full error traceback. Debug integrations without touching the server console.

API Keys

Centralized Key Management

Manage all external API access from a single, clean panel inside Odoo. Each key is associated with an Odoo user, inheriting their access control rules natively — no extra configuration needed.

  • Full administrative control over who can access the API.
  • Real-time Active / Archived status per key.
  • Automatic expiration date support.
API Key Management panel in Odoo
Live Test

Works with Any HTTP Client

Test the API instantly from Postman, Insomnia, curl, or any HTTP client. The screenshot shows a live call to /json/2/res.users/search_read returning a 200 OK in 25 ms — authenticated with a Bearer token and the X-Odoo-Database header.

  • Standard HTTP — no proprietary SDK needed.
  • Compatible with Postman, curl, Python, Node.js…
  • JSON response, standard HTTP status codes.
Live API test in Postman showing 200 OK response
Monitoring

Logs & Real-Time Debugging

Shopify sync failing? Amazon connector throwing errors? The API Logs view records every incoming call with surgical precision — client IP, response time (ms), ORM method called, and the exact error traceback.

  • Client IP tracking per request.
  • Millisecond-precision duration logs.
  • Full error trace in developer mode.
API Logs audit panel

Quick Start

# 1. Install the module and generate an API key from the menu
# 2. Call the REST endpoint (Odoo 19-style):

curl -X POST https://your-odoo.com/json/2/res.partner/search_read \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "X-Odoo-Database: your-db" \
    -H "Content-Type: application/json" \
    -d '{"domain": [], "fields": ["name","email"], "limit": 5}'

# 3. Or use the classic JSON-RPC 2.0 envelope:
curl -X POST https://your-odoo.com/jsonrpc2 \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{"jsonrpc":"2.0","method":"call","id":1,"params":{"model":"res.partner","method":"search_read","args":[[]],"kwargs":{"fields":["name"],"limit":5}}}'

How to Use

From installation to your first authenticated API call in under 5 minutes.

1

Install the Module

Place the folder in your addons path, restart Odoo, update the app list, and click Install.

2

Generate an API Key

Go to JSON-RPC 2.0 › Generate API Key. Choose a user, set an optional expiry date, and click Generate Key. Copy the key immediately — it’s shown only once.

3

Send Your Request

Call /json/2/<model>/<method> with the Authorization: Bearer header. Use any HTTP client: curl, Python, Postman, Node.js…

4

Monitor in Odoo

Check JSON-RPC 2.0 › API Logs for a real-time audit trail of every call: IP, user, duration, status, and any error trace.

▶  REST — /json/2/  (Odoo 19 style)
# Search partners (GET-style via POST)
curl -X POST https://your-odoo.com/json/2/res.partner/search_read \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer jrpc2_your_key_here" \
  -H "X-Odoo-Database: your_db" \
  -d '{"domain": [["is_company","=",true]], "fields": ["name","email"], "limit": 5}'

# Create a record
curl -X POST https://your-odoo.com/json/2/res.partner/create \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer jrpc2_your_key_here" \
  -H "X-Odoo-Database: your_db" \
  -d '{"name": "Integration Partner", "email": "api@example.com"}'
▶  JSON-RPC 2.0 — /jsonrpc2  (legacy envelope)
curl -X POST https://your-odoo.com/jsonrpc2 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer jrpc2_your_key_here" \
  -d '{
    "jsonrpc": "2.0", "method": "call", "id": 1,
    "params": {
      "db": "your_db",
      "model": "res.partner", "method": "search_read",
      "args": [[]], "kwargs": {"fields": ["name"], "limit": 5}
    }
  }'

⚠  Error Response Format

On failure, /json/2/ returns a semantic HTTP status code (400, 401, 403, 500) and a consistent JSON body:

{
  "name": "odoo.exceptions.AccessError",
  "message": "You do not have permission to access this document.",
  "debug": "<traceback — only in Odoo debug mode>"
}
🚀

Ready to connect your Odoo?

Install the module, generate your first API key, and start making secure JSON/2 requests immediately. Full backward compatibility — zero performance trade-offs.

🔒  SHA-256 Key Hashing | ⏰  Timing-Safe Auth | 📄  Full Audit Trail | 🌎  EN / ES Translations
Developed and maintained by David Carreres Gómez  •  LGPL-3 License

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, please use the developer contact information. They can usually be found in the description.
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