create_contact
Create a new customer or vendor contact in Lexware Office with addresses, contact details, and roles. Verify the profile and search existing names first, since created contacts cannot be deleted via the API.
Instructions
Create a new customer or vendor in the account.
Writes real accounting data, and the API cannot take it back:
there is no call that deletes a contact, though the web app does.
Confirm the organization with get_profile first, and search the
name with search_contacts: Lexware allows a second contact with the
same name, and later documents then attach to either at random. One
API call.
Returns the id and version, not the record. Lexware assigns the customer and vendor numbers, so read the contact back to see them.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"kind": "<kind>",
"name": "<name>",
"roles": "<roles>"
},
"name": "create_contact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Whether this contact is a company or a private person. A contact is one or the other and cannot be changed from one into the other afterwards. | |
| name | Yes | The company name, or for a person the last name. Give the first name separately. | |
| note | No | Free-text note on the contact, at most 1000 characters. | |
| No | One email address. On an update it replaces the ones the contact has rather than adding another. | ||
| phone | No | One phone number. As with the email address, this replaces rather than adds. | |
| roles | Yes | What this contact is to the account: a customer, a vendor, or both. At least one is required. On an update this replaces the roles the contact has, so pass both to keep both. | |
| first_name | No | First name. Persons only. | |
| salutation | No | Salutation such as 'Frau' or 'Herr'. Persons only. | |
| tax_number | No | National tax number. Companies only. | |
| billing_address | No | The billing address. A contact has at most one. | |
| shipping_address | No | The shipping address. A contact has at most one. | |
| vat_registration_id | No | VAT registration id, for example 'DE123456789'. Companies only. |