---
search:
  tags:
    - time
    - GET
seo:
  description: >-
    Retrieves comprehensive time table data for employees over a specified date…
    Reference for the GET /time/timetable endpoint in the Leadtime Public API
    API.
sidebar:
  badge: GET
  label: Get time table data for date range
title: Get time table data for date range
type: openapi-operation
---
Retrieves comprehensive time table data for employees over a specified date range. The time table provides a calendar view showing attendance, time bookings, vacations, sickness, holidays, and work hours for team members.

**What is the Time Table?**
The time table is a unified calendar view that combines multiple time-related data sources:
- Attendance tracking (clock in/out times, total hours, mood)
- Time bookings (hours logged on projects and tasks)
- Vacation requests (pending and approved)
- Sickness records
- Public holidays (based on employee holiday codes)
- Work day configuration (working days, work day length)
- Chargeable time goals and actuals

**Required Permission:**
User must be an Employee type. Additionally, one of the following time table viewing permissions is required:
- TimeTablePermissions.viewAll: View all employees
- TimeTablePermissions.viewOwn: View own data only
- TimeTablePermissions.viewTeams: View own team members

**User Filtering Options:**
The usersFilter parameter controls which employees are included in the response:
- "all": Returns all employees in the workspace. Requires TimeTablePermissions.viewAll permission.
- "me": Returns only the authenticated user. Requires TimeTablePermissions.viewOwn or TimeTablePermissions.viewTeams permission.
- "team:&#123;teamId&#125;": Returns all members of the specified team. Requires TimeTablePermissions.viewTeams permission, and the user must be a member of that team.

**Data Visibility Rules:**
The response includes different data fields based on permissions and workspace settings:
- spentHours and chargeableTime: Only included if user has Tasks.seeLoggedTime permission
- Attendance data (timeFrom, timeTo, totalHours, mood): Only included if workspace has attendanceEnabled flag set
- If attendance is disabled, totalHours shows time booking data instead
- Returns empty object &#123;&#125; if user has no time table viewing permissions

**Date Handling:**
- Dates must be in ISO 8601 format (YYYY-MM-DD)
- Dates are normalized to UTC at midnight
- If dateStart > dateEnd, they are automatically swapped
- Response includes all days in the range, including weekends

**Response Structure:**
Returns an object keyed by userId. Each key contains:
- employeeId: Employee UUID
- userId: User UUID
- name: Employee full name
- days: Array of day objects, one for each date in the range

**Day Object Fields:**
Each day object contains:
- type: 0 for Attendance mode, 1 for TimeBooking mode
- date: ISO date string
- isWeekend: Whether the day is a weekend based on employee work schedule
- workDayLength: Expected work hours for the day
- mood: Attendance mood (if attendance enabled)
- timeFrom/timeTo: Clock in/out times (if attendance enabled)
- totalHours: Total hours worked (attendance) or logged (time booking)
- spentHours: Hours logged on tasks (requires Tasks.seeLoggedTime permission)
- chargeableTime: Hours logged on billable projects (requires Tasks.seeLoggedTime permission)
- chargeableGoal: Daily chargeable hours goal for the employee
- holiday: Name of public holiday if applicable
- vacation: Vacation request data if day falls within a vacation period
- sickness: Sickness record data if day falls within a sickness period
- contractStarted: Whether employee contract has started by this date
- comment: Optional comment for the day
- highlight: Whether the day should be highlighted in UI

<Operation source="api-reference" id="timetablecontroller-gettimetable" />
