Overview
A client-mode connector for a curated manufacturing / inventory / maintenance slice of the Odoo External JSON-2 API underhttps://YOUR_ODOO_HOST/json/2/:
BASE_ADDRESS is the Odoo host root (no trailing slash). Topics use erp/odoo/<object>/<verb>.
This template targets External JSON-2 (Odoo 19+):
POST /json/2/{model}/{method} with a Bearer API key. Legacy /jsonrpc and /xmlrpc/2 (authenticate + execute_kw) are deprecated and scheduled for removal (target Odoo 22). Use JSON-2 for new integrations.Odoo Online external API access requires a Custom plan. Replace
YOUR_ODOO_HOST, pass a user API key, and set X-Odoo-Database when the host serves multiple databases. Prefer Hub secrets for keys. This template has not been verified against a live tenant.Basic Syntax
Events
Auth
Bearer API key (JSON-2) — default in the template:- In Odoo: Preferences → Account Security → New API Key. Copy the key once; store it in Hub secrets.
- Pass the key (and database when required) on the MQTT request payload so headers resolve:
Authorization: Bearer {value.json.api_key} and X-Odoo-Database: {value.json.database}. Prefer Hub secrets / GET SECRET. Never commit real keys.
Legacy JSON-RPC / XML-RPC (not in this template): authenticate(db, login, password) then execute_kw(db, uid, password, model, method, args, kwargs). Password may be an API key on some deployments. Prefer migrating to JSON-2.
Example bodies
search_read manufacturing orders:create argument names follow your Odoo version ORM (vals_list vs single vals). Discover models/methods on the database /doc page when available.
Deploy
- Copy
OdooRestApi.lot(noADD METADATA). - Replace
YOUR_ODOO_HOSTinBASE_ADDRESS. -addRouteon the broker (or Hub deploy).- Publish JSON to a request topic; subscribe to the matching
/responsetopic.
STATUS "beta") is in hub-metadata.lot for Hub / -listTemplates only.
Status
Blocked until a live authenticated call succeeds (factory has no Odoo host or API key). Unblock with lab host + database (if needed) + API key, then smokePOST /json/2/mrp.production/search_read expecting HTTP 200.

