Get overtime statistics
Returns comprehensive overtime statistics for the current employee.
What is Overtime? Overtime is automatically calculated from daily time tracking. If an employee works more hours than their contract specifies, positive overtime is created. If they work fewer hours, the balance goes negative.
What is returned:
- Overtime balance: Current balance of all plus or minus hours
- Total recorded: Total sum of all logged working hours
- Contract: Weekly or daily target hours according to the contract
- Total compensated: Sum of hours that have already been balanced out
- Converted to vacation: Hours that were turned into extra vacation days
- Paid in cash: Overtime hours that were paid out
- Ignored: Overtime marked as expired or without compensation
Note: This endpoint is only available for employee accounts.
GET
/account/overtime/statsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:reador
AuthorizationBearer token (JWT) · headerrequiredResponses
200
balancenumberrequiredCurrent overtime balance in hours
paidThisYearHoursnumberrequiredPaid vacation hours this year
startDatestring<date-time>requiredStart date of employment
totalCompensatedHoursnumberrequiredTotal compensated hours
totalHoursLoggednumberrequiredTotal hours logged
unpaidThisYearHoursnumberrequiredUnpaid vacation hours this year
vacationDaysThisYearnumberrequiredVacation days taken this year
vacationThisYearHoursnumberrequiredVacation hours taken this year
workingDaysnumberrequiredTotal working days
workingHoursnumberrequiredExpected working hours
workingSincestring<date-time>requiredDate when employee started working
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X GET "https://leadtime.app/api/public/account/overtime/stats" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/account/overtime/stats", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/account/overtime/stats",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"balance": 100.5,
"paidThisYearHours": 40,
"startDate": "2023-01-01T00:00:00.000Z",
"totalCompensatedHours": 50,
"totalHoursLogged": 1750.5,
"unpaidThisYearHours": 40,
"vacationDaysThisYear": 10,
"vacationThisYearHours": 80,
"workingDays": 200,
"workingHours": 1600,
"workingSince": "2023-01-15T00:00:00.000Z"
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions