API Reference
Leave
3 endpoints· Auth: JWT or API Key
get
/api/v1/console/hr/leave JWT API KeyLeave requests
- 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.
Query parameters
| EmployeeId string (uuid) | — |
| Status string | `pending | approved | rejected | cancelled`. |
| From string (date) | — |
| To string (date) | — |
| Page integer (int32) | — |
| PerPage integer (int32) | — |
| Search string | Free-text filter. Its meaning is per-resource and documented on the endpoint. |
| Skip integer (int32) | Rows to skip, derived — never sent by the caller on this surface. |
| 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
200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/hr/leave" \
-H "X-Api-Key: <YOUR_API_KEY>" Try itagainst staging · https://staging-api.panoptesos.com
Query parameters
Headers
Set credentials in the “Authorize” menu
post
/api/v1/console/hr/leave JWT API KeyFile time off.,
The type is a `uuid` into this branch's `leave_type` table. An unresolvable or retired id fails the request — there is no fall-back type, because a silent default would file unpaid leave as annual and draw down a balance nobody asked to spend.
- Capability
manage_attendance- API key scope
cap:manage_attendance(the key's owner must also hold the capability)- Plan feature
hr_payrollmust be on the branch's plan, or the call answers 403.
Request body
application/json
{
"employeeId": "00000000-0000-0000-0000-000000000000",
"typeId": "00000000-0000-0000-0000-000000000000",
"startDate": "2026-11-27",
"endDate": "2026-11-27",
"reason": "string"
}| employeeId string (uuid) | — |
| typeId string (uuid) | — |
| startDate string (date) | — |
| endDate string (date) | — |
| reason string | — |
Responses
200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/leave" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"employeeId": "00000000-0000-0000-0000-000000000000",
"typeId": "00000000-0000-0000-0000-000000000000",
"startDate": "2026-11-27",
"endDate": "2026-11-27",
"reason": "string"
}' Try itagainst staging · https://staging-api.panoptesos.com
Request body (JSON)
Headers
Set credentials in the “Authorize” menu
post
/api/v1/console/hr/leave/{id}/decision JWT API KeyApprove or reject
`approve_leave`, not `manage_attendance`.
A request that is not `pending` is a `CONFLICT` — "This request was already decided." — and an approval of annual leave draws the employee's balance down in the same transaction as the status flip, so a decision that loses the race never spends the balance.
- Capability
approve_leave- API key scope
cap:approve_leave(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
application/json
{
"decision": "string",
"note": "string"
}| decision string | `approved` or `rejected`. Nothing else is a decision. |
| note string | — |
Responses
200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/leave/{id}/decision" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"decision": "string",
"note": "string"
}' Try itagainst staging · https://staging-api.panoptesos.com
Path parameters
Request body (JSON)
Headers
Set credentials in the “Authorize” menu