Leave Balance Compatibility API
Summary
Three compatibility operations expose an HR workspace subset plus balance save and delete.
Audience
Frontend/backend developers, QA, Leave/HR administrators, support, and implementation partners.
Reference Content
Maturity: Compatibility / Transitional. Authentication: monolith requires authentication; gateway/service expectation applies after cutover. Authorization: monolith scopes workspace and requires management capability for mutations; extracted parity Requires confirmation. Tenant: required.
| Operation | Method/public route | Request | Response/status | Behavior |
|---|---|---|---|---|
| Get HR workspace | GET /api/hr-operations/workspace | None | 200 object | Extracted Leave response contains visible employee summaries and Leave balances; monolith response also contains unrelated HR modules, so client shape is Transitional. |
| Save Leave balance | POST /api/hr-operations/leave-balances | SaveLeaveBalanceRequest-compatible body | 200 balance; 400 invalid; 403 monolith unauthorized | Upsert/normalize/audit/timeline; extracted balance event. |
| Delete Leave balance | DELETE /api/hr-operations/leave-balances/{id} | Route id | 200 plain success; 404 missing; possible 403 | Removes visible balance; extracted audit. |
Workspace employee summary fields exposed by Leave Service are id, name, email, and isActive; leaveBalances contains the complete balance DTO. Consumers must minimize personal data and must not rely on unrelated monolith workspace modules during service cutover.
The save example and balance fields are documented in Leave Balances. Example reads should use synthetic authorized contexts; a safe empty workspace is {"employees":[],"leaveBalances":[]}. No carry-forward, encashment, or accrual compatibility operation exists.
Source References
microservices/src/leave-service/Api/LeaveEndpoints.csControllers/HrOperationsController.csmicroservices/src/leave-service/Application/LeaveWorkflows.cs
Related Articles
See Also
Keywords
- Leave API
- Compatibility
- Leave Balance Compatibility API
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly