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.
| Operation | Method and public route | Contract | Responses and side effects | Safe example |
|---|---|---|---|---|
| Capture period snapshots | POST /attendance/snapshots/capture | SnapshotCaptureRequest | 200 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 snapshots | GET /attendance/snapshots | Required month, year; optional laborId | 200 ApiResponse<MonthlyAttendanceSummaryDto[]>; read-only | GET …?month=1&year=2030&laborId=4242 → data:[]; 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.csmicroservices/src/attendance-service/Application/Dtos.csmicroservices/src/attendance-service/Application/Services/PayrollSnapshotService.csmicroservices/src/attendance-service/Domain/Attendance/PayrollApprovedSnapshot.cs
Related Articles
See Also
Keywords
- Attendance API
- Attendance Payroll Snapshots API
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly