Get original document link
get_attachmentReturns a short-lived link to the original document filed against something in the books: the receipt behind a posted expense, a photo waiting in the shoebox, or the receipt, sales note, supplier bill, bank-in slip or name card riding a pending draft. Takes owner plus the id of what owns it: for a posted expense, the expenseId from search_expenses (plus its attachmentId when it carries more than one file); for a draft, the draftId; for a shoebox photo, its id from shoebox_items. search_expenses rows and every create_*_draft / revise_draft result say whether an original is on file. Returns a signed URL (about 15 minutes, usable by anyone holding it), the filename, the media type and the size in bytes. The file's bytes are not inlined, and Taokeh does not read or OCR the file. An approved draft reports no original, because on approval the file moves onto the posted document. Read-only; it emails nobody, and no link reaches another company.
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": {
"owner": "<owner>",
"id": "<id>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The owner's id — the expenseId from search_expenses for 'expense', otherwise the draftId a create_*_draft or revise_draft call returned. | |
| owner | Yes | What the original hangs off: 'expense' = a posted paid expense (id = expenseId from search_expenses); 'expense_draft' / 'invoice_draft' / 'bill_draft' / 'quote_draft' / 'receipt_draft' / 'payment_draft' / 'contact_draft' = a pending draft (id = its draftId); 'shoebox' = an unread phone photo (id from shoebox_items). | |
| attachmentId | No | Which file, when a posted expense carries more than one — the `attachmentId` from that expense's `attachments` list in search_expenses. Omit for a draft (a draft carries at most one original), and omit for an expense with exactly one file. |