Update holiday year
Updates the validity period (validTill) of a custom holiday year configuration.
What this does: Changes how long a custom holiday configuration applies to future years. This is useful when you want to extend or limit the scope of your customizations.
How validTill works:
-
Set to a specific year (e.g.,
2026): The configuration applies from the year’s start year through 2026- Future years within this range will be automatically created as “derived” configurations
- Years beyond
validTillwill use default holidays
-
Set to
null: The configuration applies indefinitely to all future years- All future years will automatically inherit this configuration as “derived” years
- Useful for permanent company holidays that should always apply
Example scenarios:
-
Temporary change: You add a special holiday for 2024-2025 only
- Create year 2024 with
validTill: 2025 - Both 2024 and 2025 will use the custom configuration
- 2026 and beyond will use defaults
- Create year 2024 with
-
Permanent company holiday: You add “Company Foundation Day” that should always be a holiday
- Create year 2024 with
validTill: null - All future years will automatically include this holiday
- Create year 2024 with
-
Extending validity: You previously set
validTill: 2025but want to extend to 2027- Update the year with
validTill: 2027 - Years 2026 and 2027 will now also use the custom configuration
- Update the year with
Note: This endpoint only works on custom holiday years (those with an id). Default years cannot be updated - you must create a custom year first using POST /holidays/years.
/holidays/years/{yearId}AuthorizationOAuth2 access token · headerrequiredapi:writeAuthorizationBearer token (JWT) · headerrequiredyearIdstringrequiredapplication/jsonvalidTillobjectrequiredThe last year this configuration applies to. If null, the configuration applies indefinitely to all future years. If set to a specific year (e.g., 2026), the configuration applies from the year's start year through that year. Future years within this range will automatically be created as "derived" configurations. Years beyond validTill will use default holidays.
Holiday year updated successfully
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions