Odoo is one of the most versatile and widely used ERP platforms, offering a complete suite of applications for CRM, accounting, inventory, HR, eCommerce, and more. Its modular design allows businesses of all sizes to streamline operations from a single platform. However, in reality, most organizations also rely on other specialized tools, such as Shopify for online sales, Salesforce for CRM, or ADP for payroll. The challenge lies in making these systems communicate seamlessly with each other.
That’s where the Odoo API becomes essential. With its strong set of integration capabilities, Odoo enables businesses to automate processes, reduce errors, and maintain real-time data consistency across platforms. Whether it’s syncing eCommerce orders, updating payroll data, or consolidating financial reports, Odoo APIs provide the flexibility to connect internal systems and scale operations effectively.
In this blog, we’ll cover core concepts, common use cases, authentication methods, step-by-step examples of the Odoo API, and how you can integrate Odoo using Knit.
Let's get started
What is Odoo & Why Does It Matter?
Odoo is an open-source enterprise resource planning (ERP) platform that helps businesses manage a wide range of core functions in one place. Instead of using separate tools for accounting, sales, HR, inventory, and online stores, Odoo provides an integrated system where everything works together.
What Odoo Does
Why Odoo Matters to Organizations
- Single Source of Truth: Odoo brings multiple business functions together, reducing the need for disconnected systems and ensuring consistency of data.
- Efficiency: Automates tasks such as invoicing, payroll, and stock updates, saving time and reducing manual work.
- Compliance & Security: Protects business and employee data with access controls and user permissions, while supporting compliance needs.
- Scalability: Works for small businesses starting with a few apps, as well as larger enterprises needing complex operations.
- Decision-Making: Provides reporting and can connect with analytics tools, giving managers real-time insights to make informed decisions.
Key Terminology of Odoo API
Before working with the Odoo API, it helps to understand some of the basic terms. These terms are often used in Odoo’s documentation and when writing integration code.
- Database (DB): Every Odoo system runs on a database. Each company usually has its own database, and in some cases, multiple databases can exist on the same Odoo server (multi-tenant setup). When connecting to the API, you need to specify which database you want to work with.
- Model: A model is like a table that represents a type of business object. For example: res.partner → stores customers and contacts
- Record: A record is a single entry inside a model. For instance, if the model is res.partner, then each customer is one record in that model.
- Fields: Fields are the attributes or columns inside a model. For example, a customer (res.partner) record may have fields like name, email, phone, and address. When using the API, you often read, update, or create these fields.
- XML-RPC API: XML-RPC (Remote Procedure Call) is the older API method provided by Odoo. It uses XML messages to interact with Odoo. While it may feel a little outdated, it is still reliable and widely supported across different Odoo versions.
- JSON-RPC API: JSON-RPC is Odoo’s modern API that works in a REST-like style. It uses JSON data format instead of XML, which is easier for developers to work with, especially in web and mobile applications.
- Modules: Odoo is built from modules. Each module adds a set of features (like Sales, HR, or Inventory). Modules also expose their models and fields through the API, which means you can access and extend them programmatically.
- Authentication: To connect to Odoo via API, you must authenticate. The most common way is by providing:
- Database name
- Username
- Password
In newer Odoo versions (14+), you can also use an API key instead of a password for added security.
Odoo API Integration Use Cases
Odoo becomes more powerful when it is connected with the other platforms and tools a business already uses. Below are some of the most common situations where Odoo API integrations can save time, reduce errors, and make daily operations smoother.
1. eCommerce Integration
For businesses that sell products online, it’s important to keep sales, stock, and accounting in sync. Manually transferring order information from your online store to Odoo can be slow and prone to mistakes. With an integration, this process happens automatically.
- Order Syncing: Orders from platforms like Shopify, Magento, or WooCommerce can be sent directly into Odoo’s Sales module. This means the sales team doesn’t have to re-enter order details.
- Stock Updates: When an item sells online, the stock levels in Odoo can be updated immediately. This prevents overselling and ensures that both the online store and warehouse show the correct numbers.
- Automated Invoicing: As soon as an order is confirmed, Odoo can generate the invoice in its Accounting module without any manual work.
2. HR & Payroll Automation
Managing employee data across multiple systems can lead to duplication and mistakes. Odoo’s HR module can be connected with payroll software to make things easier.
- System Link: Odoo HR can be integrated with payroll providers like ADP or Gusto.
- Automatic Updates: When employee information such as job title, attendance, or deductions changes in Odoo, the same information is sent to the payroll system automatically.
- Consistency Across Systems: This avoids duplicate entries and ensures that payroll calculations are always correct and based on the latest data.
3. Inventory Management Across Channels
When a company sells products through multiple channels (e.g., online stores, marketplaces, and physical shops), keeping track of stock becomes a challenge. Odoo integrations help manage this more effectively.
- Real-Time Stock Sync: Inventory in Odoo can be synced with platforms like Amazon or eBay. This ensures that product availability is consistent across all sales channels.
- Prevent Overselling: Linking Odoo with POS systems and warehouse data helps prevent selling items that are out of stock.
- Centralized Tracking: Businesses can monitor all product movements, regardless of whether the sale happened online, in a physical store, or through a marketplace.
4. Customer Data Centralization
Customer information often exists in different systems—some in a CRM, others in marketing tools, and others in sales systems. This can make it hard to get a complete view of each customer. Odoo APIs help by bringing all this data together.
- CRM Syncing: Leads and customer details from tools like HubSpot, Salesforce, or Zoho CRM can be integrated into Odoo’s CRM module.
- Shared Data: All departments, from sales to support, have access to the same up-to-date customer information.
- Single Source of Truth: With data stored in one place, businesses can avoid duplication and mistakes while providing a better customer experience.
5. Finance & Analytics
Financial data is most valuable when it can be analyzed and used for decision-making. Odoo’s Accounting and Sales data can be integrated with external reporting and analytics platforms.
- Data Export: Accounting and sales information from Odoo can be connected to Power BI, Tableau, or Google Data Studio.
- Automated Reporting: Reports can be generated automatically without needing to manually export spreadsheets from Odoo.
- Real-Time Dashboards: Managers and finance teams get instant insights into performance, cash flow, and other key metrics.
Odoo API Architecture
1. API Types: Odoo offers two main types of APIs, XML-RPC and JSON-RPC. XML-RPC is the traditional method and works in all Odoo versions, while JSON-RPC (often considered REST-like) is supported in newer versions and provides modern JSON responses. JSON-RPC is easier to work with for web and mobile integrations, while XML-RPC remains reliable and widely used.
2. Endpoint Structure: Each Odoo API endpoint serves a different purpose. For example:
- /xmlrpc/2/common → Used for authentication (logging in).
- /xmlrpc/2/object → Used for performing operations on models (create, read, update, delete records).
- /web/dataset/call_kw → Used for JSON-RPC calls when working with models in a REST-like way.
3. API Documentation: Odoo’s API documentation provides details on both XML-RPC and JSON-RPC methods, including available endpoints, parameters, and request/response formats.
- Odoo XML-RPC API: XML-RPC uses XML messages to communicate with Odoo. It is stable and works across all Odoo versions, making it suitable for integrations that require compatibility over time.
- Odoo JSON-RPC API: JSON-RPC is a modern alternative that returns data in JSON format, making it easier for developers to integrate with web and mobile applications. It simplifies reading and writing records in Odoo and is widely used in newer projects.
- Odoo API Example: For instance, using the JSON-RPC API, you can authenticate a user through /web/session/authenticate and then fetch customer records from the res.partner model. This allows developers to quickly connect Odoo with other systems while keeping data consistent.
Authentication & Authorization
To use the Odoo API, every request must be authenticated. Odoo provides different methods depending on the API type and version. Understanding these methods will help you choose the right one for your integration.
XML-RPC - Database, Username, and Password
XML-RPC is the traditional API method in Odoo, and it works in all versions. To log in, you provide the database name, a username (usually the login email), and a password. These credentials are sent to the /xmlrpc/2/common endpoint.
If the login is successful, Odoo returns a user ID (uid). This uid is then used in requests sent to the /xmlrpc/2/object endpoint, where you can perform actions such as creating records, updating invoices, or reading sales orders.
While XML-RPC is simple and reliable, it is considered less secure than newer options because it relies on passwords.
JSON-RPC - Session-Based Authentication
JSON-RPC is Odoo’s modern API, similar in style to REST, and is easier to use in web and mobile applications. Authentication happens through the /web/session/authenticate endpoint.
When you send the database name, username, and password, Odoo creates a session if the login is successful. This session acts like a cookie and can be reused for future API calls, which removes the need to repeatedly send login details.
This method is widely preferred for newer integrations since responses are returned in JSON format, which is easier to process and integrate into modern applications.
API Key Authentication (Odoo v14 and Above)
From version 14 onwards, Odoo introduced API key authentication. A user can generate an API key from their profile settings and use it in place of the password when making XML-RPC or JSON-RPC calls.
API keys are more secure because they can be revoked or regenerated at any time without changing the main user password. This makes them highly recommended for production environments. For long-term integrations, API keys provide the best balance of security and flexibility.
When to Use Each Method
- XML-RPC with username and password is best if you need compatibility with older Odoo versions. It’s simple and reliable, but less secure because it depends on passwords.
- JSON-RPC with sessions is suited for modern applications where JSON responses are easier to work with. It avoids repeatedly sending login details and is more convenient for web or mobile integrations.
- API key authentication (v14 and above) is the most secure option. Keys can be generated, revoked, or rotated without affecting the main login, making this method ideal for new integrations and production environments.
Security Best Practices
Regardless of which method you use, follow these security guidelines:
- Use HTTPS: Always send requests over HTTPS to keep usernames, passwords, and API keys encrypted during transmission.
- Least privilege access: Create a dedicated integration user with only the permissions it needs. Avoid giving full admin rights to API users.
- Separate environments: Use different credentials for sandbox and production. This prevents test activity from accidentally affecting live data.
- Protect secrets: Store passwords or API keys in environment variables or a secret manager instead of hard-coding them in code or repositories.
- Rotate credentials: Update passwords and regenerate API keys on a regular schedule. Revoke unused or old keys immediately.
- Audit and monitor: Keep logs of API usage and set up alerts for unusual patterns such as repeated failed logins or access from unknown locations.
Step-by-Step: Building an Odoo Integration
Integrating with Odoo can look complicated at first, but breaking it into clear steps makes the process manageable. This guide explains everything from preparing your Odoo environment to making live API calls in production.
Step 1: Setting Up an Odoo Instance & Database
Your Odoo instance is like your private ERP environment. Every integration connects to a specific database inside this instance.
Options for Setup
- Odoo Online
- Sign up at odoo.com.
- Get a hosted instance instantly.
- Sign up at odoo.com.
- Local Installation (Developer Setup)
- Install Odoo manually (Python + PostgreSQL).
- Or use Docker (quickest way) - dockerrun-p 8069:8069 --nameodoo--linkdb:db -todoo:16
- Create a Sandbox Database
- Log in to Odoo and click Create Database.
- Use this for testing your API integration (never test on production).
✅ At this stage, you should be able to log in to Odoo at http://localhost:8069 (or your Odoo Online URL) and access your test database.
Step 2: Creating a Dedicated API User
Using the admin account for integrations is insecure. Instead, create a dedicated API Integration User.
Steps:
1. Log in to your Odoo instance as the "userodoo" user.
2. Go to the "Settings" menu and click on the "Users" submenu.
3. Click on the "Create" button to create a new user.
4. Enter the details for the new user, including the login email and password.
5. Under the "Access Rights" tab, select the groups that you want the new user to belong to. To give the new user the same permissions as the "userodoo" user, you can select the same groups that the "userodoo" user belongs to.
6. Click on the "Save" button to save the new user.
Step 3: XML-RPC vs JSON-RPC - Choosing the Right API
When building an Odoo integration, one of the first choices you’ll need to make is:
Should I use XML-RPC or JSON-RPC?
Both are supported in Odoo, and both expose the same models and operations. However, they differ in how they handle requests, responses, and ease of use. Let’s break it down.
XML-RPC - The Traditional and Reliable Option
XML-RPC has been part of Odoo since the beginning and is still widely used today, especially in cases where backward compatibility is important.
Advantages of XML-RPC APIs
Limitations
- Uses XML payloads, which are heavier and harder to read.
- Responses are less convenient to handle compared to JSON.
How to Work with XML-RPC:
- Authenticate via /xmlrpc/2/common.
- Perform operations (create, read, update, delete) via /xmlrpc/2/object.
- Generally used with Python’s xmlrpc.client library.
JSON-RPC - The Modern and Flexible Choice
JSON-RPC is Odoo’s newer API style. It behaves much like a REST API, making it easier for developers who are familiar with modern web apps.
Advantages of JSON-RPC APIs
Limitations
- Available only in newer Odoo versions.
- Older environments may not fully support JSON-RPC.
How to Work with JSON-RPC:
- Authenticate via /web/session/authenticate.
- Perform operations via /web/dataset/call_kw.
- Works smoothly with Python requests, cURL, or Postman.
Which One Should You Choose?
Step 4: Authenticating with Odoo
1 XML-RPC Authentication
import xmlrpc.client
url = "http://localhost:8069"
db = "test_db"
username = "api_user@company.com"
password = "your_password" # or API key in v14+
common = xmlrpc.client.ServerProxy(f"{url}/xmlrpc/2/common")
uid = common.authenticate(db, username, password, {})
print("User ID:", uid)
If successful, Odoo returns a User ID (uid), which must be passed in future calls.
2 JSON-RPC Authentication
import requests
url = "http://localhost:8069/web/session/authenticate"
db = "test_db"
username = "api_user@company.com"
password = "your_password"
payload = {
"jsonrpc": "2.0",
"params": {
"db": db,
"login": username,
"password": password
}
}
response = requests.post(url, json=payload)
print(response.json())
If valid, Odoo returns a session ID, which works like a cookie for all future API requests.
3 API Key Authentication (v14+)
- Log in to Odoo.
- Go to My Profile → Account Security → API Keys.
- Generate a new key.
- Replace your password with this key in XML-RPC/JSON-RPC requests.
Step 5: Identifying Models & Fields
Odoo is built on a modular structure where everything revolves around models.
A model in Odoo is like a table in a database, and each model contains fields that act as columns to store specific information. Models represent business objects such as customers, sales orders, invoices, employees, and more.
Understanding which model and fields you need is essential before making any API calls. This ensures that your integration is fetching or updating the right data.
Commonly Used Models in Odoo
Here are some frequently used models and what they represent:
- res.partner → Used for managing customers, suppliers, and contacts.
- sale.order → Stores sales orders created by customers.
- account.move → Handles invoices, journal entries, and financial transactions.
- stock.picking → Manages stock movements such as deliveries, receipts, and internal transfers.
- hr.employee → Represents employee records, including details like job position, department, and personal data.
How to Discover Models and Fields
To find the right model and its fields in your Odoo instance, follow these steps:
Enable Developer Mode
1. Go to Settings in your Odoo dashboard.
2. Scroll down and select Activate the Developer Mode (sometimes called “Debug Mode”).
3. This mode provides access to technical details of records.
Open a Record
1. Navigate to the module you want to work with (e.g., Customers, Sales, or Employees).
2. Open a specific record (for example, a single customer profile).
View Technical Details
1. In the record view, click on the bug/developer tools icon (visible once developer mode is active).
2. Select View Fields or View Metadata.
3. You will see details like:
- Model Name → e.g., res.partner
- Field Names → e.g., name, email, phone, company_id, etc.
This information tells you exactly what model and which fields you can use in your API request.
Example
Suppose you want to fetch customer details through the API:
- Model: res.partner
- Fields: name, email
Request (Python - XML-RPC):
partners = models.execute_kw(
db, uid, password,
'res.partner', 'search_read',
[[]], {'fields': ['name', 'email'], 'limit': 5}
)
print(partners)
Response (JSON):
[
{"id": 5, "name": "Azure Interior", "email": "azure@example.com"},
{"id": 7, "name": "John Doe", "email": "john@example.com"}
]
Step 6: Making API Calls
Use Case 1: Reading Customer Records
Request (XML-RPC):
partners = models.execute_kw(
db, uid, password,
'res.partner', 'search_read',
[[]], {'fields': ['id', 'name', 'email'], 'limit': 2}
)
Response:
[
{"id": 5, "name": "Azure Interior", "email": "azure@example.com"},
{"id": 7, "name": "John Doe", "email": "john@example.com"}
]
Elaboration:
- This is a read request (like a GET).
- The model is res.partner (Odoo’s contact/customer table).
- The method search_read both searches and returns records.
- The empty list [] means “no filter” → return all customers.
- fields=['id', 'name', 'email'] tells Odoo which fields to include in the response.
limit=2 restricts the number of records returned.
Use Case 2: Creating a New Customer
Request (JSON-RPC):
payload = {
"jsonrpc": "2.0",
"method": "call",
"params": {
"model": "res.partner",
"method": "create",
"args": [{
"name": "Jane Smith",
"email": "jane@example.com"
}]
}
}
Response:
{"result": 12}
Elaboration:
- This is a create request (like a POST).
- The model is res.partner.
- The method create inserts a new record.
- The args dictionary contains the field values: name and email.
- The response 12 is the ID of the new record created in Odoo.
Use Case 3: Updating Customer Information
Request (XML-RPC):
result = models.execute_kw(
db, uid, password,
'res.partner', 'write',
[[12], {'phone': '+123456789'}]
)
Response:
Updated: True
Elaboration:
- This is an update request (like a PUT/PATCH).
- The model is res.partner.
- The method write updates an existing record.
- The first parameter [[12]] specifies which record ID(s) to update.
- The dictionary {'phone': '+123456789'} provides new values for fields.
Response True confirms the record was updated successfully.
Use Case 4: Deleting a Customer
Request (JSON-RPC):
payload = {
"jsonrpc": "2.0",
"method": "call",
"params": {
"model": "res.partner",
"method": "unlink",
"args": [[12]]
}
}
Response:
{"result": true}
Elaboration:
- This is a delete request (like DELETE).
- The model is res.partner.
- The method unlink deletes records.
- The parameter [[12]] specifies the record ID to remove.
- Response true means the record was successfully deleted.
Use Case 5: Creating a Sales Order
Request (XML-RPC):
order_id = models.execute_kw(
db, uid, password,
'sale.order', 'create',
[{
'partner_id': 5,
'order_line': [(0, 0, {
'product_id': 42,
'product_uom_qty': 2
})]
}]
)
Response:
Created Order ID: 25
Elaboration:
- This is a create request (like POST).
- The model is sale.order (sales orders in Odoo).
- The partner_id links the order to a customer (ID = 5).
- order_line defines products: (0, 0, {...}) means “create a new line”.
- product_id=42 → product being sold.
- product_uom_qty=2 → quantity.
- product_id=42 → product being sold.
Response 25 is the ID of the new sales order.
Step 7: Testing in a Sandbox
Before you move your Odoo integration into production, it is strongly recommended to test everything in a sandbox (test) environment. A sandbox is a safe space where you can try out your API requests without affecting your real business data.
1. Create Test Data
Inside your sandbox Odoo instance, create some sample records such as:
- Customers (res.partner)
- Sales Orders (sale.order)
- Invoices (account.move)
- Products and Inventory records (product.product, stock.picking)
This allows you to run API calls on realistic data and verify results.
2. Run API Calls with Tools
You can test your API calls in two main ways:
- Python scripts: Write XML-RPC or JSON-RPC calls using the Odoo endpoints.
- Postman: A GUI tool where you can test API calls by entering URLs, headers, and JSON payloads.
For example, test creating a new customer or reading existing sales orders.
3. Verify in the Odoo UI
After running an API request, log into your Odoo interface and check if the data was updated correctly. For example:
- If you created a customer via the API, confirm that the record appears in the Contacts module.
- If you added a sales order, check that it is visible under Sales → Orders.
4. Debug Common Errors
During testing, you may face errors. Some of the most common are:
- “Access denied” → The API user account does not have the required permissions. You may need to adjust user roles or groups.
- “Invalid field” → You are trying to use a field that doesn’t exist in the chosen model. Double-check the model’s fields in developer mode.
- “Authentication failed” → Credentials are wrong, or the API key is not valid. Verify that you are using the correct database name, username, and key.
Testing in a sandbox helps catch these issues early so that they don’t occur in production.
Step 8: Moving to Production
After testing in the sandbox, update your configuration to point to the production system. Replace the sandbox database name and server URL with production values, and use the production integration user. Instead of passwords, generate an API key for this user and store it in a secure secrets manager.
All communication should use HTTPS to keep data encrypted. Apply least-privilege access by giving the integration user only the permissions needed for its tasks, such as Sales or Accounting, rather than full administrative rights.
It is also important to enable logging and monitoring. Keep records of API requests and responses to make troubleshooting easier, and monitor response times and error rates to identify problems early.
If you’re using Knit, you can take advantage of its built-in observability dashboards, which provide real-time visibility into your integration. This makes debugging and monitoring much easier, ensuring a smooth transition from sandbox to production.
Best Practices for Integrating with Odoo’s API
Integrating Odoo’s API requires more than just writing code. A successful integration depends on good planning, proper security, and ongoing maintenance. Below are some practical guidelines to follow.
1. Planning and Preparation
Before you start, define the purpose of your integration. Be clear on whether you want to automate certain workflows, synchronize data between systems, or build a completely new process.
Take time to analyze your current workflows and identify where Odoo’s API can make improvements. Map out the data that needs to be exchanged, decide whether the flow will be one-way or two-way, and determine if updates should be real-time or in scheduled batches.
Finally, check compatibility. Make sure the external system can communicate with Odoo’s API (whether via XML-RPC or JSON-RPC/REST) and note if customizations or middleware are required.
2. Security and Authentication
API integrations deal with sensitive data, so security should be a priority.
- API Keys: Always use API keys for authentication, and store them in a secure place. Avoid putting them directly in source code.
- HTTPS: Ensure that all communication between Odoo and external systems happens over HTTPS to prevent data leaks.
- Access Control: Limit API users to only the models and fields they actually need. Assign proper roles and follow the principle of least privilege.
3. Development and Implementation
When building the integration, choose the API type that best fits your needs. XML-RPC works across all Odoo versions, while JSON-RPC (REST-like) is better suited for modern applications that expect JSON responses.
Check if Odoo already has connectors or community modules for the integration you want. Using these can save time and ensure compatibility.
Make sure your code has proper error handling in place. API calls can fail for reasons like network issues, permission errors, or invalid data. Your integration should log these failures and handle them gracefully.
Always test thoroughly in a development or staging environment before going live. Validate that the data being exchanged is accurate and that all workflows behave as expected.
4. Maintenance and Scalability
A good integration doesn’t end at deployment—it needs to be maintained.
Document your integration carefully. Include API endpoints, data mappings, and instructions for handling errors. This will make it easier to troubleshoot and update later.
Set up monitoring and alerts to keep track of API usage, response times, and failures. Catching issues early reduces downtime and prevents data mismatches.
Plan ahead for growth. Design your integration to handle larger data volumes and potential business changes so it remains reliable as your organization scales.
5. Tools and Resources
Take advantage of resources that make development and testing easier:
- Official Documentation: Use Odoo’s API documentation to understand endpoints, methods, and data structures.
- Testing Tools: Tools like Postman or Insomnia can help you test API calls and review responses before you write code.
- Expert Support: For complex integrations, you may benefit from working with certified Odoo partners who have specialized expertise.
Webhooks in Odoo
Odoo introduced webhook support in version 17, and it is available in both the Community and Enterprise editions. In Odoo 18, webhooks have become a practical way to connect Odoo with other systems using event-driven, push-based communication.
A webhook is essentially an automated message sent over HTTP. Instead of continuously polling Odoo for updates, webhooks allow you to send or receive data only when an event happens. This makes integrations more efficient and responsive.
How it Works
Webhooks in Odoo are event-driven. They are not running constantly in the background but are triggered when a specific action takes place. For example, a webhook can be fired when a customer is created, when a product is updated, or when a sales order is confirmed. Instead of waiting for systems to poll Odoo for updates, these events trigger immediate communication. When an event occurs, Odoo can either push data to an external system or accept data from one.
Push vs. Pull
In push mode, Odoo sends an HTTP request to a defined external URL whenever the event happens. For example, when a sales order is confirmed in Odoo, it can automatically send the order details to a logistics provider’s API.
In pull mode, the flow is reversed. An external system sends a POST request with its own data payload to an Odoo webhook URL. Odoo then processes that request and takes the appropriate action. A common example is when an e-commerce platform posts product details into Odoo to automatically create a matching product record.
Configuration
Webhooks are configured through Odoo Studio, using automated actions. The process generally includes:
- Selecting the trigger event (e.g., “when a new opportunity is created”).
- Specifying the action (sending a webhook request to a given URL).
- Defining the payload structure (the data Odoo should send).
Key Features
- No Coding Required (for Odoo-to-Odoo integrations): If you’re connecting two Odoo databases, the setup can often be done entirely in Studio, without writing custom code.
- External Tool Support: To connect with third-party systems, you may need tools like Postman for testing endpoints and validating payloads.
- Base Automation Module: Webhooks depend on Odoo’s Base Automation module, so this must be installed before you can configure them.
- Developer Mode: Activating developer mode is recommended to access advanced configuration and troubleshooting options.
Example Use Cases
Odoo webhooks enable real-time data synchronization and automation across systems. Here are practical scenarios showcasing their application in business workflows.
1. Syncing Data with E-commerce Platforms: When a new product is added in WooCommerce, a webhook automatically creates the same product in Odoo, ensuring seamless inventory alignment.
2. Real-Time Inventory Updates: An external POS confirms a sales order, and Odoo receives a webhook request to instantly adjust inventory levels, maintaining accurate stock data.
3. Logistics Integration: Upon confirming a sales order in Odoo, the system pushes order details to a third-party logistics provider via a webhook for efficient fulfillment.
4. Accounting System Integration: Invoice data in Odoo is sent in real time to an external accounting tool through a webhook, streamlining reconciliation processes.
Steps to Use Odoo Webhooks
Setting up webhooks in Odoo requires installing modules, configuring automations, and testing the setup. Follow these steps to implement webhooks effectively.
Step 1: Navigate to the Apps menu, search for "Base Automation," and install it. This module is essential for creating automation rules and enabling webhooks.
Step 2: Go to Settings and activate Developer Mode to unlock advanced options and debugging tools necessary for webhook configuration.
Step 3: Access Odoo Studio from the Apps menu, create a new automated action, and select the event that triggers the webhook, such as record creation, update, or deletion.
Step 4: Choose the relevant model (e.g., Sales Order, Product, Customer), set the condition (e.g., “Sales Order confirmed”), and configure the action to “Send Webhook” with the external system’s URL.
Step 5: Use a tool like Postman to verify that the webhook fires correctly. Send test requests to confirm Odoo delivers data to the specified URL and check logs to ensure the payload aligns with the external system’s expectations.
How Knit Simplifies Odoo Integrations
Integrating directly with Odoo can be complex; you need to manage RPC protocols, access rights, users, API keys, and ongoing maintenance. Knit makes this much easier with a unified REST API, rated #1 for ease of use in 2025. It not only connects with Odoo but also with 40+ other systems, including ERP, CRM, HRIS, Payroll, ATS, and Accounting, all through a single interface.
Why Choose Knit for Odoo Integrations?
Unified API: Instead of building separate integrations for every ERP, Knit gives you one REST API that works with multiple systems, including Odoo.
Developer-Friendly: Knit comes with clear documentation, intuitive endpoints, and fewer complexities, making it easier for developers to get started.
Scalable: Whether you’re handling a few records or millions, Knit is built to process large amounts of data without slowing down.
Reliable Support: Knit provides robust error handling and a responsive support team, so your integration stays smooth and reliable.
Frequently Asked Questions (FAQs)
Here are answers to common questions about integrating Odoo's API using Knit, a unified platform that simplifies connections and adds features like virtual webhooks.
Q. What APIs does Odoo provide for integration?
A: Odoo supports two main APIs: the XML-RPC/JSON-RPC API, a legacy option for create, read, update, and delete (CRUD) operations on all models, and the REST API, available through community modules or custom setups for modern integrations. Both interact with models like res.partner (customers), sale.order (sales), and account.move (accounting).
Q. Why integrate Odoo with Knit instead of directly using APIs?
A: Direct Odoo API integration requires managing authentication, field mapping, and error retries, plus building custom connectors for each third-party system. Knit simplifies this with:
- A unified API schema across platforms.
- Virtual webhooks for near real-time updates.
- Prebuilt connectors to save development time.
Q. How do I authenticate Odoo’s API inside Knit?
A: To authenticate, provide your Odoo instance URL (e.g., https://mycompany.odoo.com), database name (for on-premise setups), username or email, and an API key from the user profile. Knit’s Odoo connector validates these to establish a secure connection.
Q. Which Odoo modules can I integrate with Knit?
A: Knit supports most Odoo modules, including:
- CRM: leads, opportunities, contacts.
- Sales: orders, quotations, invoices.
- Inventory & Procurement: stock moves, products, vendors.
- Accounting: journals, invoices, payments.
- HR: employees, payroll, attendance. These are mapped to Knit’s unified objects for syncing with CRMs, HRIS, ERPs, and finance systems.
Q. What if Odoo doesn’t support real-time webhooks?
A: Knit’s virtual webhooks poll Odoo’s APIs for changes and generate events like "New Invoice Created" or "Customer Updated," delivering near real-time notifications without custom polling logic.
Q. How does Knit handle Odoo’s API limits?
A: Odoo’s SaaS edition has rate limits around 60 requests per minute. Knit manages this through:
- Backoff and retry strategies.
- Bulk fetching with pagination (offset, limit).
- Logging throttled requests to prevent data loss.
Q. Can I sync data both ways (Odoo ↔ Other Systems)?
A: Yes, Knit enables bi-directional syncing. Pull data from Odoo to your system via Knit, or push data into Odoo, like creating customers from a CRM, with field-level mapping for precision.
Q. How secure is the integration?
A: Knit ensures security by storing OAuth2 or API keys in its vault, using HTTPS/TLS encryption for all traffic, and supporting Odoo user role restrictions (e.g., read-only access). Logs are available for auditing.
Q. Do I need coding knowledge to integrate Odoo with Knit?
A: Basic setup, like connecting Odoo in Knit, requires no coding. For advanced customizations, such as unique models or workflows, a developer may be needed to extend Odoo’s API or adjust mappings.
Q. What are common use cases for Odoo + Knit integration?
A: Knit supports scenarios like syncing customer and order data to CRMs (e.g., HubSpot, Salesforce), pushing invoices to accounting tools (e.g., QuickBooks), updating employee records to payroll systems, centralizing inventory with e-commerce platforms, and streaming data to BI tools for reporting.