update_article
Updates only the supplied fields on an existing article and uses a version check to block overwrites when the record changed since last read.
Instructions
Change an article. Only the fields you give are changed.
Read it with get_article first: that shows what is there and carries
the version this needs. Two API calls.
If the article changed since that read, nothing is written and the error says so.
Giving price replaces the side named by leading_price and leaves
the other for the API to recompute.
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": {
"article_id": "<article_id>",
"version": "<version>"
},
"name": "update_article"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gtin | No | New barcode number. | |
| note | No | New internal note. | |
| price | No | New price for one unit. | |
| title | No | New title. | |
| 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. | |
| tax_rate | No | New tax rate as a percentage. | |
| unit_name | No | New unit. | |
| article_id | Yes | The article's Lexware id, as returned by search_articles. | |
| description | No | New description. | |
| article_type | No | Change goods to service or back. | |
| leading_price | No | Whether the new price is before or after tax. Left unset, the side the article already used is kept. | |
| article_number | No | New article number. |