Skip to main content

Attendance Shift Assignments API

Summary

Three direct operations create/list employee shift assignments and inspect effective calculation context.

Audience

Frontend/backend developers, QA engineers, architects, and implementation partners.

Reference Content

Authentication: Bearer and administrative context expected; exact enforcement requires confirmation. Tenant: required. Maturity: Direct/Shadow, Foundation.

OperationMethod and public routeContractResponses and behaviorSafe example
Create assignmentPOST /attendance/employees/{laborId:int}/shift-assignmentsPositive employee route parameter; EmployeeShiftAssignmentCreateRequest200 ApiResponse<EmployeeShiftAssignmentDto>; 400 invalid/inactive; 404 shift missing; 409 overlap; audit/timeline, no Attendance eventPOST …/4242/shift-assignments with {"shiftId":9001,"effectiveFrom":"2030-01-01","effectiveTo":null} → 200; overlap → 409.
List assignmentsGET /attendance/employees/{laborId:int}/shift-assignmentsPositive employee route parameter200 ApiResponse<EmployeeShiftAssignmentDto[]>; read-onlyGET …/4242/shift-assignments → data:[]; handled tenant failure → 400.
Resolve effective policyGET /attendance/employees/{laborId:int}/effective-policyEmployee route parameter; optional date, optional probeHours200 ApiResponse<EffectiveAttendancePolicyDto>; diagnostic, read-onlyGET …/4242/effective-policy?date=2030-01-02&probeHours=7.5 → 200; binding error → 400.

Assignment request fields are shiftId, optional effectiveFrom, and optional effectiveTo; null end is open-ended and omitted start defaults according to current service behavior. Validation requires a valid employee reference, existing active shift, valid date range, and no active overlap. Response includes assignment, employee, shift/name, effective range, and active state.

Effective-policy response reports employee/date, winning context category, optional shift/policy references, shift start, standard/overtime context, grace, rule availability, weekly-off flag, and optional probe result. It is a diagnostic read model, not a policy assignment mutation.

No assignment update, deactivate, delete, explicit end-date, or active-only resolution endpoint exists. Changes require creating a nonoverlapping assignment through currently supported behavior or another workflow not exposed here.

Source References

  • microservices/src/attendance-service/Api/AttendanceShiftPolicyEndpoints.cs
  • microservices/src/attendance-service/Application/TimeOffice/ShiftPolicyDtos.cs
  • microservices/src/attendance-service/Application/Services/ShiftPolicyCommands.cs
  • microservices/src/attendance-service/Application/Services/ShiftPolicyQueries.cs

See Also

Keywords

  • Attendance API
  • Attendance Shift Assignments API

Revision Information

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