Withdraw my reason for a time incident
/time_incidents/{id}/justificationattendance/view_ownRequires feature attendanceNot available in Claudetime_incidents.withdraw_justificationDeletes the reason the token's owner attached to one of their own incidents. The incident itself stays pending, now with no explanation.
When to use: when the employee no longer wants their explanation on file. To change the wording, send a new one with time_incidents.submit_justification instead. Allowed under the same conditions as writing it: nobody has acted on the incident, the deadline has not passed and no payroll run covers the day.
Prerequisites: the incident's id, from the employee's own attendance history. An incident that is not the owner's, or that has no reason on file, answers 404.
Side effects: the reason is deleted for good. Recorded in the audit log. Not offered to Claude: the text cannot be recovered, and the deciders then see the day unexplained.
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.
Parameters
| Name | In | Type | Description | Example |
|---|---|---|---|---|
idRequired | path | integer | Time incident id, from time_incidents.list or time_incidents.team_list (the employee's own ids come from their attendance history). | 5120 |
Accept-Language | header | string | Language of messages and translated labels. English when omitted. Allowed values: ar, en | ar |
Response
200 The incident without a reason, in `record`.
| Field | Type | Description |
|---|---|---|
recordRequired | object | One of the employee's own incidents, as they see it. |
record.idRequired | integer | Incident id. |
record.kindRequired | string | absence, late, early_leave, short_hours (a flexible day under its hours) or incomplete (check-in or check-out missing; never deductible).Allowed values: absence, late, early_leave, short_hours, incomplete |
record.minutesRequired | integer | Minutes at stake. |
record.hours | number | The same, in hours. |
record.statusRequired | string | pending (not decided yet), deducted or ignored.Allowed values: pending, deducted, ignored |
record.review | object | The decision, once there is one. |
record.review.decision | string | deducted or ignored; null while pending. |
record.review.decided_by | object | Who decided. |
record.review.decided_by.id | integer | Employee id. |
record.review.decided_by.name | string | Full name. |
record.review.decided_at | string (date-time) | When (UTC). |
record.review.note | string | The decider's note. |
record.justification | object | The employee's reason, or null when they gave none. |
record.justification.reason | string | What the employee wrote. |
record.justification.submitted_at | string (date-time) | When it was written (UTC). |
record.justification.conflicted | boolean | The incident's minutes changed after the reason was written (the attendance was corrected); read both before deciding. |
record.can_justifyRequired | boolean | The employee may still write, change or withdraw the reason. |
record.blocked_reason | string | Why not, when can_justify is false: corrections_disabled, window_expired, already_decided or payroll_locked. |
record.justify_deadline | string (date) | Last day to explain; null when the profile allows no corrections. |
record.days_left | integer | Days left until the deadline. |
Errors
| HTTP | Code | Meaning | How to fix |
|---|---|---|---|
| 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 | The reason cannot be changed now. blocked_reason says why: corrections_disabled (the employee's attendance profile does not allow corrections), window_expired (past the deadline, the profile's correction days after the incident date), already_decided (a manager or HR has acted on it) or payroll_locked (a payroll run has paid it or covers its date). Without blocked_reason, the reason itself is not valid (blank, or over 500 characters). | With blocked_reason nothing can be done through the API; the employee can raise it with their manager or HR. Otherwise send a reason of 1 to 500 characters. |
| 422 | employee_required | The token's owner has no employee record in this company, so has no incidents to explain. | Use a token created by the employee themselves. |
entitlement_blocked · 429 rate_limited · 500 internal_error