API Reference
Attendance
Checking in and out for the day, today's record, and attendance history.
Checking in and out for the day, today's record, and attendance history.
Generated from the OpenAPI spec by
npm run docs:api -w api. Do not edit this page — change the decorators inapps/api/src/and regenerate.
Conventions
- Auth — a session on every route: the cookie on web, the bearer token on mobile. See Authentication.
- Errors — every non-2xx response has the body described in Errors.
- Types — a
?after a field name means it is optional;| nullmeans it is present but may be null.
Endpoints
GET /api/v1/attendance/today — Today's attendance for the signed-in member
Returns 200 → TodayAttendanceResponse
| Error | When |
|---|---|
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
POST /api/v1/attendance/check-in — Check in for today
Returns 201 → AttendanceRecordResponse
| Error | When |
|---|---|
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
POST /api/v1/attendance/check-out — Check out for today
Returns 201 → AttendanceRecordResponse
| Error | When |
|---|---|
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
GET /api/v1/attendance/history — Attendance history
Employees see only their own records. Super admins and reporting managers can filter all employees.
| Query | Type | Required | Notes |
|---|---|---|---|
from | string | no | |
to | string | no | |
employeeId | string | no |
Returns 200 → AttendanceRecordResponse[]
| Error | When |
|---|---|
400 | The request was rejected. message is an array of field errors when validation failed. |
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
GET /api/v1/attendance/employees — Employees available to attendance filters
Super admins and reporting managers only.
Returns 200 → AttendanceEmployeeResponse[]
| Error | When |
|---|---|
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
Data models
TodayAttendanceResponse
| Field | Type | Notes |
|---|---|---|
me | AttendanceRecordResponse | |
canViewAll | boolean | |
currentlyPresentCount | number | |
employees | AttendanceRecordResponse[] |
AttendanceRecordResponse
| Field | Type | Notes |
|---|---|---|
employeeId | string | |
employeeName | string | |
date | string | |
checkIn | string ISO 8601 | null | |
checkOut | string ISO 8601 | null | |
status | NOT_CHECKED_IN | PRESENT | CHECKED_OUT |
AttendanceEmployeeResponse
| Field | Type | Notes |
|---|---|---|
id | string | |
name | string |