API Reference
Employee Documents
/api/v1/console/hr/employees/{id}/documents JWT API KeyOne employee's file, soonest expiry first.,
The expiry verdicts are computed server-side against the Baghdad business day and returned on each row. A client computing them from the device clock would disagree with the alert board about which certificates are lapsing, on exactly the days that matters.
- Capability
view_hr- API key scope
cap:view_hr(the key's owner must also hold the capability)- Plan feature
hr_payrollmust be on the branch's plan, or the call answers 403.
Path parameters
| idrequired string (uuid) | — |
Query parameters
| IncludeRetired boolean | Include tombstoned documents. Off by default: a retired contract must not appear in the expiry board or the profile, because every reader of this table filters tombstones and a document that comes back from the dead reads as a live obligation (FR-HRM-012). |
| Sort string | A snake_case column key from the endpoint's allow-list (`created_at`, `gross_total`, `status` …). Absent or blank → the endpoint's default order. |
| Dir string | `asc` (the default when Panoptes.Application.Common.SortableRequest.Sort is present) or `desc`. Ignored without a sort. |
Responses
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/hr/employees/{id}/documents" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Query parameters
Headers
/api/v1/console/hr/employees/{id}/documents JWT API KeyAttach a document.,
The type is a `uuid` into this branch's `employee_document_type` table. An unresolvable or retired id fails the request — v1 and v2 fell back to `"other"`, and a residency permit filed as "other" is a renewal nobody chases.
- Capability
manage_employees- API key scope
cap:manage_employees(the key's owner must also hold the capability)- Plan feature
hr_payrollmust be on the branch's plan, or the call answers 403.
Path parameters
| idrequired string (uuid) | — |
Request body
{
"typeId": "00000000-0000-0000-0000-000000000000",
"title": "string",
"fileUrl": "string",
"issueDate": "2026-11-27T14:05:12.413Z",
"expiryDate": "2026-11-27"
}| typeId string (uuid) | — |
| title string | — |
| fileUrl string | Where the scan lives. Free text and nothing more — L20 records that HRM has no upload pipeline, so nothing here validates, stores or scans a file, and pretending otherwise in the contract would be worse than saying so. |
| issueDate string (date-time) | When the document was issued. A `timestamptz` on the row. |
| expiryDate string (date) | When it lapses. A `date`, not an instant: FR-HRM-013 compares it to the business day, and a clock comparison would make a certificate expire three hours early in Baghdad. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/employees/{id}/documents" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"typeId": "00000000-0000-0000-0000-000000000000",
"title": "string",
"fileUrl": "string",
"issueDate": "2026-11-27T14:05:12.412Z",
"expiryDate": "2026-11-27"
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/hr/employees/documents/{documentId} JWT API KeyRetire a document.,
A tombstone with a mandatory reason, never a hard `DELETE`. The reference removed the row outright, so "where did the health certificate go" had no answer at all.
- Capability
manage_employees- API key scope
cap:manage_employees(the key's owner must also hold the capability)- Plan feature
hr_payrollmust be on the branch's plan, or the call answers 403.
Path parameters
| documentIdrequired string (uuid) | — |
Request body
{
"reason": "string"
}| reason string | — |
Responses
curl -X DELETE "https://staging-api.panoptesos.com/api/v1/console/hr/employees/documents/{documentId}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers