Get vacation request history
Returns a paginated list of all vacation requests for the current employee.
What is returned:
- Complete history of all vacation requests (past and future)
- Request dates, status, and approval information
- Reason for vacation (if provided)
- Who approved/rejected and when
Note: This endpoint is only available for employee accounts. Supports server-side pagination, sorting, and filtering via grid query parameters.
GET
/account/employee/vacations/historyAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:reador
AuthorizationBearer token (JWT) · headerrequiredQuery parameters
pagenumberPage number (1-based)
pageSizenumberNumber of items per page
viewIdstringView identifier for saved grid configurations
filtersstringJSON string containing filter configuration.
**Available Fields:**
- **id** (string): Vacation request ID
- **dateFrom** (date): Vacation start date
- **dateTo** (date): Vacation end date
- **status** (set): Vacation request status
- **employeeId** (string): Employee ID
- **statusChangedAt** (date): Status change timestamp
- **statusChangedBy** (string): User ID who changed status
**Filter Structure:**
```json
[
{
"type": "string|number|date|set|boolean|array|task_status|task_type",
"fieldName": "field_name",
"value": {
"comparison": "comparison_type",
"value": "filter_value"
}
}
]
```
**Group Filters (AND/OR Combinations):**
```json
[
{
"type": "group",
"fieldName": "group0.18807479823070028",
"value": {
"type": "or",
"filters": [
{
"type": "string",
"fieldName": "fileName",
"value": {
"comparison": "contain",
"value": "aa"
}
},
{
"type": "number",
"fieldName": "rowCount",
"value": {
"comparison": ">=",
"value": 33
}
}
]
}
}
]
```
**Available Comparison Operators:**
- **id** (string): Vacation request ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
- **dateFrom** (date): Vacation start date (date filter). Available comparisons: equal, not_equal, >, <, >=, <=, between, lastMonth, thisMonth, is_empty, is_not_empty
- **dateTo** (date): Vacation end date (date filter). Available comparisons: equal, not_equal, >, <, >=, <=, between, lastMonth, thisMonth, is_empty, is_not_empty
- **status** (set): Vacation request status (set filter). Available comparisons: in, not_in, is_empty, is_not_empty
- **employeeId** (string): Employee ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
- **statusChangedAt** (date): Status change timestamp (date filter). Available comparisons: equal, not_equal, >, <, >=, <=, between, lastMonth, thisMonth, is_empty, is_not_empty
- **statusChangedBy** (string): User ID who changed status (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
**Note:** Use `quickSearch` parameter for simple text search instead of adding it to filters.
sortstringJSON array of sort objects.
**Sortable Fields:**
- **id**: Vacation request ID
- **dateFrom**: Vacation start date
- **dateTo**: Vacation end date
- **status**: Vacation request status
- **employeeId**: Employee ID
- **statusChangedAt**: Status change timestamp
- **statusChangedBy**: User ID who changed status
**Sort Structure:**
```json
[
{
"field": "field_name",
"direction": "asc|desc"
}
]
```
**Default Sort:** dateFrom (desc)
fieldsToReturnany[]Comma-separated list of field names to include in response items. If not provided, all fields are returned.
**Available Fields:** id, dateFrom, dateTo, status, employeeId, statusChangedAt, statusChangedBy, reason
Responses
200
itemsVacationHistoryResponse[]requiredShow propertiesHide properties
Array of
VacationHistoryResponsedateFromstringrequireddateTostringrequiredemployeeIdstringrequiredidstringrequiredreasonstring | nullrequiredstatusstringrequiredAllowed:
PendingApprovedRejectedstatusChangedAtstring | nullrequiredstatusChangedBystring | nullrequiredpagenumberrequiredpageSizenumberrequiredtotalnumberrequired401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Employee not found
Request
curl -X GET "https://leadtime.app/api/public/account/employee/vacations/history" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/account/employee/vacations/history", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/account/employee/vacations/history",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"items": [
{
"dateFrom": "2024-06-01T00:00:00.000Z",
"dateTo": "2024-06-05T00:00:00.000Z",
"employeeId": "123e4567-e89b-12d3-a456-426614174001",
"id": "123e4567-e89b-12d3-a456-426614174000",
"reason": "Family vacation",
"status": "Approved",
"statusChangedAt": "2024-06-02T10:30:00.000Z",
"statusChangedBy": "John Doe"
}
],
"page": 1,
"pageSize": 10,
"total": 50
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Employee not found