Certificates API
Numbered printable documents. Not legally recognised.
Base path: /certificates. Misses return 404. Every description states these documents are not legally recognised.
| Method | Path | Permission | Tool |
|---|---|---|---|
| GET | /types | certificates:read | list_certificate_types |
| POST | /types | certificates:configure | configure_certificate_type |
| PATCH | /types/:id | certificates:configure | update_certificate_type |
| GET | /types/:id/template | certificates:read | get_certificate_template |
| POST | /templates | certificates:configure | configure_certificate_template |
| GET | / | certificates:read | list_certificates |
| GET | /:id | certificates:read | — |
| GET | /:id/events | certificates:read | get_certificate_history |
| GET | /:id/pdf | certificates:read | download_certificate_pdf |
| POST | / | certificates:issue | issue_certificate |
| POST | /:id/void | certificates:void | void_certificate |
GET /types/:id/template returns { type_id, template_id, name, version, fields[] } — each field { key, type, label, required, prefill_path } in print order; template_id: null means the type cannot issue yet. GET /:id also returns lines (label / value as printed at issue), issued_by_name, voided_at and voided_by_name. GET /:id/events returns the audit trail oldest first: { action: issued | voided, actor_name, detail, created_at }.
Issue body: type_id, issued_on (YYYY-MM-DD), values, optional project_id, external_key. Validation runs before generation. Serial year comes from issued_on.