Create a contact

Add a customer contact, a person or a company.

POST https://cotlet.dev/api/v1/odoo/contacts

write

Creates one contact and returns its ID. It reaches nobody and sends no email, and you can archive the contact in Odoo with one click, so it does not wait for your OK. Check list_contacts first: this call does not stop you from creating a duplicate.

Parameters

Parameters: create_contact
NameTypeDescription
name string required string Contact name.
email string string Email address, used when you send an invoice.
phone string string Phone number.
is_company boolean boolean true: a company. Default: false.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/odoo/contacts \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane Doe"}'
Python
result = client.call("odoo", "create_contact", {"name":"Jane Doe"})
Node.js
const result = await cotlet.call('odoo', 'create_contact', {"name":"Jane Doe"});
CLI
cotlet call odoo create_contact --data '{"name":"Jane Doe"}'

Example response

JSON

{
  "contact_id": 944,
  "name": "Harbor Print",
  "email": "accounts@harborprint.example",
  "is_company": true
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.