get_vouchers_batches_by_id_reprint
Calls GET /api/vouchers/batches/{id}/reprint as the signed-in person · REST reference
What reprinting this physical batch would do now
The plan POST /api/vouchers/batches/{id}/reprint would carry out, read from the batch's vouchers by id (batchVouchers); nothing is written. voided live vouchers (CREATED, ASSIGNED, ISSUED) would be taken out of circulation and replaced VOIDED or EXPIRED ones never replaced would be replaced — each as VOIDED_REPRINTED, with a replacement minted and printed, so toPrint = voided + replaced. Dead vouchers are replaced only into the batch's empty slots, in code order. notReprinted counts what it leaves alone and why. singles lists every voucher a reprint of that voucher alone would take now. The confirmation shows these counts and sends them back as confirm. Platform read, and it also requires execute:CreateVoucherBatchCommand.
Arguments
| Argument | Type | Description | |
|---|---|---|---|
idpath | string (uuid) | required | Inventory batch id. |
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_batches_by_id_reprint",
"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 reprint plan.
{
"batchId": "11111111-1111-4111-8111-111111111111",
"batchNumber": "string",
"freshExpiresAt": 1,
"freshExpiries": 1,
"notReprinted": {
"alreadyReplaced": 1,
"noEmptySlot": 1,
"notReprintable": 1,
"used": 1
},
"poolCommitted": 1,
"quantity": 1,
"replaced": 1,
"singles": [
{
"code": "string",
"expiresAt": 1,
"id": "11111111-1111-4111-8111-111111111111",
"kind": "VOID_LIVE",
"printStatus": "NOT_PRINTED",
"state": "string"
}
],
"toPrint": 1,
"voided": 1
}Fields
| Field | Type | Description |
|---|---|---|
batchId | string (uuid) | |
batchNumber | string | null | |
freshExpiresAt | integer | That fresh expiry, epoch MILLISECONDS: now + the 180-day voucher lifetime. |
freshExpiries | integer | Replacements that would get a fresh term because their predecessor is EXPIRED or past its date. |
notReprinted | object | The batch's vouchers the reprint would leave alone, by why. |
notReprinted.alreadyReplaced | integer | VOIDED_REPRINTED, or voided/expired with a replacement already. |
notReprinted.noEmptySlot | integer | Voided/expired, but the batch already holds every voucher it owes. |
notReprinted.notReprintable | integer | A retired legacy state. |
notReprinted.used | integer | VERIFIED onward — presented to a clinic. |
poolCommitted | integer | CENTS replacing the dead vouchers would re-commit from the voucher pool. |
quantity | integer | How many vouchers the batch owes its holder. |
replaced | integer | VOIDED or EXPIRED vouchers, never replaced, it would replace. |
singles | array of object | Every voucher a reprint of that voucher alone would take now. |
singles[].code | string | |
singles[].expiresAt | integer | Epoch MILLISECONDS. |
singles[].id | string (uuid) | |
singles[].kind | "VOID_LIVE" | "REPLACE_DEAD" | VOID_LIVE: a live voucher, taken out of circulation. REPLACE_DEAD: a voided/expired one, replaced. |
singles[].printStatus | "NOT_PRINTED" | "SUBMITTED" | "PRINT_FAILED" | |
singles[].state | string | CREATED, ASSIGNED, ISSUED, VOIDED or EXPIRED. |
toPrint | integer | New vouchers it would print: voided + replaced. |
voided | integer | Live vouchers the reprint would take out of circulation. |
When it fails
A failed call returns isError: true with the API's message as text.
400The request was malformed or failed a guard.
403Authenticated, but the caller holds none of the required permissions.
404No such resource — or none this caller may see.
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_batches_by_id_reprint",
"description": "GET /api/vouchers/batches/{id}/reprint — The plan `POST /api/vouchers/batches/{id}/reprint` would carry out, read from the batch's vouchers by id (`batchVouchers`); nothing is written. `voided` live vouchers (CREATED, ASSIGNED, ISSUED) would be taken out of circulation and `replaced` VOIDED or EXPIRED ones never replaced would be replaced — each as VOIDED_REPRINTED, with a replacement minted and printed, so `toPrint` = voided + replaced. Dead vouchers are replaced only into the batch's empty slots, in code order. `notReprinted` counts what it leaves alone and why. `singles` lists every voucher a reprint of that voucher alone would take now. The confirmation shows these counts and sends them back as `confirm`. Platform read, and it also requires `execute:CreateVoucherBatchCommand`.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Inventory batch id."
}
},
"required": [
"id"
]
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false
}
}