Create relation

Add a customer or supplier (relation) to a division.

POST https://cotlet.dev/api/v1/exact-online/relations

write

Creates a relation with a name, status and optional address and email. It returns the account_id to use in other tools. It sends nothing to anyone and moves no money, so it runs without asking first. Search with search_relations before creating to avoid a duplicate.

Parameters

Parameters: create_relation
NameTypeDescription
division integer integer Division (company) code from list_divisions. Default: the account's current division.
name string required string Name of the company or person.
status enum enum customer or supplier. Default: customer.
email string string Email address for invoices.
city string string City.
country string string Two-letter country code.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/exact-online/relations \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane Doe"}'
Python
result = client.call("exact-online", "create_relation", {"name":"Jane Doe"})
Node.js
const result = await cotlet.call('exact-online', 'create_relation', {"name":"Jane Doe"});
CLI
cotlet call exact-online create_relation --data '{"name":"Jane Doe"}'

Example response

JSON

{
  "account_id": "8a3f1c20-2b6e-4d44-9e0b-7f4c1d2a9002",
  "code": "1043",
  "name": "Van Dijk Design",
  "status": "customer"
}

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.