Skip to main content

Attendance Payroll Snapshots API

Summary

Two direct operations capture and retrieve period attendance snapshots supplied by Payroll.

Audience

Payroll/Attendance integrators, backend developers, QA engineers, architects, and support engineers.

Reference Content

Authentication: authenticated Payroll/integration context expected; exact authorization requires confirmation. Tenant: required. Maturity: Direct/Shadow, Transitional Payroll boundary.

OperationMethod and public routeContractResponses and side effectsSafe example
Capture period snapshotsPOST /attendance/snapshots/captureSnapshotCaptureRequest200 ApiResponse<int>; 400 invalid month/empty summaries; upserts period rows and audits, no attendance event{"month":1,"year":2030,"summaries":[{"laborId":4242,"month":1,"year":2030,"presentDays":1,"approvedHours":7.5}]}data:1; empty summaries → 400.
Retrieve snapshotsGET /attendance/snapshotsRequired month, year; optional laborId200 ApiResponse<MonthlyAttendanceSummaryDto[]>; read-onlyGET …?month=1&year=2030&laborId=4242data:[]; framework binding failure → 400.

SnapshotCaptureRequest fields are month, year, and summaries. Each summary contains employee/period identity plus present, paid-leave, weekly-off, holiday, absent, unpaid-leave, approved-hours, overtime, and shortfall totals. Capture requires a valid month and at least one summary. Source uses upsert semantics for the same employee/period; replacement governance remains Requires confirmation.

Retrieval does not explicitly validate month range before query. These operations do not calculate Payroll or freeze a period. Payroll lock is consulted by reopen approval, not snapshot capture. No delete endpoint or snapshot-by-id endpoint exists.

Source References

  • microservices/src/attendance-service/Api/AttendanceDirectEndpoints.cs
  • microservices/src/attendance-service/Application/Dtos.cs
  • microservices/src/attendance-service/Application/Services/PayrollSnapshotService.cs
  • microservices/src/attendance-service/Domain/Attendance/PayrollApprovedSnapshot.cs

See Also

Keywords

  • Attendance API
  • Attendance Payroll Snapshots API

Revision Information

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