Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

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 identifier
  • dateFrom: Start date of the vacation period
  • dateTo: End date of the vacation period
  • status: Vacation status (“Rejected”, “Cancelled”, or past “Approved” vacations)
  • employeeId: ID of the employee who requested the vacation
  • statusChangedAt: Timestamp when the status was last changed
  • statusChangedBy: 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 teamId query 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/history
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
teamIdstring
Optional 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[]
pagenumber
pageSizenumber
totalnumber
401Unauthorized - 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"
Response
{
  "items": [
    {}
  ],
  "page": 0,
  "pageSize": 0,
  "total": 0
}