HR Management
Workforce management API — scheduling, timekeeping, absences
Overview
The HR API (hr-api) manages workforce operations: employee records, scheduling, time tracking, absences, and labor law compliance.
Base URL: https://rkyywwxpkzzkvopnobvt.supabase.co/functions/v1/hr-api/v1
Persons (Employees)
Create Person
Departments
Positions
Schedules
Shifts
Validate Shift
Check a shift against labor rules before creating:
Returns validation result with any labor rule violations.
Shift Templates
Reusable shift patterns:
Time Clock
Clock In
Timecards
Absences
HR Roles
HR Permission Hierarchy
With FHIR role fallback — admin maps to hr_admin, doctor/manager get employee level.
Labor Rules
JSON-configurable per country/organization:
Rules include: max shift hours, minimum rest between shifts, overtime thresholds, break requirements.
Holidays
Returns holidays with multi-language names (JSON names field).
Response Formats
HR search functions return wrapped responses:
| Function Pattern | Response Shape |
|---|---|
search_* | { data: [...], total, limit, offset } |
get_holidays | { year, holidays: [...] } |
get_absence_balances | { year, balances: [...] } |
get_user_hr_roles | { hrRoles: [...], implicitRole } |
Notes
- Served by the
hr-apiservice; every route is scoped to the organization in your token, and tenant isolation is enforced in the data layer rather than in application code. - Labor rules are configuration, not code — they resolve per country and organization by priority, so a new jurisdiction does not require a release.