Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Get overtime compensation history

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

What is Overtime Compensation? Overtime can be compensated in three ways:

  • Paid in cash: Overtime is paid out
  • Turned into vacation days: Overtime is swapped for days off
  • Ignored: Overtime is removed without compensation

What is returned:

  • Compensation type
  • Date of compensation
  • Number of hours compensated
  • Related information (e.g., target year for vacation conversions)

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

GET/account/overtime/compensation-history
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): Overtime compensation ID - **employeeId** (string): Employee ID - **type** (set): Compensation type - **year** (number): Compensation year - **toYear** (number): Target year - **hours** (number): Number of overtime hours - **createdAt** (date): Creation timestamp **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): Overtime compensation 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 (number filter). Available comparisons: equal, not_equal, >, <, >=, <=, is_empty, is_not_empty - **hours** (number): Number of overtime hours (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**: Overtime compensation ID - **employeeId**: Employee ID - **type**: Compensation type - **year**: Compensation year - **toYear**: Target year - **hours**: Number of overtime hours - **createdAt**: Creation timestamp **Sort Structure:** ```json [ { "field": "field_name", "direction": "asc|desc" } ] ``` **Default Sort:** createdAt (desc)
fieldsToReturnany[]
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, hours, createdAt
Responses
200
itemsOvertimeCompensationResponse[]required
Show properties
Array of OvertimeCompensationResponse
createdAtstring<date-time>required
Compensation creation date
employeeIdstringrequired
Employee ID
hoursnumberrequired
Number of hours compensated
idstringrequired
Compensation record ID
typestringrequired
Compensation type
vacationDaysnumber | nullrequired
Number of vacation days if applicable
vacationYearnumber | nullrequired
Vacation year if applicable
pagenumberrequired
pageSizenumberrequired
totalnumberrequired
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X GET "https://leadtime.app/api/public/account/overtime/compensation-history" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "items": [
    {
      "createdAt": "2024-03-15T10:30:00.000Z",
      "employeeId": "emp_789",
      "hours": 8,
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "type": "PAID",
      "vacationDays": 1,
      "vacationYear": 2024
    }
  ],
  "page": 1,
  "pageSize": 10,
  "total": 25
}