Leave Balances
Get Balance by Type
Get detailed balance for a specific leave type
GET
Retrieve detailed leave balance information for the authenticated employee for a specific leave type and year. This provides a comprehensive breakdown including total days, used days, pending days, and available days.
Authentication
Requires authentication with Bearer token. Available to:- Employee
- Manager
This endpoint automatically uses the employee ID from the JWT token, so employees can only check their own balance.
Path Parameters
string
required
The unique identifier of the leave type (UUID format)Example:
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"Query Parameters
integer
required
The year to retrieve balance for (between 2020 and 2100)Example:
2025Response
boolean
Indicates if the request was successful
object
Detailed leave balance object
Balance Breakdown
The response provides a complete picture of leave balance:1
Total Days
Base allocation (e.g., 20 days) + carried forward days (e.g., 2 days) = 22 total days
2
Used Days
Days already taken through approved leave requests (e.g., 5 days)
3
Pending Days
Days requested but awaiting approval (e.g., 1.5 days)
4
Available Days
Total days - used days - pending days = 15.5 days available
Comparison with Check Balance
Check Balance
Returns only the available days number (quick check)
Get Balance by Type
Returns complete breakdown with all balance components
Use Cases
This endpoint is ideal for:- Detailed balance display: Show comprehensive leave status in employee portals
- Leave request forms: Display full context before submission
- Balance analytics: Track usage patterns and trends
- Approval workflows: Provide complete balance information to approvers
This endpoint includes the leave type configuration (name, code, color) making it perfect for building rich UI components without additional API calls.
Related Endpoints
- Check Balance - Quick available days check
- Get Employee Balances - All balances for an employee
- Request Leave - Submit a new leave request