Attendance > Shift

Reads all Shifts

Changed on

Reads all Shifts

get/api/2026-10-01/resources/attendance/shifts

Request

  • Base URL
    https://api.factorialhr.com
  • URL
    https://api.factorialhr.com/api/2026-10-01/resources/attendance/shifts
  • Auth
    • OAuth 2
      Authorization code: https://id.factorialhr.com/oauth/authorize
      Token URL: https://id.factorialhr.com/api/oauth/token scopes: time_tracking
    • or API key in header x-api-key

Query parameters

employee_ids[]string[]

Return only the shifts of these employees.

[
  "1",
  "2",
  "3"
]
start_onstring

Return only the shifts whose reference date (the day the shift counts towards, which for an overnight shift is the day it started) is on or after this date. Can be given on its own, as an open-ended lower bound.

Example:2023-09-30
end_onstring

Return only the shifts whose reference date is on or before this date. Can be given on its own, as an open-ended upper bound.

Example:2023-10-01
ids[]string[]

Return only the shifts with these ids.

[
  "1",
  "2",
  "3"
]
half_dayboolean required

Set to true to return only the shifts marked as covering half a day. Passing false has no effect: it does not exclude them.

workableboolean

Set to true for worked time only, false for the non-workable entries (breaks). Leave it unset to get both.

Example:true
latest_shiftboolean

Flag to filter only the latest shift for each employee

Example:true
sort_created_at_ascboolean required

Flag to sort by created_at asc

Example:true
breaks_with_time_configurationboolean

Flag to include breaks with time configuration

Example:true
last_working_shiftboolean

Filter by last working shift

Example:true
updated_atstring

Filter shifts by the date they were last updated

Example:2023-10-01

Response

OK

Example response

{
  "data": [
    {
      "id": "1",
      "employee_id": "1",
      "date": "2023-10-01",
      "reference_date": "2023-09-30",
      "clock_in": "08:30",
      "clock_out": "12:30",
      "in_source": "automatic",
      "out_source": "automatic",
      "observations": "Employee arrived late due to traffic",
      "location_type": "office",
      "half_day": "beginning_of_day",
      "in_location_latitude": 37.7749,
      "in_location_longitude": -122.419,
      "in_location_accuracy": 5,
      "out_location_latitude": 37.7749,
      "out_location_longitude": -122.419,
      "out_location_accuracy": 5.7,
      "workable": true,
      "created_at": "2023-10-01T08:00:00.000Z",
      "workplace_id": "1",
      "time_settings_break_configuration_id": "1",
      "company_id": "1",
      "updated_at": "2023-10-01T08:00:00.000Z",
      "minutes": 240,
      "clock_in_with_seconds": "08:30:15"
    }
  ]
}

Changes