Create client
Add a client with name, VAT number or tax code and address.
POST https://cotlet.dev/api/v1/fatture-in-cloud/clients
write
Creates a client and returns its ID. For e-invoices, pass the e-invoice code or certified email. A client reaches nobody and can be deleted in Fatture in Cloud, so this call runs without asking first.
Parameters
| Name | Type | Description |
|---|---|---|
| company_id integer | integer | Company ID. Optional when your account has one company. |
| name string required | string | Client name. |
| vat_number string | string | VAT number. |
| tax_code string | string | Tax code. |
| address object | object | street, postal_code, city, province and country. |
| e_invoice_code string | string | E-invoice code (ei_code) of the client. |
| certified_email string | string | Certified email (PEC) of the client. |
Request
curl -X POST https://cotlet.dev/api/v1/fatture-in-cloud/clients \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe"}' result = client.call("fatture-in-cloud", "create_client", {"name":"Jane Doe"}) const result = await cotlet.call('fatture-in-cloud', 'create_client', {"name":"Jane Doe"}); cotlet call fatture-in-cloud create_client --data '{"name":"Jane Doe"}' Example response
{
"id": 5118,
"name": "Studio Verdi SRL",
"vat_number": "09876543210",
"e_invoice_code": "M5UXCR1"
}