Upload a document
upload_documentUpload a document as it was received: an invoice, a receipt, a statement. With no arguments it lists the ways in for this company, the one that needs nobody at the top (round 819). upload_link=true returns a link for 24 hours that a shell sends the files to (curl -F file=@invoice.pdf -F file=@invoice2.pdf and the link; the answer lists each document_id): up to 30 files, PDF, JPEG, PNG or XML, 15 MB each, each into Documents; the answer carries the curl line. A shell that reads the file but cannot reach app.octobooks.ai (a sandbox proxy refuses it) sends it in parts: file_sha256 (sha256sum of the file), parts, part (1 to parts), content_base64 the part's text (base64 -w0 FILE cut into pieces of 20,000 characters), part_sha256 (sha256sum of that piece) and the same filename and kind each time; a part that does not match its part_sha256 is refused at once, send that part again; with the last part the file is stored. source_url: an https share link of one file open to anyone with it (Google Drive, Dropbox or any public address): the server fetches it, 15 MB at most, public addresses only. kind: in (the default: a document received) or sales_invoice (an invoice the company issued itself, as a past invoice to book). content_base64: the original file bytes, base64 (the attachment itself, not a summary; at most 5 MB). filename: its name with its ending. For an email attachment give message_id (the mail system's own id), sender and received_at (ISO time). The file is stored write once and registered; the same bytes twice are stored once. Nothing is booked and nothing is read here: the server reads it later, and it then shows on the open list. Needs the right upload. No receipt (feature 534): when the supplier's document of a payment cannot be had, give own_receipt_bank_line (the bank line's id) and own_receipt_reason (what it was for, in the owner's words, 10 characters or more) in place of a file: Octobooks writes an own receipt (one page PDF; Eigenbeleg for DE and AT), files it on the line so it no longer counts as missing, and says if the booking reclaims VAT that needs the supplier's invoice. Needs the right to book; refused for money in and for a line that has its document.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "upload_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | in | |
| part | No | ||
| parts | No | ||
| sender | No | ||
| company | No | ||
| filename | No | ||
| message_id | No | ||
| source_url | No | ||
| file_sha256 | No | ||
| part_sha256 | No | ||
| received_at | No | ||
| upload_link | No | ||
| source_system | No | gmail | |
| content_base64 | No | ||
| own_receipt_reason | No | ||
| own_receipt_bank_line | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||