GET /api/work_time_entries
Get work-time entries list

Examples

{
  "collection": [
    {
      "id": 42,
      "user_id": 819,
      "user_name": "John Smith",
      "start_time": "2025-11-17T08:00:00.000Z",
      "end_time": "2025-11-17T17:00:00.000Z",
      "total_break_minutes": 60,
      "total_duration_minutes": 480,
      "description": "Monday, 8h",
      "payroll_timezone": "Europe/Helsinki",
      "reported_at": null,
      "entry_type": "regular",
      "treat_extra_time_as": "flex",
      "automatic": false
    }
  ],
  "pagination": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1
  }
}

Params

Param name Description
page
optional

Page number.

Validations:

  • Must be a Integer

per_page
optional

Number of records per page. Default: 50.

Validations:

  • Must be a Integer

date_range
optional

Get all entries within the specified date range, e.g. 01/01/2026 - 31/01/2026.

Validations:

  • Must be a String

user_id
optional

Get all entries for the specified user.

Validations:

  • Must be a Integer

automatic
optional

Get all automatically/manually created entries.

Validations:

  • Must be one of: true, false.

sort_by
optional

Sort by field. Default: start_time.

Validations:

  • Must be a String

order
optional

Sorting order (descending or ascending). Default: asc.

Validations:

  • Must be one of: desc, asc.


GET /api/work_time_entries/:id
Get a specific work-time entry

Examples

{
  "id": 42,
  "user_id": 819,
  "user_name": "John Smith",
  "start_time": "2025-11-17T08:00:00.000Z",
  "end_time": "2025-11-17T17:00:00.000Z",
  "total_break_minutes": 60,
  "total_duration_minutes": 480,
  "description": "Monday, 8h",
  "payroll_timezone": "Europe/Helsinki",
  "reported_at": null,
  "entry_type": "regular",
  "treat_extra_time_as": "flex",
  "automatic": true
}

Params

Param name Description
id
required

Entry ID

Validations:

  • Must be a Integer


POST /api/work_time_entries
Create a work-time entry

Params

Param name Description
work_time_entry
required

Validations:

  • Must be a Hash

work_time_entry[user_id]
optional

User ID. Falls back to current user’s ID.

Validations:

  • Must be a Integer

work_time_entry[start_time]
required

Work-time start, e.g. "2025-11-17T08:00:00.000Z".

Validations:

  • Must be a Integer

work_time_entry[end_time]
required

Work-time end, e.g. "2025-11-17T08:00:00.000Z".

Validations:

  • Must be a Integer

work_time_entry[total_break_minutes]
optional

Total breaks duration in minutes.

Validations:

  • Must be a Integer

work_time_entry[description]
optional

Work-time entry description.

Validations:

  • Must be a String

work_time_entry[entry_type]
optional

Entry type. Default: "regular".

Validations:

  • Must be one of: regular, on_call, travel, training, staggered.

work_time_entry[treat_extra_time_as]
optional

Whether to treat overtime as flex or as paid overtime.

Validations:

  • Must be one of: not_selected, flex, paid_overtime.


PUT /api/work_time_entries/:id
Update a work-time entry

Params

Param name Description
id
required

Entry ID

Validations:

  • Must be a Integer

work_time_entry
required

Validations:

  • Must be a Hash

work_time_entry[user_id]
optional

User ID. Falls back to current user’s ID.

Validations:

  • Must be a Integer

work_time_entry[start_time]
required

Work-time start, e.g. "2025-11-17T08:00:00.000Z".

Validations:

  • Must be a Integer

work_time_entry[end_time]
required

Work-time end, e.g. "2025-11-17T08:00:00.000Z".

Validations:

  • Must be a Integer

work_time_entry[total_break_minutes]
optional

Total breaks duration in minutes.

Validations:

  • Must be a Integer

work_time_entry[description]
optional

Work-time entry description.

