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
| Name | Type | Description |
|---|---|---|
| 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 -X POST https://cotlet.dev/api/v1/odoo/contacts \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe"}' result = client.call("odoo", "create_contact", {"name":"Jane Doe"}) const result = await cotlet.call('odoo', 'create_contact', {"name":"Jane Doe"}); cotlet call odoo create_contact --data '{"name":"Jane Doe"}' Example response
{
"contact_id": 944,
"name": "Harbor Print",
"email": "accounts@harborprint.example",
"is_company": true
}