Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

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/stats
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Responses
200
balancenumberrequired
Current overtime balance in hours
paidThisYearHoursnumberrequired
Paid vacation hours this year
startDatestring<date-time>required
Start date of employment
totalCompensatedHoursnumberrequired
Total compensated hours
totalHoursLoggednumberrequired
Total hours logged
unpaidThisYearHoursnumberrequired
Unpaid vacation hours this year
vacationDaysThisYearnumberrequired
Vacation days taken this year
vacationThisYearHoursnumberrequired
Vacation hours taken this year
workingDaysnumberrequired
Total working days
workingHoursnumberrequired
Expected working hours
workingSincestring<date-time>required
Date 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"
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"
}