Single form generation
Part of #541
Depends on: Templates CRUD (#549 ), AI extraction (#550 )
Contract reference
Endpoints
POST /api/v1/forms/generate/{form_type}
Generates a single agency-specific form from extracted incident data. Loads the template config for the given form_type, maps incident contract fields to agency-specific fields, and writes values onto the PDF at stored coordinates using pdf-annotate/ReportLab.
Returns 202 with form_id and job_id for polling. Full request/error details in the contract reference above.
GET /api/v1/forms/{form_id}
Returns form metadata: generation status, associated extract and incident IDs, and a field mapping summary showing how fields were mapped (filled, blank, coverage percent).
Single form generation
Part of #541
Depends on: Templates CRUD (#549 ), AI extraction (#550 )
Contract reference
path/forms.yaml#L78-L143(generate single)path/forms.yaml#L145-L191(get form metadata)schemas/form-record.yamlEndpoints
POST /api/v1/forms/generate/{form_type}Generates a single agency-specific form from extracted incident data. Loads the template config for the given
form_type, maps incident contract fields to agency-specific fields, and writes values onto the PDF at stored coordinates using pdf-annotate/ReportLab.Returns
202withform_idandjob_idfor polling. Full request/error details in the contract reference above.GET /api/v1/forms/{form_id}Returns form metadata: generation status, associated extract and incident IDs, and a field mapping summary showing how fields were mapped (filled, blank, coverage percent).