v1

latestOpenAPI 3.1.02026-07-26549156879.0 KB
Attendance > Shift

Creates a shift

Creates a complete shift by specifying both the clock-in and clock-out times. If you need to clock in directly, consider using or subscribing to the clock-in endpoint

post/api/2026-07-01/resources/attendance/shifts

Request body

employee_idstring

Id of the employee related

datestring required

Date of the shift

reference_datestring

Reference date of the shift

dayinteger

number of days of the shift

clock_instring

Time of the clock in

clock_outstring

Time of the clock out

observationsstring

Comments added to the shift

half_daystring

Boolean that indicates if the shift is a half day

workableboolean

Boolean that indicates if the shift is workable

location_type'office' | 'business_trip' | 'work_from_home'

Type of the location

source'desktop' | 'mobile' | 'face_recognition' | 'qr_code' | 'mobile_geolocation' | 'shared_device' | 'api' | 'system'

Source of the shift creation

time_settings_break_configuration_idstring

Id of the break configuration

Example request

{
  "employee_id": "1",
  "date": "2022-01-01",
  "reference_date": "2022-01-01",
  "day": 1,
  "clock_in": "2024-01-01T12:12:01-02:00",
  "clock_out": "2024-01-01T12:12:01-02:00",
  "observations": "This is an observation",
  "workable": true,
  "location_type": "office",
  "source": "desktop",
  "time_settings_break_configuration_id": "1"
}

Response

CREATED

idstring required

Unique identifier for the shift

employee_idstring required

Identifier for the employee assigned to the shift

datestring required

Date of the shift

reference_datestring required

Reference date for the shift

clock_instring

Time when the employee clocked in

clock_outstring

Time when the employee clocked out

in_sourcestring

Source of the clock-in time

out_sourcestring

Source of the clock-out time

observationsstring

Additional observations about the shift

location_type'office' | 'business_trip' | 'work_from_home'

Type of location for the shift

half_day'beginning_of_day' | 'end_of_day'

Indicates which worked part of the day

in_location_latitudenumber

Latitude of the clock-in location

in_location_longitudenumber

Longitude of the clock-in location

in_location_accuracynumber

Accuracy of the clock-in location

out_location_latitudenumber

Latitude of the clock-out location

out_location_longitudenumber

Longitude of the clock-out location

out_location_accuracynumber

Accuracy of the clock-out location

workableboolean

Indicates if the shift is workable

created_atstring required

Timestamp when the shift record was created

workplace_idstring

Identifier for the location

time_settings_break_configuration_idstring

Identifier for the break configuration

company_idstring required

Identifier for the company

updated_atstring required

Timestamp when the shift record was updated

minutesinteger required

Number in minutes of the shift

clock_in_with_secondsstring

Clock in time with seconds

Example response

{
  "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"
}