Correct a draft voucher
sevdesk_update_draft_voucherCorrect a draft voucher's date, document number, supplier, tax rule, and positions, then optionally finalize it to open status for transaction linking.
Instructions
Correct a draft voucher (status 50, Entwurf): date, document number, supplier name, tax rule and the positions (amounts, tax rate, booking account). positions replaces all positions: give the full new list; existing positions are reused in order (they keep their booking account unless accountDatevId is given), extra old ones are deleted. Example: gross 214.20 booked at 0 % -> positions [{sumNet: 180, taxRate: 19}] gives 180.00 + 34.20 VAT = 214.20. Positions you do not replace are sent back as they were entered, net or gross. A new taxRuleId is checked against the voucher's side (expense or revenue) and its position rates. finalize=true also sets the voucher to open (100), needed before sevdesk_link_transaction; every position then needs a booking account. finalize is refused unless the server runs with SEVDESK_ALLOW_BOOKING=true; without it the draft can still be corrected. Refuses open, paid and enshrined vouchers; keeps the attached file; verifies sums and status afterwards. ⚠️ This tool can change data in sevDesk.
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": {
"voucherId": "<voucherId>"
},
"name": "sevdesk_update_draft_voucher"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Show the request without sending it. | |
| finalize | No | Also set the voucher from draft (50) to open (100). Refused unless the server runs with SEVDESK_ALLOW_BOOKING=true. | |
| positions | No | The complete new list of positions. | |
| taxRuleId | No | New tax rule id, e.g. 9 (Vorsteuerabziehbare Aufwendungen). | |
| voucherId | Yes | Numeric voucher id. | |
| description | No | New document number (Belegnummer). | |
| voucherDate | No | New voucher date, yyyy-mm-dd or dd.mm.yyyy. | |
| supplierName | No | New supplier name. |