Create relation
Add a customer or supplier with name, address, email, VAT number and IBAN.
POST https://cotlet.dev/api/v1/e-boekhouden/relations
write
Creates one relation. Only name is required; type defaults to business (B) and the code is generated if you leave it out. It reaches nobody and is undone in one call with update_relation (set inactive), so it does not wait for your OK. Check list_relations first so you do not create a duplicate.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Company or person name. |
| type enum | enum | B (business) or P (private). Default: B. |
| address string | string | Primary address. |
| postal_code string | string | Primary postal code. |
| city string | string | Primary city. |
| country string | string | Primary country. |
| email string | string | Email address. |
| email_invoice string | string | Email address for invoices. |
| vat_number string | string | VAT number. |
| iban string | string | IBAN. |
| term_of_payment integer | integer | Default payment term in days. |
Request
curl -X POST https://cotlet.dev/api/v1/e-boekhouden/relations \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe"}' result = client.call("e-boekhouden", "create_relation", {"name":"Jane Doe"}) const result = await cotlet.call('e-boekhouden', 'create_relation', {"name":"Jane Doe"}); cotlet call e-boekhouden create_relation --data '{"name":"Jane Doe"}' Example response
{
"relation_id": 1071,
"code": "KRT001",
"type": "B",
"name": "Kraan Tuinen VOF",
"inactive": false
}