Skip to main content

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.

OperationMethod and public routeParametersResponse typeStatus and behaviorSafe example
Weekly/date-range attendanceGET /attendance/weeklyRequired query start, end; optional laborIdApiResponse<AttendanceDto[]>200; newest-first tenant-filtered rows; no side effectsGET …?start=2030-01-01&end=2030-01-07&laborId=4242 → 200 with data:[]; handled error → 400 envelope
Approved monthly recordsGET /attendance/recordsRequired month, year; optional laborIdApiResponse<AttendanceDto[]>200; approved non-cleared rows; invalid month → 400GET …?month=1&year=2030 → 200; invalid month → 400
Monthly attendance summaryGET /attendance/monthly-summaryRequired month, year; optional laborIdApiResponse<MonthlyAttendanceSummaryDto[]>200; attendance-derived summary only; invalid month → 400GET …?month=1&year=2030&laborId=4242 → 200; invalid month → 400
Audit queryGET /attendance/audit-logsOptional entityType, entityId, takeApiResponse<AttendanceAuditLogDto[]>200; newest-first, bounded take; read-onlyGET …?entityType=Shift&take=25 → 200; invalid tenant context → handled 400 where raised
Timeline queryGET /attendance/timelineOptional entityType, entityId, takeApiResponse<AttendanceTimelineDto[]>200; newest-first, bounded take; read-onlyGET …?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.cs
  • microservices/src/attendance-service/Application/Services/AttendanceQueries.cs
  • microservices/src/attendance-service/Application/Dtos.cs
  • microservices/src/attendance-service/Application/TimeOffice/ShiftPolicyDtos.cs
  • microservices/src/attendance-service/Application/Services/ShiftPolicyQueries.cs

See Also

Keywords

  • Attendance API
  • Attendance Records API

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly