upload_file
Uploads a receipt file (PDF, JPEG, PNG or XML) and creates a matching bookkeeping voucher in Lexware Office, so receipts can be captured as unchecked vouchers ready for completion and booking.
Instructions
Upload a receipt, which also creates a bookkeeping voucher for it.
When the voucher already exists, attach_file_to_voucher adds the file to it instead. To book without a receipt, use create_voucher.
Writes real accounting data, and the API cannot take it back: the answer carries a voucherId as well as a file id, and no call here deletes a voucher. Correcting one is a job for the web app. Confirm the organization with get_profile first. One API call, never retried.
Takes PDF, JPEG, PNG or XML, at most 5 MiB, from a path or a URL. An XML file is treated as an XRechnung. The voucher starts unchecked: update_voucher fills it in, and its finalize books it.
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": {
"source": "<source>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | The file: a full path on this machine, or a URL to fetch it from. A URL works only for addresses the account owner allowed. |