Create contact
Save a new customer or supplier in Lexware Office.
POST https://cotlet.dev/api/v1/lexware-office/contacts
write
Saves a contact in your master data; Lexware Office creates a debtor or creditor account for it and suggests it on future documents. It reaches no one and is undone by archiving or deleting the contact in the app, so it does not ask for your OK.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Company name, or a person's full name. |
| role enum | enum | customer or vendor. Default: customer. |
| email string | string | Email address used by send_document. |
| street string | string | Street and house number. |
| postal_code string | string | Postal code. |
| city string | string | City. |
| country string | string | Two-letter country code. Default: DE. |
Request
curl -X POST https://cotlet.dev/api/v1/lexware-office/contacts \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe"}' result = client.call("lexware-office", "create_contact", {"name":"Jane Doe"}) const result = await cotlet.call('lexware-office', 'create_contact', {"name":"Jane Doe"}); cotlet call lexware-office create_contact --data '{"name":"Jane Doe"}' Example response
{
"contact_id": "c_88d0e1",
"name": "Studio Fjord",
"role": "customer",
"customer_number": "10057",
"email": "hallo@studiofjord.example"
}