Update document
update_documentUpdate a document by id. Only the fields you pass are changed.
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": {
"id": "<id>"
},
"name": "update_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | document id | |
| source | No | source | |
| push_as | No | Which sevDesk object this document becomes, i.e. WHO ASSIGNS THE INVOICE NUMBER. "voucher" = we bring our own number (a shop or portal invoice with its own gapless numbering); sevDesk draws none. "invoice" = sevDesk writes the invoice and takes a number from its own debtor range. Leave it unset and it is derived: an outgoing document on a revenue account WITH its own metadata.booking.invoice_number becomes a voucher, without one an invoice; an incoming document is always a voucher. If the derivation is not unambiguous the push refuses rather than guessing. | |
| currency | No | currency | |
| due_date | No | due_date | |
| metadata | No | metadata | |
| vat_code | No | vat_code | |
| direction | No | direction | |
| file_name | No | file_name | |
| file_path | No | file_path | |
| contact_id | No | contact_id | |
| issue_date | No | issue_date | |
| line_items | No | line_items | |
| vat_amount | No | vat_amount | |
| cost_centre | No | cost_centre | |
| vendor_name | No | vendor_name | |
| legal_entity | No | legal_entity | |
| total_amount | No | total_amount | |
| withheld_fee | No | A fee the payment provider KEPT BACK before paying out, as a POSITIVE amount in the document's currency — the way it reads on the settlement ("fee 0.89"). The push adds it as a second, negative position, so the voucher total equals what actually reached the bank and the payment settles to status 1000 instead of leaving the fee open at 750. Without it a gross invoice paid net leaves a phantom receivable against the customer and no record of the fee. Applies to PayPal, Stripe, Amazon, Tipalti — they all settle net. | |
| document_type | No | document_type | |
| document_source | No | document_source | |
| kontenrahmen_id | No | kontenrahmen_id | |
| confidence_score | No | confidence_score | |
| skr_account_name | No | skr_account_name | |
| invoice_direction | No | Which way the invoice points, and with it the booking side in sevDesk: outgoing (a sale) becomes creditDebit D = Einnahme, incoming (a purchase) becomes C = Ausgabe. Leave it unset and the side is derived from the booking account — a revenue account books as D. Set it explicitly whenever the account alone would not say, because the wrong side moves the amount to the wrong side of the P&L. NOTE: this decides the SIDE, not the endpoint — which sevDesk object a document becomes is push_as. | |
| processing_status | No | processing_status | |
| cost_centre_source | No | cost_centre_source | |
| skr_account_number | No | skr_account_number | |
| legal_entity_source | No | legal_entity_source | |
| external_category_id | No | external_category_id | |
| withheld_fee_account | No | SKR account for the withheld fee, default 4700 (Erlösschmälerungen). It has to be a REVENUE-side account: a voucher carries one taxRule and sevDesk validates it against every position's account, so a revenue account and an expense account cannot share a voucher (4338 needs rule 17, 6855 rule 9, 4970 rule 22 — measured). The fee is therefore booked as a revenue reduction, not as an expense. | |
| account_source_detail | No | account_source_detail | |
| external_category_name | No | external_category_name | |
| external_category_source | No | external_category_source |