Change a public holiday
/holidays/{id}public_holiday/editRequires feature public_holidayNot available in Claudeholidays.updateChanges the fields you send — names, dates, country or dashboard visibility — and leaves the rest as they are.
When to use: to move or lengthen a holiday (e.g. when the Eid dates are confirmed) or to correct its name. To add a new one, use holidays.create.
Prerequisites: the holiday's id from holidays.list. The token's owner must be linked to an employee record.
Side effects: when the dates or the country change, the leave of the employees in the old and new countries is recalculated, and in the background the attendance "holiday" days move with it: days no longer covered go back to normal working days (and may raise an absence again), new days are marked "holiday". Refused if a new date falls in a payroll period already paid. Not offered to Claude, because it changes the attendance and leave of everyone in the country.
Not available in Claude yet.
Before you call this
You will need ids that come from these operations:
Parameters
| Name | In | Type | Description | Example |
|---|---|---|---|---|
idRequired | path | integer | Holiday id, from holidays.list. | 41 |
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 |
|---|---|---|
holidayRequired | object | The holiday's fields. |
holiday.name_en | string | Name in English, up to 100 characters. |
holiday.name_ar | string | Name in Arabic, up to 100 characters. |
holiday.start_date | string (date) | First day. |
holiday.end_date | string (date) | Last day, on or after start_date. Same as start_date for a one-day holiday. |
holiday.country | string | ISO country code (SA, AE…). The holiday applies to employees residing in that country. |
holiday.show_on_dashboard_for_assigned_users | boolean | Show it in those employees' upcoming-holidays card. Default true. |
Response
200 The holiday after the change.
| Field | Type | Description |
|---|---|---|
idRequired | integer | Holiday id. |
name | string | Name in the requested language (English when the Arabic name is empty). |
start_dateRequired | string (date) | First day of the holiday. |
end_dateRequired | string (date) | Last day of the holiday, inclusive. |
countryRequired | string | Country that observes it, ISO code (SA, AE…). Applies to employees whose country of residence is this one. |
country_name | string | Country name in the requested language. |
show_on_dashboard_for_assigned_users | boolean | Shown in the upcoming-holidays card of the employees it applies to. |
name_enRequired | string | Name in English. |
name_arRequired | string | Name in Arabic. |
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 | A field is missing or not valid: a blank name, an unknown country code, end_date before start_date, dates overlapping another holiday of the same country, or a date in a payroll period that has already been paid (error names the payroll run). | Fix the field named in error. For an overlap, change the dates or edit the existing holiday; for a paid period, revert that payroll run first. |
| 422 | employee_required | The token's owner has no employee record in this company. Adding, changing or deleting a holiday re-prices employees' upcoming leave and records who did it, which needs one. | Use a token created by a user who is linked to an employee record. |
entitlement_blocked · 429 rate_limited · 500 internal_error