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

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

Example response

JSON

{
  "relation_id": 1071,
  "code": "KRT001",
  "type": "B",
  "name": "Kraan Tuinen VOF",
  "inactive": false
}

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.