Update relation

Change fields of a relation, or set it inactive.

PATCH https://cotlet.dev/api/v1/e-boekhouden/relations/{relation_id}

write

Changes only the fields you pass and leaves the rest. Set inactive to true to retire a relation. It reaches nobody and the old values can be put back with another call, so it does not wait for your OK. Invoices already created keep their data.

Parameters

Parameters: update_relation
NameTypeDescription
relation_id integer required integer Relation ID from list_relations.
name string string New name.
address string string Primary address.
postal_code string string Primary postal code.
city string string Primary city.
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.
inactive boolean boolean true to retire the relation.

Request

cURL
curl -X PATCH https://cotlet.dev/api/v1/e-boekhouden/relations/1 \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("e-boekhouden", "update_relation", {"relation_id":1})
Node.js
const result = await cotlet.call('e-boekhouden', 'update_relation', {"relation_id":1});
CLI
cotlet call e-boekhouden update_relation --data '{"relation_id":1}'

Example response

JSON

{
  "relation_id": 1071,
  "name": "Kraan Tuinen VOF",
  "email_invoice": "boekhouding@kraantuinen.example",
  "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.