Skip to main content

Status & Issues

Check templates, field confirmation, proposals and recent batches in one call, and read the worklist of what looks wrong in Document Generation (/v1/doc-gen).

Two read-only routes give an operator the state of the app without walking every template and batch. GET /v1/doc-gen/status is the cheap overview: how many templates exist, how many fields are confirmed, how many proposals are running, failed or never started, and what the last 30 days of batches look like. It is also the route the talonic_doc_gen_* MCP tools use to probe whether the app is available. GET /v1/doc-gen/issues is the worklist behind those numbers, one entry per thing that looks wrong, each naming the template or batch concerned.

Batches are counted and judged as the key's minting user may read them under Sources IAM, over a window of the last 30 days. An empty data list from the issues route means nothing needs attention. Every entry has a code and a human-readable detail; entries about templates carry template_id and template_name, entries about batches carry job_id, and fields lists the field keys concerned where that applies.

GET/v1/doc-gen/status

Response fields

templatesintegerNumber of templates.
fieldsobjecttotal, confirmed, unconfirmed and entered_per_document counts across all field sheets.
proposalsobjectrunning, failed and never_proposed counts.
jobsobjectlast_30_days, documents_last_30_days and failed_last_30_days counts, and last: the most recent batch as { id, created_at, status, templates[], documents }, or null.

Response: Status

{
  "templates": 9,
  "fields": { "total": 104, "confirmed": 96, "unconfirmed": 8, "entered_per_document": 14 },
  "proposals": { "running": 0, "failed": 1, "never_proposed": 2 },
  "jobs": {
    "last_30_days": 17,
    "documents_last_30_days": 212,
    "failed_last_30_days": 0,
    "last": {
      "id": "e61a0c97-2b4f-4d38-a5c1-7f90d3b8e426",
      "created_at": "2026-10-21T09:31:07.000Z",
      "status": "completed",
      "templates": ["contract-letter"],
      "documents": 1
    }
  }
}
GET/v1/doc-gen/issues

Entry fields and codes

codestringnever_proposed (no data product proposed for the sheet yet), proposal_failed, proposal_pending (a proposal left fields without a suggestion), fields_unconfirmed, job_failed, documents_failed (some documents of a batch failed) or pdf_missing (documents lack a PDF).
template_id, template_nameuuid, stringSet for the template codes.
job_iduuidSet for the batch codes.
detailstringA sentence saying what is wrong; for pdf_missing it names the retry route.
fieldsstring[]The field keys concerned, for proposal_pending and fields_unconfirmed.

Response: Issues

{
  "data": [
    {
      "code": "fields_unconfirmed",
      "template_id": "3b1f6a52-8c0e-4f0a-9d5e-2a7c1e4b9d10",
      "template_name": "contract-letter",
      "detail": "3 of 12 field(s) are suggestions nobody has confirmed.",
      "fields": ["addressee", "reference_line", "closing_remark"]
    },
    {
      "code": "pdf_missing",
      "job_id": "e61a0c97-2b4f-4d38-a5c1-7f90d3b8e426",
      "detail": "1 document(s) have no PDF; POST /v1/doc-gen/jobs/e61a0c97-2b4f-4d38-a5c1-7f90d3b8e426/pdf makes them again."
    }
  ]
}
Each code points at a route that fixes it: never_proposed and proposal_pending at the proposal routes, fields_unconfirmed at the confirm route, and pdf_missing at the PDF retry. Poll issues after a batch to learn whether anything needs a person.

Frequently asked questions

How far back do the batch counts and issues look?+
The last 30 days. Batches older than that are not counted in the status totals and do not produce batch issues, though they remain readable in the batch history.
Why does a template show never_proposed?+
Its dataProductId is null, because no proposal has answered every field for a data product. Start a proposal with POST /v1/doc-gen/templates/{id}/propose. A template with a proposal currently running is not reported as never proposed.
Are counts scoped to my key?+
Template and field counts cover the workspace. Batch counts and batch issues are limited to batches whose documents the key's minting user may read under Sources IAM.