QHR Developers

Cancel an employee's scheduled profile change

DELETE/employees/{id}/attendance_profile
Needs a read & write tokenAssign profiles to employees attendance_profile/assignRequires feature attendance_profileNot available in Claudeattendance_profiles.cancel_scheduled_change

Cancels the employee's next profile change that has not started yet; they stay on their current profile. A change that has already started is history and cannot be cancelled: move them back with attendance_profiles.change_employee_profile instead.

When to use: when a planned shift or branch move is called off.

Prerequisites: the employee's id from employees.list; check there is a scheduled change with attendance_profiles.employee_profile.

Side effects: deletes the scheduled change and recounts the employee's upcoming leave with the days off of the profile they stay on. Not offered to Claude, because the cancelled change cannot be restored.

Irreversible operation

This operation cannot be undone and can affect the whole company. Double-check the ids before you call it. For safety it is never offered through Claude.

Before you call this

You will need ids that come from these operations:

Parameters

NameInTypeDescriptionExample
idRequiredpathintegerEmployee id, from employees.list or employees.search.1203
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 The employee's profile, with no scheduled change.

FieldTypeDescription
currentobjectAn attendance profile: the working-time rules for the employees on it.
current.idintegerProfile id; null only for the built-in default of a company with no saved profile.
current.namestringName in the requested language.
current.name_enstringName in English, unique in the company.
current.name_arstringName in Arabic, unique in the company.
current.is_defaultbooleanTrue for the company's default profile, used by every employee with no other profile.
current.work_start_timestringWork starts, HH:MM, company time.
current.work_end_timestringWork ends, HH:MM; earlier than the start means a night shift ending the next day.
current.daily_target_hoursnumberHours owed on a working day.
current.weekly_target_hoursnumberHours owed in a week, derived from the days off and day shifts.
current.weekly_target_daysintegerWorking days in a week (7 minus the days off).
current.days_offarray<integer>The profile's days off, 0 (Sunday) to 6 (Saturday).
current.correction_requests_enabledbooleanEmployees may ask to correct a missed or wrong check-in.
current.correction_request_limit_daysintegerHow many days back a correction may be asked for.
current.correction_approved_bystringWho approves correction and permission requests: manager, hr or manager_and_hr (the manager, then HR).
Allowed values: manager, hr, manager_and_hr
current.permission_requests_enabledbooleanEmployees may ask permission to arrive late or leave early.
current.grace_period_enabledbooleanA late arrival within the grace period is not counted late.
current.grace_period_minutesintegerGrace period in minutes.
current.auto_absent_after_minutesintegerMinutes after the start with no check-in before the day is marked absent.
current.track_breaksbooleanBreaks are recorded and deducted from the hours worked.
current.allowed_break_minutesintegerBreak minutes a day allowed when breaks are tracked.
current.assigned_employees_countintegerEmployees on this profile today.
current.day_shiftsarray<object>Per-weekday shifts; a weekday with none uses the work start and end times.
current.day_shifts[].idintegerDay shift id; send it back to change or remove this shift.
current.day_shifts[].namestringShift name, e.g. Morning.
current.day_shifts[].day_of_weekintegerWeekday, 0 (Sunday) to 6 (Saturday).
min 0 · max 6
current.day_shifts[].kindstringrigid (fixed start) or flexible (hours only).
Allowed values: rigid, flexible
current.day_shifts[].start_timestringStart, HH:MM, company time; null on a flexible day.
current.day_shifts[].required_hoursnumberHours the day lasts.
current.day_shifts[].location_idintegerLocation the shift is worked at, if any.
current.day_shifts[].location_namestringThat location's name.
effective_fromstring (date)Date the current profile started; null when the employee was never moved and is on their contract's profile or the company default.
scheduledobjectThe next scheduled change, or null.
scheduled.attendance_profileobjectAn attendance profile: the working-time rules for the employees on it.
scheduled.attendance_profile.idintegerProfile id; null only for the built-in default of a company with no saved profile.
scheduled.attendance_profile.namestringName in the requested language.
scheduled.attendance_profile.name_enstringName in English, unique in the company.
scheduled.attendance_profile.name_arstringName in Arabic, unique in the company.
scheduled.attendance_profile.is_defaultbooleanTrue for the company's default profile, used by every employee with no other profile.
scheduled.attendance_profile.work_start_timestringWork starts, HH:MM, company time.
scheduled.attendance_profile.work_end_timestringWork ends, HH:MM; earlier than the start means a night shift ending the next day.
scheduled.attendance_profile.daily_target_hoursnumberHours owed on a working day.
scheduled.attendance_profile.weekly_target_hoursnumberHours owed in a week, derived from the days off and day shifts.
scheduled.attendance_profile.weekly_target_daysintegerWorking days in a week (7 minus the days off).
scheduled.attendance_profile.days_offarray<integer>The profile's days off, 0 (Sunday) to 6 (Saturday).
scheduled.attendance_profile.correction_requests_enabledbooleanEmployees may ask to correct a missed or wrong check-in.
scheduled.attendance_profile.correction_request_limit_daysintegerHow many days back a correction may be asked for.
scheduled.attendance_profile.correction_approved_bystringWho approves correction and permission requests: manager, hr or manager_and_hr (the manager, then HR).
Allowed values: manager, hr, manager_and_hr
scheduled.attendance_profile.permission_requests_enabledbooleanEmployees may ask permission to arrive late or leave early.
scheduled.attendance_profile.grace_period_enabledbooleanA late arrival within the grace period is not counted late.
scheduled.attendance_profile.grace_period_minutesintegerGrace period in minutes.
scheduled.attendance_profile.auto_absent_after_minutesintegerMinutes after the start with no check-in before the day is marked absent.
scheduled.attendance_profile.track_breaksbooleanBreaks are recorded and deducted from the hours worked.
scheduled.attendance_profile.allowed_break_minutesintegerBreak minutes a day allowed when breaks are tracked.
scheduled.attendance_profile.assigned_employees_countintegerEmployees on this profile today.
scheduled.attendance_profile.day_shiftsarray<object>Per-weekday shifts; a weekday with none uses the work start and end times.
scheduled.attendance_profile.day_shifts[].idintegerDay shift id; send it back to change or remove this shift.
scheduled.attendance_profile.day_shifts[].namestringShift name, e.g. Morning.
scheduled.attendance_profile.day_shifts[].day_of_weekintegerWeekday, 0 (Sunday) to 6 (Saturday).
min 0 · max 6
scheduled.attendance_profile.day_shifts[].kindstringrigid (fixed start) or flexible (hours only).
Allowed values: rigid, flexible
scheduled.attendance_profile.day_shifts[].start_timestringStart, HH:MM, company time; null on a flexible day.
scheduled.attendance_profile.day_shifts[].required_hoursnumberHours the day lasts.
scheduled.attendance_profile.day_shifts[].location_idintegerLocation the shift is worked at, if any.
scheduled.attendance_profile.day_shifts[].location_namestringThat location's name.
scheduled.effective_fromstring (date)Date the change starts.

