Create client
Add a client to your Fakturownia client list.
POST https://cotlet.dev/api/v1/fakturownia/clients
write
Creates a client record. Only name is required. A private person needs company set to false and a last name. Nothing is sent to anyone and the client can be edited or deleted in the app, so create_client runs without asking first.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Client name. |
| tax_no string | string | Tax number (NIP). |
| email string | string | Email address for sending invoices. |
| street string | string | Street and number. |
| post_code string | string | Postal code. |
| city string | string | City. |
| country string | string | Country code. |
| company boolean | boolean | false for a private person. Default: true. |
| last_name string | string | Needed when company is false. |
Request
curl -X POST https://cotlet.dev/api/v1/fakturownia/clients \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe"}' result = client.call("fakturownia", "create_client", {"name":"Jane Doe"}) const result = await cotlet.call('fakturownia', 'create_client', {"name":"Jane Doe"}); cotlet call fakturownia create_client --data '{"name":"Jane Doe"}' Example response
{
"id": 4832,
"name": "Harbor Print Ltd",
"tax_no": "7654321098",
"email": "office@harborprint.example",
"company": true
}