Skip to main content

Compatibility Attendance API

Summary

Eighteen compatibility operations preserve existing Attendance client routes and bare response shapes during gateway cutover.

Audience

Existing frontend integrators, backend developers, QA/support engineers, architects, and implementation partners.

Reference Content

Authentication: downstream bearer/self/approver context expected; exact enforcement requires confirmation. Tenant: expected/required by underlying operations. Maturity: Compatibility/Transitional. Success is generally 200 with bare arrays, DTOs, strings, or objects. Validation is 400, missing records 404, locked reopen 403, and conflicts generally translate to 400.

Method and public routePurposeRequest → responseBehavior, status, and safe example
GET /api/attendance/weeklyDate-range rowsstart,end,laborId? → AttendanceDto[]200 read-only; fictional query → []; handled failure → 400 text.
GET /api/attendance/employeesActive rosternone → AttendanceEmployeeDto[]200 read-only; example → [].
GET /api/attendance/pendingPending reviewstart?,end? → PendingAttendanceDto[]200 read-only; example → [].
GET /api/attendance/monthly-summaryAttendance summarymonth,year,laborId? → MonthlyAttendanceSummaryDto[]200; invalid month → 400.
POST /api/attendanceSave rowsAttendanceSaveRequest[] → success string200; validates/calculates/audits/events; fictional one-row body → success string; invalid → 400.
POST /api/attendance/bulk-punchBulk self attendance saveBulkPunchRequest[] → object with message/results/count200 even with per-row failures represented in results; fictional rows → result object.
POST /api/attendance/{id:int}/approveApproveid → AttendanceDto200; canonical recalculation/audit/event; unknown → 404.
POST /api/attendance/{id:int}/rejectRejectid + RejectRequest → AttendanceDto200; clear/audit/event; unknown → 404.
GET /api/attendance/punch/todayToday's puncheslaborId? → PunchLogDto[]200 read-only; fictional id → [].
GET /api/attendance/punch/weeklySelf weekly attendancestart,end → AttendanceDto[]200; self context; fictional dates → [].
POST /api/attendance/punchSubmit punchPunchRequest → PunchLogDto200; punch/audit/event and possible attendance; invalid employee → 400.
POST /api/attendance/punch/{id:int}/approveApprove punchid → PunchLogDto200; audit and possible attendance approval; unknown → 404.
POST /api/attendance/punch/{id:int}/rejectReject punchid → PunchLogDto200; audit and conditional clear; unknown → 404.
POST /api/attendance/reopen-requestsCreate reopenReopenCreateRequest → ReopenRequestDto200; future/invalid → 400; duplicate conflict → compatibility 400.
GET /api/attendance/reopen-requests/myPersonal reopen listnone → ReopenRequestDto[]200 read-only.
GET /api/attendance/reopen-requests/pendingPending reopen listnone → ReopenRequestDto[]200 read-only; approver scope expected.
POST /api/attendance/reopen-requests/{id:int}/approveApprove reopenid → ReopenRequestDto200; locked → 403; invalid state → 400; missing → 404; audit/event.
POST /api/attendance/reopen-requests/{id:int}/rejectReject reopenid + ReopenRejectRequest → DTO200; invalid state → 400; missing → 404; audit.

Request/response fields and validation match the corresponding direct-family pages, except envelopes are removed and the bulk operation maps virtual UI status names into confirmed attendance statuses. Safe example bodies are those shown on the direct pages with the compatibility route substituted; success responses are bare. No compatibility approved-record query, snapshot, employee-profile upsert, audit/timeline, or delete-attendance route exists.

Five development-only demo mappings are intentionally omitted from this public inventory and examples.

Source References

  • microservices/src/attendance-service/Api/AttendanceCompatibilityEndpoints.cs
  • microservices/src/attendance-service/Application/Dtos.cs
  • microservices/src/attendance-service/Application/Services/AttendanceCommands.cs
  • microservices/src/attendance-service/Application/Services/PunchWorkflow.cs
  • microservices/src/attendance-service/Application/Services/ReopenRequestWorkflow.cs
  • microservices/src/gateway-api/Program.cs

See Also

Keywords

  • Attendance API
  • Compatibility Attendance API

Revision Information

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