Skip to main content

Leave Approval and Rejection API

Summary

One Direct status operation handles approval, rejection, and technically cancellation; this inventory assigns it to the decision family to avoid duplicate endpoint counts.

Audience

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

Reference Content

Maturity: Direct / Transitional. Authentication: expected. Authorization: approver enforcement Requires confirmation in extracted service; compatibility scope is documented separately. Tenant: required by command behavior.

OperationMethod and public routeParameters/bodyResponse and statusesBehavior/side effects
Update Leave decision/statusPUT /leave/requests/{id}/statusRoute id:int; UpdateLeaveStatusRequest with status, optional rejectionReason, optional fallback reason200 LeaveRequestDto; 404 missing; 400 validation/dependency/state; 409 workflow-managed restrictionApprove rechecks employee/joining date and approved Attendance; reject requires reason; approved transition increases used balance; leaving Approved reverses usage; audits/timeline; high-level decision/balance events.

Approval example: {"status":"Approved"}. Rejection example: {"status":"Rejected","rejectionReason":"Scheduling conflict"}. Success returns the updated DTO. Missing rejection reason returns 400; a workflow-managed direct decision returns 409 with a message object. Workflow completion uses the Internal callback family, not this operation.

The same status operation accepts Cancelled; the dedicated cancellation page references this fact but counts only the DELETE cancellation operation.

Source References

  • microservices/src/leave-service/Api/LeaveEndpoints.cs
  • microservices/src/leave-service/Application/Dtos.cs
  • microservices/src/leave-service/Application/LeaveWorkflows.cs
  • microservices/src/leave-service/Domain/Leave/LeaveRequest.cs

See Also

Keywords

  • Leave API
  • Leave Approval and Rejection API
  • Endpoint reference

Revision Information

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