Attendance Records API
Summary
Five direct query operations expose attendance rows, approved-period results, monthly summaries, audit entries, and timeline entries. No delete operation or general paginated search exists.
Audience
Frontend/backend developers, QA and support engineers, and implementation partners.
Reference Content
Authentication: Bearer context expected; route-level enforcement requires confirmation. Tenant: tenant-scoped persistence is expected; mutation-style missing-tenant mapping does not prove identical behavior for every query. Maturity: Direct/Shadow. Response convention: 200 ApiResponse<T>; handled argument failures return 400.
| Operation | Method and public route | Parameters | Response type | Status and behavior | Safe example |
|---|---|---|---|---|---|
| Weekly/date-range attendance | GET /attendance/weekly | Required query start, end; optional laborId | ApiResponse<AttendanceDto[]> | 200; newest-first tenant-filtered rows; no side effects | GET …?start=2030-01-01&end=2030-01-07&laborId=4242 → 200 with data:[]; handled error → 400 envelope |
| Approved monthly records | GET /attendance/records | Required month, year; optional laborId | ApiResponse<AttendanceDto[]> | 200; approved non-cleared rows; invalid month → 400 | GET …?month=1&year=2030 → 200; invalid month → 400 |
| Monthly attendance summary | GET /attendance/monthly-summary | Required month, year; optional laborId | ApiResponse<MonthlyAttendanceSummaryDto[]> | 200; attendance-derived summary only; invalid month → 400 | GET …?month=1&year=2030&laborId=4242 → 200; invalid month → 400 |
| Audit query | GET /attendance/audit-logs | Optional entityType, entityId, take | ApiResponse<AttendanceAuditLogDto[]> | 200; newest-first, bounded take; read-only | GET …?entityType=Shift&take=25 → 200; invalid tenant context → handled 400 where raised |
| Timeline query | GET /attendance/timeline | Optional entityType, entityId, take | ApiResponse<AttendanceTimelineDto[]> | 200; newest-first, bounded take; read-only | GET …?entityType=Shift&take=25 → 200; handled argument failure → 400 |
AttendanceDto fields are id, laborId, laborName, date, status, workHours, overtimeHours, deductionHours, lateMinutes, paidUnits, payrollNote, isApproved, and approvedBy. Summary fields cover employee/period identity and present, leave, weekly-off, holiday, absent, unpaid-leave, approved-hour, overtime, and shortfall totals; Attendance's live calculation does not itself compose Leave/holiday totals. Diagnostics expose technical action/category, actor, description/details, and occurrence time. Access scope requires confirmation.
No pagination applies to attendance date-range or monthly operations. Diagnostic take is clamped by source. Query operations create no audit or events.
Source References
microservices/src/attendance-service/Api/AttendanceDirectEndpoints.csmicroservices/src/attendance-service/Application/Services/AttendanceQueries.csmicroservices/src/attendance-service/Application/Dtos.csmicroservices/src/attendance-service/Application/TimeOffice/ShiftPolicyDtos.csmicroservices/src/attendance-service/Application/Services/ShiftPolicyQueries.cs
Related Articles
See Also
Keywords
- Attendance API
- Attendance Records API
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly