Request regeneration of a flag's NPDB PDF
POST/flags/:id/npdb-pdf/regenerate
Enqueues a regeneration of the NPDB PDF backing the given npdb-data flag and returns 202 once the task is accepted. Intended as the recovery action for a terminally FAILED render (the drawer's Regenerate button); the render worker is the arbiter of the outcome — a READY or freshly in-flight document makes the task a no-op, so the call is safe to repeat. The client mints one idempotency key per logical request and reuses it on retries: the key correlates retries in server logs, and duplicate submissions are absorbed by the render worker's claim table — a retry can at most re-render the same digest-identical content, never a different document. The regenerated document becomes visible through the flag details response's npdbPdf block, which reports GENERATING while the render is in flight.
Request
Responses
- 202
- 400
- 401
- 404
- 409
- 503
Accepted — the regeneration task is enqueued
Bad Request - the idempotency key is missing, blank, or longer than 128 characters, or the flag is not an npdb-data flag
Unauthorized - authentication is required; the JWT is missing or invalid
Not Found - no such flag for this tenant (or the document service is not enabled for this tenant)
Conflict - the flag is not regenerable: it carries no stamped NPDB digest or its origin monitoring workflow is missing identity
Service Unavailable - the regeneration task could not be enqueued; retry with the SAME idempotency key