Edit my overtime request
/overtime_requests/{id}attendance/view_ownRequires feature attendanceAvailable in Claudeovertime_requests.updateChanges the date, times or reason of one of the token owner's own requests. Send all four fields. The same checks as overtime_requests.create run again, so the window can be trimmed against the shift and come back with a warning. The request keeps its id and its place in the approval chain.
Which states: pending_manager, and pending_hr when no manager has approved it (an employee with no manager). Once a manager has approved, or it is decided or cancelled, it answers 422.
When to use: to correct a request before it is approved. To withdraw it, use overtime_requests.cancel.
Prerequisites: the id from overtime_requests.list (only your own requests; others answer 404). The token owner must be an employee, with "View own attendance".
Side effects: none besides the change; the approvers are not emailed again. Recorded in the audit log.
Before you call this
You will need ids that come from these operations:
Parameters
| Name | In | Type | Description | Example |
|---|---|---|---|---|
idRequired | path | integer | Overtime request id, from overtime_requests.list, team_overtimes.pending_requests or hr_overtimes.requests. | 412 |
Accept-Language | header | string | Language of messages and translated labels. English when omitted. Allowed values: ar, en | ar |
Request body
application/json
| Field | Type | Description |
|---|---|---|
overtime_requestRequired | object | The overtime worked. |
overtime_request.dateRequired | string (date) | The work day (YYYY-MM-DD). For a window past midnight, the day it started. |
overtime_request.start_timeRequired | string | Start, HH:MM 24-hour, company time zone. |
overtime_request.end_timeRequired | string | End, HH:MM. Earlier than the start means the next day. At most 12 hours. |
overtime_request.reasonRequired | string | Why the overtime was needed, up to 500 characters. |
Response
200 The request after the change; `warning` when it was trimmed.
| Field | Type | Description |
|---|---|---|
recordRequired | object | One overtime request. |
record.idRequired | integer | Overtime request id. |
record.employee_idRequired | integer | Id of the employee who asked. |
record.employee_no | string | Their employee number. |
record.employee_name | string | Their full name. |
record.dateRequired | string (date) | The work day the hours belong to (YYYY-MM-DD). |
record.start_timeRequired | string | Start, HH:MM on the employee's wall clock (company time zone). |
record.end_timeRequired | string | End, HH:MM. Earlier than the start means it ends the next day. |
record.minutesRequired | integer | Length in minutes (1 to 720). |
record.hours | number | Length in hours, two decimals. |
record.reason | string | Why the overtime was worked. |
record.statusRequired | string | Where the request stands: pending_manager (waiting for the employee's manager), pending_hr (waiting for HR), approved (will be paid), rejected or cancelled (by the employee).Allowed values: pending_manager, pending_hr, approved, rejected, cancelled |
record.trimmed | boolean | True when QHR cut the asked window because part of it fell inside the shift. |
record.original_start_time | string | The start originally asked, when trimmed. |
record.original_end_time | string | The end originally asked, when trimmed. |
record.current_approver_name | string | Who must decide next: the manager's name, or "HR" (translated). Null once decided. |
record.can_act | boolean | True when the token owner may approve or reject it now. |
record.attendance_profile | object | The employee's schedule on that date, so an approver can see the claim is outside it. |
record.attendance_profile.id | integer | Attendance profile id. |
record.attendance_profile.name | string | Attendance profile name. |
record.attendance_profile.daily_target_hours | number | Hours a normal day asks. |
record.attendance_profile.grace_period_minutes | integer | Late grace, minutes. |
record.attendance_profile.shift_start | string | Shift start that day, HH:MM; null on a day off or flexible day. |
record.attendance_profile.shift_end | string | Shift end that day, HH:MM. |
record.attendance_profile.day_type | string | working_day, weekend, holiday or on_leave. |
record.attendance_profile.flexible | boolean | True on a flexible day (hours owed, no fixed window). |
record.attendance_profile.scheduled_hours | number | Hours owed that day; null when nothing is owed. |
record.manager | object | The manager's decision: who, when and the note. Null until that desk has acted. |
record.manager.id | integer | Employee id of the approver. |
record.manager.name | string | Approver's full name. |
record.manager.acted_at | string | When they decided, in UTC (ISO 8601). |
record.manager.note | string | Their note; always present on a rejection. |
record.hr | object | The HR decision: who, when and the note. Null until that desk has acted. |
record.hr.id | integer | Employee id of the approver. |
record.hr.name | string | Approver's full name. |
record.hr.acted_at | string | When they decided, in UTC (ISO 8601). |
record.hr.note | string | Their note; always present on a rejection. |
record.payroll_id | integer | The payroll run that paid it; null until a run takes it. |
record.created_at | string | When it was submitted, in UTC (ISO 8601). |
warning | string | Present when the window was trimmed: what was kept and why. Show it to the employee. |
Errors
| HTTP | Code | Meaning | How to fix |
|---|---|---|---|
| 400 | bad_request | A parameter is missing or malformed. | Check the parameters against this operation's documentation. |
| 401 | token_missing | No Authorization: Bearer … header, or it is malformed. | Send Authorization: Bearer qhr_… with the full token. |
| 401 | token_invalid | The 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. |
| 401 | token_expired | The token is past its expiry date. | Create a new token. |
| 401 | token_revoked | The 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. |
| 401 | tenant_inactive | The company account is suspended. | Contact QHR support. |
| 403 | token_read_only | This token can only read; the operation makes changes. | Use a token created with "Allow changes". |
| 403 | forbidden | The token owner's role lacks the permission this operation needs. | Ask an admin to grant the permission shown on this operation (x-permission). |
| 403 | employee_inactive | The token owner's employee record is not active. | HR must reactivate the employee record. |
| 403 | tenant_access_revoked | The 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. |
| 404 | not_found | The record does not exist, or you cannot see it. | Check the id. List the records first to get a valid one. |
| 422 | validation_failed | Refused; error says why: a manager has already approved it, or it is decided or cancelled, or the new window fails a check of overtime_requests.create. | If it is already approved, ask the approver; otherwise fix the window as error explains. |
| 422 | employee_required | The token owner is a system user with no employee record, and overtime belongs to employees. | Use a token created by a user linked to an employee, or ask HR to link your user to your employee record. |
entitlement_blocked · 429 rate_limited · 500 internal_error