Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Get vacation compensation history

Returns a paginated list of all vacation compensation entries for the current employee.

What is vacation compensation? Vacation compensation includes:

  • Unused vacation days carried over to the next year
  • Vacation days paid out instead of taken
  • Vacation days converted from overtime hours
  • Manual adjustments (added or deducted days)

What is returned:

  • Compensation type
  • Year and target year (for carryovers)
  • Number of days
  • Creation date

Note: This endpoint is only available for employee accounts. Supports server-side pagination, sorting, and filtering via grid query parameters.

GET/account/employee/vacations/compensation
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
pagenumber

Page number (1-based)

pageSizenumber

Number of items per page

viewIdstring

View identifier for saved grid configurations

filtersstring

JSON string containing filter configuration.

Available Fields:

  • id (string): Compensation entry ID
  • employeeId (string): Employee ID
  • type (set): Compensation type
  • year (number): Compensation year
  • toYear (number): Target year for compensation
  • days (number): Number of compensation days
  • createdAt (date): Creation timestamp

Filter Structure:

[
  {
    "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):

[
  {
    "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): Compensation entry ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, 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
  • type (set): Compensation type (set filter). Available comparisons: in, not_in, is_empty, is_not_empty
  • year (number): Compensation year (number filter). Available comparisons: equal, not_equal, >, <, >=, <=, is_empty, is_not_empty
  • toYear (number): Target year for compensation (number filter). Available comparisons: equal, not_equal, >, <, >=, <=, is_empty, is_not_empty
  • days (number): Number of compensation days (number filter). Available comparisons: equal, not_equal, >, <, >=, <=, is_empty, is_not_empty
  • createdAt (date): Creation timestamp (date filter). Available comparisons: equal, not_equal, >, <, >=, <=, between, lastMonth, thisMonth, is_empty, is_not_empty

Note: Use quickSearch parameter for simple text search instead of adding it to filters.

sortstring

JSON array of sort objects.

Sortable Fields:

  • id: Compensation entry ID
  • employeeId: Employee ID
  • type: Compensation type
  • year: Compensation year
  • toYear: Target year for compensation
  • days: Number of compensation days
  • createdAt: Creation timestamp

Sort Structure:

[
  {
    "field": "field_name",
    "direction": "asc|desc"
  }
]

Default Sort: createdAt (desc)

fieldsToReturnstring[]

Comma-separated list of field names to include in response items. If not provided, all fields are returned.

Available Fields: id, employeeId, type, year, toYear, days, createdAt

Responses
200
itemsVacationCompensationResponse[]required
Show properties
Array of VacationCompensationResponse
createdAtstringrequired
daysnumberrequired
employeeIdstringrequired
idstringrequired
toYearnumberrequired
typestringrequired
Allowed:OvertimeUnusedBonus
yearnumberrequired
pagenumberrequired
pageSizenumberrequired
totalnumberrequired
401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

404

Employee not found

Try it
Server
Authorization
Parameters
Request
curl -X GET "https://leadtime.app/api/public/account/employee/vacations/compensation" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "items": [
    {
      "createdAt": "2024-06-01T10:30:00.000Z",
      "days": 5,
      "employeeId": "123e4567-e89b-12d3-a456-426614174001",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "toYear": 2025,
      "type": "Overtime",
      "year": 2024
    }
  ],
  "page": 1,
  "pageSize": 10,
  "total": 25
}