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

Parameters: create_customer
NameTypeDescription
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
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"}'
Python
result = client.call("bokio", "create_customer", {"name":"Jane Doe","type":"type"})
Node.js
const result = await cotlet.call('bokio', 'create_customer', {"name":"Jane Doe","type":"type"});
CLI
cotlet call bokio create_customer --data '{"name":"Jane Doe","type":"type"}'

Example response

JSON

{
  "customer_id": "c7a1e5d2-3b94-4f60-9a1d-5e2f0b8c6d11",
  "name": "Nordlys Design AB",
  "type": "company"
}

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.