Create customer
Add a customer with name, type and contact details.
POST https://cotlet.dev/api/v1/bokio/customers
write
Creates a customer and returns its ID for create_invoice. type is company or individual. The customer reaches no one and can be removed in Bokio, so create_customer runs without asking first.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Customer name. |
| type string required | string | company or individual. |
| email string | string | Email address for invoices. |
| org_number string | string | Organisation number, for a company. |
| vat_number string | string | VAT number, for a company. |
Request
curl -X POST https://cotlet.dev/api/v1/bokio/customers \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe","type":"type"}' result = client.call("bokio", "create_customer", {"name":"Jane Doe","type":"type"}) const result = await cotlet.call('bokio', 'create_customer', {"name":"Jane Doe","type":"type"}); cotlet call bokio create_customer --data '{"name":"Jane Doe","type":"type"}' Example response
{
"customer_id": "c7a1e5d2-3b94-4f60-9a1d-5e2f0b8c6d11",
"name": "Nordlys Design AB",
"type": "company"
}