Attendance > EditTimesheetRequest

Creates an Edit timesheet request

Changed on

Creates an edit timesheet request by specifying the type of the request and the fields required to create or update the shift.

post/api/2026-10-01/resources/attendance/edit_timesheet_requests

Request

  • Base URL
    https://api.factorialhr.com
  • URL
    https://api.factorialhr.com/api/2026-10-01/resources/attendance/edit_timesheet_requests
  • 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

Request body

employee_idstring required

Id of the employee related.

request_type'create_shift' | 'delete_shift' | 'update_shift' required

Type of the request. Could be create_shift, update_shift or delete_shift.

reasonstring

Reason or comment justifying the edit timesheet request.

datestring

Date of the shift in case the request is to create a new shift.

clock_instring

Clock in of the shift in case is for create or edit a shift.

clock_outstring

Clock in of the shift in case is for create or edit a shift.

workableboolean

If the shift is a workable shift or a break in case is for create or edit a shift.

attendance_shift_idstring

The id of the shift in case is for edit or delete a shift.

reference_datestring

Reference date of the shift in case is for create or edit a shift.

time_settings_break_configuration_idstring

Id of the break in case is for create or editing a break.

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

Type of the location in case is for create or edit a shift.

observationsstring

Shift observations in case is for create or edit a shift.

workplace_idstring

Id of the workplace (location) for the shift.

clock_in_work_area_idstring

Id of the clock-in work area within the workplace.

clock_out_work_area_idstring

Id of the clock-out work area within the workplace.

Example request

{
  "employee_id": "1",
  "request_type": "create_shift",
  "reason": "Looks good!",
  "date": "2022-01-01",
  "clock_in": "2024-01-01T12:12:01-02:00",
  "clock_out": "2024-01-01T12:12:01-02:00",
  "workable": true,
  "attendance_shift_id": "1",
  "reference_date": "2022-01-01",
  "time_settings_break_configuration_id": "1",
  "location_type": "office",
  "observations": "Employee arrived late due to traffic",
  "workplace_id": "1",
  "clock_in_work_area_id": "1",
  "clock_out_work_area_id": "1"
}

Response

CREATED

idstring required

Unique identifier for the edit timesheet request

approvedboolean

Tri-state approval status — true = approved, false = rejected, null = pending approval

request_type'create_shift' | 'delete_shift' | 'update_shift' required

What the request asks to do — one of create_shift, update_shift, delete_shift

employee_idstring required

Id of the shift's employee

workableboolean

Indicates if the shift is workable or a break

clock_instring

Clock in of the shift

clock_outstring

Clock out of the shift

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

Location of the shift

reasonstring

Approve or reject reason

attendance_shift_idstring

Id of the shift for the request

time_settings_break_configuration_idstring

Id of the type of break for the request

observationsstring

Additional observations for the shift

datestring

Date of the shift

reference_datestring

Reference date for the shift

workplace_idstring

Id of the workplace (location) for the shift

clock_in_work_area_idstring

Id of the clock-in work area within the workplace

clock_out_work_area_idstring

Id of the clock-out work area within the workplace

Example response

{
  "id": "1",
  "request_type": "update_shift",
  "employee_id": "1",
  "workable": true,
  "clock_in": "08:30",
  "clock_out": "10:30",
  "location_type": "office",
  "reason": "Looks good!",
  "attendance_shift_id": "1",
  "time_settings_break_configuration_id": "1",
  "observations": "Employee arrived late due to traffic",
  "date": "2023-10-01",
  "reference_date": "2023-10-01",
  "workplace_id": "1",
  "clock_in_work_area_id": "1",
  "clock_out_work_area_id": "1"
}

Changes