get_vouchers_batches_by_id_reprint

Read-only

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

ArgumentTypeDescription
idpathstring (uuid)requiredInventory 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.

json
{
  "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.

json
{
  "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

FieldTypeDescription
batchIdstring (uuid)
batchNumberstring | null
freshExpiresAtintegerThat fresh expiry, epoch MILLISECONDS: now + the 180-day voucher lifetime.
freshExpiriesintegerReplacements that would get a fresh term because their predecessor is EXPIRED or past its date.
notReprintedobjectThe batch's vouchers the reprint would leave alone, by why.
notReprinted.alreadyReplacedintegerVOIDED_REPRINTED, or voided/expired with a replacement already.
notReprinted.noEmptySlotintegerVoided/expired, but the batch already holds every voucher it owes.
notReprinted.notReprintableintegerA retired legacy state.
notReprinted.usedintegerVERIFIED onward — presented to a clinic.
poolCommittedintegerCENTS replacing the dead vouchers would re-commit from the voucher pool.
quantityintegerHow many vouchers the batch owes its holder.
replacedintegerVOIDED or EXPIRED vouchers, never replaced, it would replace.
singlesarray of objectEvery voucher a reprint of that voucher alone would take now.
singles[].codestring
singles[].expiresAtintegerEpoch MILLISECONDS.
singles[].idstring (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[].statestringCREATED, ASSIGNED, ISSUED, VOIDED or EXPIRED.
toPrintintegerNew vouchers it would print: voided + replaced.
voidedintegerLive vouchers the reprint would take out of circulation.

When it fails

A failed call returns isError: true with the API's message as text.

400

The request was malformed or failed a guard.

403

Authenticated, but the caller holds none of the required permissions.

404

No 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.

json
{
  "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
  }
}