Odoo

App · CRM Systems · 5 actions

Create, search, read, update, and delete records in any Odoo model (contacts, CRM leads, sales orders, products, and more) through Odoo's External API.

Actions

ActionWhat it does
Create a recordCreate a record in any Odoo model (a contact, lead, sales order, product, task, and so on) and get back its new id.
Delete a recordDelete a record from an Odoo model by its id.
Get a recordRead a single Odoo record by its id: handy right after creating one, or once you have an id from a Search step.
Search & read recordsFind records in an Odoo model that match a filter and read their fields in one call: the workhorse for listing contacts, open opportunities, recent orders, and the like.
Update a recordChange field values on an existing Odoo record: update a contact's details, move an opportunity's stage, and so on.

Create a record

Create a record in any Odoo model (a contact, lead, sales order, product, task, and so on) and get back its new id.

Inputs

ModelmodeltextRequired
Odoo model technical name, for example 'res.partner' (contacts & customers), 'crm.lead' (leads & opportunities), 'sale.order' (quotations & sales orders), 'product.template' (products), or 'project.task' (tasks).
Field valuesvaluesobjectRequired
The new record's field values as field-name to value pairs, for example name: 'Acme Inc.', email: 'contact@acme.com'. Use Odoo's technical field names; a many2one field (like a country) takes the related record's id.

Outputs

idnumber
Database id of the new record (use it as Record ID in Get, Update, or Delete).
modeltext
The model the record was created in.
Example output
{
  "id": 42,
  "model": "res.partner"
}

Delete a record

Delete a record from an Odoo model by its id.

Inputs

ModelmodeltextRequired
Odoo model technical name, for example 'res.partner' (contacts & customers), 'crm.lead' (leads & opportunities), 'sale.order' (quotations & sales orders), 'product.template' (products), or 'project.task' (tasks).
Record IDrecord_idnumberRequired
The database id of the record to delete.At least 1.

Outputs

idnumber
The id of the deleted record.
modeltext
The model the record belonged to.
successtrue/false
Whether Odoo deleted the record.
Example output
{
  "id": 42,
  "model": "res.partner",
  "success": true
}

Get a record

Read a single Odoo record by its id: handy right after creating one, or once you have an id from a Search step.

Inputs

ModelmodeltextRequired
Odoo model technical name, for example 'res.partner' (contacts & customers), 'crm.lead' (leads & opportunities), 'sale.order' (quotations & sales orders), 'product.template' (products), or 'project.task' (tasks).
Record IDrecord_idnumberRequired
The database id of the record to read (from a Create or Search step, or the record's URL in Odoo).At least 1.
Fieldsfieldslist
Optional list of field names to return. Leave empty to return every readable field.

Outputs

recordobject
The record's field values, or an empty object if the id no longer exists.
Example output
{
  "record": {
    "email": "contact@acme.com",
    "id": 42,
    "name": "Acme Inc."
  }
}

Search & read records

Find records in an Odoo model that match a filter and read their fields in one call: the workhorse for listing contacts, open opportunities, recent orders, and the like.

Inputs

ModelmodeltextRequired
Odoo model technical name, for example 'res.partner' (contacts & customers), 'crm.lead' (leads & opportunities), 'sale.order' (quotations & sales orders), 'product.template' (products), or 'project.task' (tasks).
Filter (domain)domainlist
Optional Odoo domain: a list of [field, operator, value] conditions, for example [["is_company", "=", true]] or [["email", "=", "contact@acme.com"]]. Leave empty to match every record.
Fieldsfieldslist
Optional list of field names to return, for example ['name', 'email', 'phone']. Leave empty to return every readable field.
Limitlimitnumber
Optional maximum number of records to return.At least 1.
Offsetoffsetnumber
Optional number of matching records to skip (for paging).At least 0.
Sort orderordertext
Optional sort clause, for example 'create_date desc' or 'name asc'.

Outputs

countnumber
How many records this call returned.
recordslist
Matching records, each an object of the requested field values plus its 'id'.
Example output
{
  "count": 1,
  "records": [
    {
      "email": "contact@acme.com",
      "id": 42,
      "name": "Acme Inc."
    }
  ]
}

Update a record

Change field values on an existing Odoo record: update a contact's details, move an opportunity's stage, and so on.

Inputs

ModelmodeltextRequired
Odoo model technical name, for example 'res.partner' (contacts & customers), 'crm.lead' (leads & opportunities), 'sale.order' (quotations & sales orders), 'product.template' (products), or 'project.task' (tasks).
Record IDrecord_idnumberRequired
The database id of the record to update.At least 1.
Field valuesvaluesobjectRequired
The fields to change and their new values, for example phone: '+1 555 0100'. Fields you leave out keep their current values.

Outputs

idnumber
The id of the updated record.
modeltext
The model the record belongs to.
successtrue/false
Whether Odoo applied the update.
Example output
{
  "id": 42,
  "model": "res.partner",
  "success": true
}

On this page