Create a customer
Add a company or individual customer to your Pennylane customer list.
POST https://cotlet.dev/api/v1/pennylane/customers
write Confirm
Creates a customer and returns its customer_id for create_customer_invoice. Search with list_customers first, because this call does not check for a customer with the same name. It reaches nobody: the customer is not told. It changes your accounting data, so it asks for your OK. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Company name, or the full name of an individual. |
| type enum | enum | company or individual. Default: company. |
| email string | string | Email address the invoice is sent to. |
Request
curl -X POST https://cotlet.dev/api/v1/pennylane/customers \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe"}' result = client.call("pennylane", "create_customer", {"name":"Jane Doe"}) const result = await cotlet.call('pennylane', 'create_customer', {"name":"Jane Doe"}); cotlet call pennylane create_customer --data '{"name":"Jane Doe"}' Example response
{
"customer_id": 4058,
"name": "Bureau Nord",
"type": "company",
"email": "compta@bureau-nord.example"
}