Validations:

  • Must be a String

work_time_entry[entry_type]
optional

Entry type. Default: "regular".

Validations:

  • Must be one of: regular, on_call, travel, training, staggered.

work_time_entry[treat_extra_time_as]
optional

Whether to treat overtime as flex or as paid overtime.

Validations:

  • Must be one of: not_selected, flex, paid_overtime.


DELETE /api/work_time_entries/:id
Delete a work-time entry

Params

Param name Description
id
required

Entry ID

Validations:

  • Must be a Integer


PUT /api/work_time_entries/:id/set_reported_at
Save timestamp of reporting the entry to payroll

Mark work-time entry as reported to payroll by setting its reported_at timestamp, or mark it as not reported to payroll by setting its reported_at to null. Reported entries are locked for edit.

Examples

{"reported_at":1740649659}
{"reported_at":true}
{"reported_at":null}

Params

Param name Description
reported_at
optional

Timestamp, in Unix time format. Pass true to use current time. Pass null to erase reported_at timestamp.

Validations:

  • Must be a String


GET /api/work_time_entries/types/for_user/:user_id
Get available worktime types

Examples

["regular","on_call","travel","training","staggered"]

Params

Param name Description
user_id
required

Validations:

  • Must be a Integer


GET /api/work_time_entries/daily_stats
Get work time stats for a user with a daily breakdown

Get work time stats for a user with a daily breakdown for a given date range.

Stats will include:

  • date
  • actual (logged) work time, in minutes
  • mandatory working time, in minutes
  • absence time, in minutes
  • flex absence time, in minutes — only present when the user's effective LAT set contains a flex_leave type
  • paid overtime time, in minutes — only present when the user's work-time group has allow_paid_overtime; excluded from work_time_balance
  • work time balance, in minutes — actual − paid_overtime − mandatory
  • is the date locked, boolean

Permissions. User's work time balance can be accessed by:

  • user themselves
  • user's approvers
  • company's managers and accountants

Examples

[
   {
    "date": "2025-03-25",
    "actual_worked_time": 900,
    "mandatory_working_time": 450,
    "absence_time": 0,
    "paid_overtime_time": 450,
    "work_time_balance": 0,
    "is_locked": false
  },
  {
    "date": "2025-03-26",
    "actual_worked_time": 0,
    "mandatory_working_time": 450,
    "absence_time": 0,
    "work_time_balance": -450,
    "is_locked": true
  }
]

Params

Param name Description
user_id
optional

User ID. Default: current user ID.

Validations:

  • Must be a Integer

start_date
optional

Date to start the balance calculations from. Default: date of the user’s first time entry. If start date has not been passed explicitly and user has no time entries, time balance will not be calculated.

Validations:

  • Must be a String

end_date
optional

Date to end the balance calculations with, inclusive. Default: today.

Validations:

  • Must be a String

date_range
optional

Get stats within the specified date range.Either pass date_range or start/end dates. Date range format: "DD/MM/YYYY - DD/MM/YYYY" (e.g. 15/02/2025 - 28/02/2025).

Validations:

  • Must be a String


GET /api/work_time_entries/new/defaults
Get attributes to prefill a new entry with

  • If current user has no work-time entries for the date, reponds with start_time, end_time, and total_break_minutes.
  • If current user already has entries for the date, responds with start_time only.
  • If current user can have both flex and paid overtime, also adds remaining_work_minutes to the response.
  • Responds with {} if defaults cannot be calculated.

Errors

Code Description
422 Date param is invalid.

Examples

{
  "start_time": "2025-12-31T06:30:00.000Z",
  "end_time": "2025-12-31T15:30:00.000Z",
  "total_break_minutes": 60,
  "remaining_work_minutes": 450
}

Params

Param name Description
date
optional

Date, e.g. "2025-12-31". Defaults to current date (in Europe/Helsinki timezone).

Validations:

  • Must be a String