get_vouchers_by_id_receipt
Calls GET /api/vouchers/{id}/receipt as the signed-in person · REST reference
A short-lived link to the invoice PDF a claim is paid on
Mints a link, valid for expiresInSeconds (300), to the voucher's stored invoice PDF — the evidence PFF approves a claim against. The link is minted only once storage confirms it holds the file, and opens the PDF directly; the voucher itself only holds an s3:// URI no browser can fetch. A link is a short-lived credential: anyone holding it can open the file until it expires. Org-scoped by the voucher features. The invoice is the CLAIMING CLINIC's document, so it is linked for a platform reader and for the clinic that took the voucher (claimedByOrgId) only; the org holding the voucher to distribute it reads the voucher but is answered 404 here. A voucher the caller may not read at all answers exactly as one that does not exist.
Arguments
| Argument | Type | Description | |
|---|---|---|---|
idpath | string (uuid) | required | Voucher id. A non-UUID value answers 404 without touching the DAL. |
Example call
A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_vouchers_by_id_receipt",
"arguments": {
"id": "11111111-1111-4111-8111-111111111111"
}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
The link.
{
"expiresInSeconds": 1,
"filename": "string",
"url": "string"
}Fields
| Field | Type | Description |
|---|---|---|
expiresInSeconds | integer | How long url works from when it was minted. |
filename | string | null | The name the clinic's file had when it was uploaded. |
url | string | Presigned GET URL of the PDF. |
When it fails
A failed call returns isError: true with the API's message as text.
403The caller is not platform staff and holds a voucher feature in no organization.
404No voucher the caller may read (
Voucher not found); no invoice on file, or one the caller may not read (Invoice not found); orcode: INVOICE_FILE_MISSING— the voucher records its invoice as STORED and storage holds no such file.
What the model is shown
This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.
{
"name": "get_vouchers_by_id_receipt",
"description": "GET /api/vouchers/{id}/receipt — Mints a link, valid for `expiresInSeconds` (300), to the voucher's stored invoice PDF — the evidence PFF approves a claim against. The link is minted only once storage confirms it holds the file, and opens the PDF directly; the voucher itself only holds an `s3://` URI no browser can fetch. A link is a short-lived credential: anyone holding it can open the file until it expires. Org-scoped by the voucher features. The invoice is the CLAIMING CLINIC's document, so it is linked for a platform reader and for the clinic that took the voucher (`claimedByOrgId`) only; the org holding the voucher to distribute it reads the voucher but is answered 404 here. A voucher the caller may not read at all answers exactly as one that does not exist.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Voucher id. A non-UUID value answers 404 without touching the DAL."
}
},
"required": [
"id"
]
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false
}
}