get_vouchers_batch_requests

Read-only

Calls GET /api/vouchers/batch-requests as the signed-in person · REST reference

Voucher-batch requests awaiting a PFF decision

The same inventory batches as GET /api/vouchers/batches, filtered to the REQUESTED status — a request IS the future batch held in that status, there is no separate entity. Declared before /{id} so the literal path is not captured as a voucher id. Scoped exactly as /batches is: platform staff see every org's queue, everyone else the queues of the organizations in which they hold an inventory feature (bounded at the DAL from the caller's own token), and a caller holding none anywhere is refused 403. Cannot answer 500 or 400 — every failure becomes a 503 with a fixed message.

Arguments

ArgumentTypeDescription
limitqueryintegerApplied only when it parses to a finite integer greater than zero; anything else is dropped and the DAL's default page size applies.

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_batch_requests",
    "arguments": {}
  }
}

Result

On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.

The REQUESTED batches this caller may see.

json
{
  "count": 1,
  "data": [
    {
      "availableQuantity": 1,
      "batchNumber": "string",
      "committedQuantity": 1,
      "deleted": true,
      "id": "string",
      "inspectionDate": 1,
      "itemName": "string",
      "itemType": "string",
      "manufactureDate": 1,
      "quantity": 1,
      "receivedDate": 1,
      "reservedQuantity": 1,
      "status": "AVAILABLE",
      "totalPotentialValueCents": 1
    }
  ]
}

Fields

FieldTypeDescription
countintegerDAL totalCount for the filter, falling back to the length of data.
dataarray of object
data[].assignedTostring | null
data[].availableQuantitynumber
data[].batchNumberstring
data[].batchTypestring | null
data[].certificationsobject | null
data[].committedQuantitynumber
data[].complianceFlagsobject | null
data[].createdBystring | null
data[].deletedboolean
data[].deletedAtnumber | null
data[].deletedBystring | null
data[].distributionCapnumber | null
data[].distributionHistoryobject | null
data[].expirationDatenumber | null
data[].idstring
data[].inspectionDatenumber
data[].inspectionResultsobject | null
data[].itemDescriptionstring | null
data[].itemNamestring
data[].itemTypestring
data[].locationstring | null
data[].lotNumberstring | null
data[].manufactureDatenumber
data[].metadataobject | null
data[].printerJobIdstring | null
data[].processedAtnumber | null
data[].qualityGradestring | null
data[].quantitynumber
data[].receivedAtnumber | null
data[].receivedDatenumber
data[].reservedQuantitynumber
data[].shippedAtnumber | null
data[].shippingInfoobject | null
data[].status"AVAILABLE" | "CREATED" | "DENIED" | "DEPLETED" | "DISTRIBUTED" | "EXPIRED" | … (12 values)
data[].storageConditionsstring | null
data[].supplierstring | null
data[].supplierOrderNumberstring | null
data[].totalPotentialValueCentsinteger | nullquantity × unitCostCents, in integer CENTS. Null on the same batches as unitCostCents.
data[].typestring | null
data[].unitCostCentsinteger | nullCost of one unit in integer CENTS. Null on a batch whose cost the graph holds only in dollars.
data[].unitOfMeasurestring
data[].updatedAtnumber | null
data[].voucherCountsobjectThe batch's vouchers by lifecycle state, counted in the graph. live (every state but VOIDED, EXPIRED and VOIDED_REPRINTED) against quantity is whether the batch still holds what its holder was promised; unissued (CREATED/ASSIGNED) is what a shrink may release.
data[].voucherCounts.expiredinteger
data[].voucherCounts.issuedintegerISSUED through QUEUED_FOR_CHECKOUT.
data[].voucherCounts.liveinteger
data[].voucherCounts.paidinteger
data[].voucherCounts.reprintedintegerVOIDED_REPRINTED — each replaced by a voucher counted in live.
data[].voucherCounts.unissuedinteger
data[].voucherCounts.voidedinteger

When it fails

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

403

The caller holds no inventory feature in any organization.

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_batch_requests",
  "description": "GET /api/vouchers/batch-requests — The same inventory batches as `GET /api/vouchers/batches`, filtered to the REQUESTED status — a request IS the future batch held in that status, there is no separate entity. Declared before `/{id}` so the literal path is not captured as a voucher id. Scoped exactly as `/batches` is: platform staff see every org's queue, everyone else the queues of the organizations in which they hold an inventory feature (bounded at the DAL from the caller's own token), and a caller holding none anywhere is refused 403. Cannot answer 500 or 400 — every failure becomes a 503 with a fixed message.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "limit": {
        "type": "string",
        "description": "Applied only when it parses to a finite integer greater than zero; anything else is dropped and the DAL's default page size applies."
      }
    }
  },
  "annotations": {
    "readOnlyHint": true,
    "openWorldHint": false
  }
}