Add or update a document
wflow_update_documentUpdate or create wflow documents by sending only the fields to change; unspecified fields remain untouched. Reference registers by code, externalId, or id, and include line items.
Instructions
Create (omit id) or update (include id) a document. Only the fields you send are changed — unspecified fields are left untouched.
Registers (costCenter, contract, activity, accountingRule, project, …) are set under accounting and may be referenced by {code}, {externalId} or {id} — wflow resolves them on write. Example accounting: {accounting:{costCenter:{code:"202"}, contract:{code:"12345"}}}.
Line items go in lines (array of {description, quantity, unitPrice, totalAmount, vatRate, costCenter, …}).
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": {
"document": "<document>"
},
"name": "wflow_update_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document | Yes | A DocumentUpdate object. Include `id` to update an existing document. | |
| ignoreLock | No | Temporarily unlock a locked document for the update. | |
| setAsFilled | No | Mark the document flow status as 'Filled' after update. | |
| organization | No |