Delete custom holiday year
Note: This endpoint is not implemented. To reset a custom holiday year back to defaults, use POST /holidays/years instead.
How to reset a year: To delete a custom holiday year and return to default holidays:
- Call
POST /holidays/yearswith the sameyearandcountryvalues - This will delete the existing custom year and recreate it with default holidays
- All custom holidays for that year will be removed
Why this approach? The holiday service uses a “recreate” pattern where creating a custom year automatically deletes any existing custom year for the same year/country combination. This ensures a clean reset to defaults while maintaining data consistency.
DELETE
/holidays/years/{yearId}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
yearIdstringrequiredResponses
200Holiday year deleted successfully
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X DELETE "https://leadtime.app/api/public/holidays/years/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/holidays/years/string", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.delete(
"https://leadtime.app/api/public/holidays/years/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
Holiday year deleted successfully
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions