Check the plan and hosting
Start with the version of the database and the features in your subscription. An online store, marketplace, payment provider, or WhatsApp workflow may need an external service to read or change Odoo records. Odoo's JSON-2 documentation limits access through the external API to Custom plans. One App Free and Standard do not include it. Odoo's plan comparison distinguishes those calls from built-in Odoo features that contact outside services. If your design needs the external API, include the plan change in the estimate.
Odoo Online, Odoo.sh, and self-managed installations have different options for running custom code. The hosting documentation says Odoo Online does not support non-standard apps. On Odoo Online, check the built-in connectors and automation rules and keep custom integration code in an external service. On Odoo.sh or a self-managed installation, you can also install a custom module. Include the cost of maintaining it when you compare the options.
Where should the integration logic run?
Which plan and hosting configuration does the database use?
- Odoo Online on a Custom planRun custom code in an external service. Use JSON-2 and available Odoo webhook features.
- Odoo.sh or self-managed installation with a straightforward integrationKeep integration logic external and use the API where practical.
- Odoo.sh or self-managed installation with logic tied to Odoo screens or recordsConsider a custom module and budget for validating and updating it for each major upgrade.
- Standard or One App Free with a requirement for external API callsCheck whether a built-in connector meets the need. Budget for the Custom plan if you need the external API.
Move legacy calls to JSON-2
Older integrations use three services named common, db, and object on the external XML-RPC or JSON-RPC APIs. Odoo's 20.0 RPC documentation says the db service was removed in Odoo 20 and Odoo Online 19.1. The common and object services at /xmlrpc, /xmlrpc/2, and /jsonrpc are scheduled for removal in Odoo Online 21.1 and Odoo 22. Custom controllers declared with type='jsonrpc' follow a separate path and are outside that notice.
JSON-2 arrived in Odoo 19.0. To call a model method, send an HTTP POST to /json/2/<model>/<method>, for example /json/2/sale.order/search_read. Set the Authorization header to bearer followed by an API key and use application/json as the content type. The JSON body contains named method arguments, an ids array when the method acts on specified records, and an optional context object for values such as the interface language. A successful call returns HTTP 200 with the result. An error returns a 4xx or 5xx response with a JSON error object. Review the available models, fields, and methods for your database.
Odoo external API changes by version
- Odoo introduced JSON-2 and deprecated the legacy external RPC APIs
- Odoo removed the legacy db service
- Scheduled removal of the remaining common and object services from the legacy endpoints
- Scheduled removal of those remaining services from the legacy endpoints
On Odoo Online, plan the migration before the applicable rolling upgrade. Odoo's upgrade documentation says mandatory upgrades may take place automatically after the deadline in the notification. An open ticket for an issue in the upgraded test database can put the automatic upgrade on hold if the subscription code is linked to the ticket. Test external callers before the database moves to a release without the legacy service they use.
For Odoo.sh and self-managed installations, compare your upgrade schedule with Odoo's support period. Odoo documents three years of support for each major version. Check the maintenance and upgrade obligations for your deployment separately.
Give integrations their own users and rotate keys
JSON-2 uses API keys linked to users. Odoo requires a description and a duration when you create a key. The value is displayed once and cannot be retrieved later. The documentation gives three months as the maximum validity.
Set an expiry alert and name a person to verify each switch. Create a replacement key while the old one still works, update the integration, check a real permitted operation, and revoke the old key. Use distinct keys for different services and keep them in a managed secrets store. If a key is lost or exposed, revoke it promptly.
Give each automated integration a dedicated user with the permissions it needs. A store connector might create sales orders and read products and stock. Test the bot's model access, record rules, and field access in a separate database. Those permissions determine what the integration or someone with its key can reach.
Odoo documents res.users.apikeys.generate() and res.users.apikeys.revoke() for programmatic rotation. By default, programmatic key management is restricted to users with Settings administration rights. Odoo documents a configurable default limit of 10 programmatically generated keys per user. For servers that host several databases, use X-Odoo-Database when the hostname and server configuration do not identify the database.
Design each write for its own transaction
Each JSON-2 call has its own SQL transaction. Odoo commits it on success and rolls it back on error. Several calls cannot share that transaction.
Consider a web order that requires finding or creating a customer, creating a sales order, and then confirming it. If the second call succeeds and the third fails, the unconfirmed order remains. Retrying from the first step can create a second order.
Use a stable reference such as the web order number. Verify what prevents simultaneous requests with that reference from each creating a record. A lookup followed by a separate write leaves room for a race. Record progress in the integration so a retry can find the order and resume safely. If several writes must commit together, consider a supported server-side method that performs them in one call. For a custom method, account for the hosting limits. The website and ERP integration guide explains duplicate protection and retry rules.
Use webhooks with a way to catch up
Polling detects a change when a query next runs. A webhook can notify a receiving system sooner. Use each where it fits, including a scheduled check for changes a notification missed.
For inbound events, an automation rule can run when a sender posts a payload to an Odoo-generated URL. Odoo's inbound webhook instructions treat the URL as confidential. Rotate it with Rotate Secret when needed and update the sender. Log Calls can help diagnose a failed request. Configure the target-record rule to identify the record safely for the sender's payload. Test a rule on an isolated duplicate before it can make changes in production.
For outbound events, Odoo's automation rules can send a webhook when a configured event occurs, such as confirming an order or validating a delivery. For a notification that points to a record, have the receiver fetch the current record through the authorized API. Record the timestamp of the last successful catch-up and verify that retries include missed changes and avoid duplicates. List the rules that send or receive a webhook and who owns each rule.
Decide what each system owns
Keep mapping and retry rules in the integration service where practical. Record message identifiers and outcomes so staff can reconcile the systems.
A typical external integration around Odoo
- Outside systemsOnline store, marketplace, payment provider, WhatsApp Business Platform, delivery carrier
- Integration serviceMapping, queues, retries, duplicate protection, message identifiers and outcomes
- Odoo JSON-2 API and webhooksDedicated users with limited permissions and rotated API keys
- Odoo appsSales, inventory, accounting, and the localization modules needed for the deployment
Online store. Products, prices, and stock often flow from Odoo to the store. Orders and customer records come back from the store. Assign ownership for each field and decide how to handle stock updates, refunds, and partial shipments.
Marketplaces and delivery platforms. A marketplace may pay in batches after deducting commission and use its own order numbers. Import the individual orders for stock and revenue records, then reconcile the settlement report against them in accounting.
Payment and deferred-payment providers. Use the payment event to create or reconcile a payment against the correct invoice. Keep the provider's transaction identifier to handle refunds and disputes.
WhatsApp. Confirmations and delivery updates often start with an event in Odoo. The WhatsApp Business Platform has separate opt-in and message template rules. Account for the approved template and any message charges in the design.
If e-invoicing requirements apply, confirm that the Odoo version and installed modules support the required invoice format and delivery channel. The platform e-invoicing guide explains how to check.
Check custom modules before setting an upgrade date
Odoo requires compatible versions of installed custom modules before a database upgrade. Ask the module maintainer what needs to change and who will validate the result. Odoo describes the scope of its upgrade service in the upgrade documentation. It covers standard apps, Studio customizations while Studio is installed and its subscription active, and customizations covered by a maintenance subscription. Confirm who maintains any other modules.
An external integration can help you avoid installing a module. It still needs upgrade tests because field names and method behavior can change. List existing integration modules with their maintainer, latest update, and supported Odoo versions. Decide which to retain, update, or replace before an upgrade.
Test with the same permissions as production
Odoo offers upgraded test databases and neutralizes features that could affect operations. The documented examples include scheduled actions, outgoing mail, bank synchronization, and payment and delivery services. Keep all customer-facing effects isolated. Use test destinations or sandbox credentials where you need to exercise them.
Give a dedicated test bot the same permissions as the production bot. A flow that works as an administrator can fail when a bot cannot read a field. Include these cases in each test cycle.
- Send the same order twice and verify that Odoo holds one sales order.
- Expire or revoke the test API key and verify that an alert reaches the named owner.
- Pause the test integration service for an hour, restart it, and verify that the catch-up recovers every change.
- Change the price of a test product in Odoo and measure when the store displays the new price.
- Run the complete flow on an upgraded test database before each major version change.
Migrate one integration at a time
Inventory the legacy callers and compare the new results with the old results before switching production.
- List all systems that call the legacy endpoints, including staff scripts and old connectors. Identify which use
db,common, orobject. - Replace password-based or shared-user access with a dedicated user and a separate key for each integration.
- Move data calls to
/json/2/<model>/<method>and test the same business outcomes, including protection against duplicate writes. Check Odoo's migration reference for legacy operations that use a different replacement. - Set up rotation and expiry alerts and exercise them on a test key.
- Test on an isolated duplicate or upgraded test database, then switch one production integration at a time. Reconcile the first runs and agree when to retire the old caller.
Our API and system integration service covers the inventory, integration service, roles and keys, webhooks, and failure tests. Contact us with the Odoo version, hosting type, and systems to connect.
Questions buyers ask
When do the legacy XML-RPC and JSON-RPC services go away?
Odoo's 20.0 documentation says the legacy db service was removed in Odoo 20 and Odoo Online 19.1. The common and object services on the legacy endpoints are scheduled for removal in Odoo Online 21.1 and Odoo 22. Check the version and upgrade schedule of your own database, and start new data integrations on JSON-2 where available.
Does the Standard plan include the Odoo external API?
Odoo lists external API access for Custom plans. One App Free and Standard do not include it. Odoo draws a distinction between software that calls Odoo's external API and a built-in Odoo feature that calls an outside service. Check the feature, plan, and hosting type you need.
How long can an Odoo API key stay valid?
Odoo asks for a duration when you create the key. The JSON-2 documentation gives three months as the maximum. Set an alert before the actual expiry. Create and test the replacement, update the integration, verify that it works, then revoke the old key.
Can we install a third-party connector on Odoo Online?
Odoo Online does not support non-standard modules. If your plan includes the API, external software can integrate with Odoo Online from its own environment. Check the available built-in connectors and automation features. Use Odoo.sh or a self-managed installation when the connector must run as an installed module.