get_vouchers_batches_by_id_print_sheet

Read-only

Calls GET /api/vouchers/batches/{id}/print-sheet as the signed-in person · REST reference

What a print of this physical batch would send now

The batch's vouchers sorted the way POST /api/vouchers/batches/{id}/print sorts them: printable — live (CREATED, ASSIGNED or ISSUED, and not past expiry) and not yet accepted by a printer, i.e. never printed or failed to print; alreadySubmitted — live and already accepted by a printer, which a print NEVER sends again (making paper for one of those is a reprint — POST /api/vouchers/{id}/reprint or /batches/{id}/reprint); notLive — voided, expired, reprinted or in redemption. Read by id from the DAL (batchVouchers); nothing is sent or recorded. Platform read, and it also requires execute:CreateVoucherBatchCommand — the codes are the physical vouchers.

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_print_sheet",
    "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 print sheet.

json
{
  "alreadySubmitted": 1,
  "batchId": "11111111-1111-4111-8111-111111111111",
  "batchNumber": "string",
  "notLive": 1,
  "printable": [
    {
      "code": "string",
      "expiresAt": 1,
      "id": "11111111-1111-4111-8111-111111111111",
      "printStatus": "NOT_PRINTED",
      "state": "string"
    }
  ],
  "lastPrint": {
    "attempts": 1,
    "error": "string",
    "requestedAt": "string",
    "status": "string"
  }
}

Fields

FieldTypeDescription
alreadySubmittedintegerLive vouchers a printer already accepted — not re-sent.
batchIdstring (uuid)
batchNumberstring | null
lastPrintobject | nullThe batch's record of its last print attempt, from its metadata — null when it has never been printed.
lastPrint.attemptsinteger | null
lastPrint.errorstring | null
lastPrint.requestedAtstring | null
lastPrint.statusstringSUBMITTED or FAILED (or a print partner's reported status).
notLiveintegerVoided, expired or in-redemption vouchers — never printed.
printablearray of object
printable[].codestring
printable[].expiresAtintegerEpoch MILLISECONDS.
printable[].idstring (uuid)
printable[].printStatus"NOT_PRINTED" | "PRINT_FAILED"NOT_PRINTED: never printed. PRINT_FAILED: the last print carrying it failed — this is a retry.
printable[].statestringCREATED, ASSIGNED or ISSUED — the printable lifecycle states.

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_print_sheet",
  "description": "GET /api/vouchers/batches/{id}/print-sheet — The batch's vouchers sorted the way `POST /api/vouchers/batches/{id}/print` sorts them: `printable` — live (CREATED, ASSIGNED or ISSUED, and not past expiry) and not yet accepted by a printer, i.e. never printed or failed to print; `alreadySubmitted` — live and already accepted by a printer, which a print NEVER sends again (making paper for one of those is a reprint — `POST /api/vouchers/{id}/reprint` or `/batches/{id}/reprint`); `notLive` — voided, expired, reprinted or in redemption. Read by id from the DAL (`batchVouchers`); nothing is sent or recorded. Platform read, and it also requires `execute:CreateVoucherBatchCommand` — the codes are the physical vouchers.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Inventory batch id."
      }
    },
    "required": [
      "id"
    ]
  },
  "annotations": {
    "readOnlyHint": true,
    "openWorldHint": false
  }
}