Errors

HTTPCodeMeaningHow to fix
401token_missingNo Authorization: Bearer … header, or it is malformed.Send Authorization: Bearer qhr_… with the full token.
401token_invalidThe token is unknown or wrong, or its owner's account is locked.Check the token was copied in full, or create a new one in QHR › Settings › API & Integrations.
401token_expiredThe token is past its expiry date.Create a new token.
401token_revokedThe token was revoked by its owner or an admin, or the owner was removed from the company (which revokes all their tokens).Create a new token, or ask your admin. If the owner was removed, they must be re-invited to the company first.
401tenant_inactiveThe company account is suspended.Contact QHR support.
403token_read_onlyThis token can only read; the operation makes changes.Use a token created with "Allow changes".
403forbiddenThe token owner's role lacks the permission this operation needs.Ask an admin to grant the permission shown on this operation (x-permission).
403employee_inactiveThe token owner's employee record is not active.HR must reactivate the employee record.
403tenant_access_revokedThe token's owner is no longer an active member of this company. Rare: removing a member normally revokes their tokens, which answers 401 token_revoked instead.The owner must be re-invited to the company, then create a new token. If the owner is still a member, contact QHR support.
404not_foundThe record does not exist, or you cannot see it.Check the id. List the records first to get a valid one.
422validation_failedThe employee has no scheduled profile change.Check scheduled with attendance_profiles.employee_profile.
This endpoint can also return the errors that can happen on any endpoint →402 / 412 / 425 entitlement_blocked · 429 rate_limited · 500 internal_error

See the full error catalogue →