Get vacation history grid
Retrieves vacation history with support for filtering, sorting, and pagination.
What is returned: A paginated grid response containing vacation history items. Each item includes:
id: Unique vacation identifierdateFrom: Start date of the vacation perioddateTo: End date of the vacation periodstatus: Vacation status (“Rejected”, “Cancelled”, or past “Approved” vacations)employeeId: ID of the employee who requested the vacationstatusChangedAt: Timestamp when the status was last changedstatusChangedBy: ID of the user who changed the status (null if not changed by a user)reason: Optional reason provided when the vacation was declined or cancelled
What is included in history:
- All rejected vacation requests
- All cancelled vacations (previously approved but then cancelled)
- All approved vacations that have ended (dateTo < today)
- Does not include pending or upcoming approved vacations (use the pending/upcoming endpoints for those)
Grid features:
- Filtering: Filter by date range, employee, status, or any other field
- Sorting: Sort by any column (default sorting can be specified)
- Pagination: Standard grid pagination with page size control
- Grid parameters are automatically parsed from query string using standard grid format
How it works:
- Managers with “manageAll” permission see all vacation history across the workspace
- Managers with “manageTeams” permission only see history from employees in their teams
- Use the optional
teamIdquery parameter to filter history for a specific team - Supports standard grid server-side parameters (filters, sort, pagination)
Use cases:
- Building a vacation history table with search and filter capabilities
- Analyzing vacation patterns and trends
- Reviewing past vacation decisions and reasons
- Generating reports on vacation usage
GET
/vacations/historyAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:reador
AuthorizationBearer token (JWT) · headerrequiredQuery parameters
teamIdstringOptional team ID (UUID) to filter vacation history for a specific team. If not provided, returns history based on the manager permissions (all teams for manageAll, or manager teams for manageTeams). This parameter is useful for team-specific managers who want to focus on a particular team.
Responses
200Successfully retrieved vacation history grid
itemsobject[]pagenumberpageSizenumbertotalnumber401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X GET "https://leadtime.app/api/public/vacations/history" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/vacations/history", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/vacations/history",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"items": [
{}
],
"page": 0,
"pageSize": 0,
"total": 0
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions