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
| Name | Type | Description |
|---|---|---|
| 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 -X PATCH https://cotlet.dev/api/v1/e-boekhouden/relations/1 \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("e-boekhouden", "update_relation", {"relation_id":1}) const result = await cotlet.call('e-boekhouden', 'update_relation', {"relation_id":1}); cotlet call e-boekhouden update_relation --data '{"relation_id":1}' Example response
{
"relation_id": 1071,
"name": "Kraan Tuinen VOF",
"email_invoice": "boekhouding@kraantuinen.example",
"inactive": false
}