update_contact
Modify an existing Lexware contact by sending only the fields you want changed. Supply the version from a prior read to prevent overwriting concurrent edits.
Instructions
Change an existing contact. Only the fields you give are changed.
Writes real accounting data. Read the contact with get_contact
first: it shows what is there and carries the version this needs.
Two API calls.
If the contact changed since that read, nothing is written and the error says so. Read it again and decide what to do with the change you would have overwritten.
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": {
"contact_id": "<contact_id>",
"version": "<version>"
},
"name": "update_contact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New company name, or for a person the last name. | |
| 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 | No | Replaces the contact's roles. Leave unset to keep them. Passing only one role removes the other. | |
| version | Yes | The `version` from the record as you last read it. If the record has changed since, the update is refused instead of overwriting that change. | |
| contact_id | Yes | The contact's Lexware id, as returned by search_contacts or referenced by a voucher. | |
| first_name | No | New first name. Persons only. | |
| salutation | No | New salutation. 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. |