Get Holidays in Range (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/holidays/range
Description
Retrieve all holidays within a specific date range for a workspace.
Authentication
Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace permissions.
Headers
Authorization: Bearer <workspace_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
startDate | string | Yes | Start date (ISO 8601 datetime format) |
endDate | string | Yes | End date (ISO 8601 datetime format) |
Response 200 OK
{
"holidays": [
{
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"name": "New Year's Day",
"date": "2025-01-01T00:00:00.000Z",
"isRecurring": false,
"recurrenceRule": null,
"createdAt": "2024-12-01T10:00:00.000Z",
"updatedAt": "2024-12-01T10:00:00.000Z"
}
]
}
Response Fields
holidays
Array of holiday objects within the specified date range. See List Holidays for field descriptions.
Common Errors
400 Bad Request: Invalid date format or missing required query parameters
401 Unauthorized: Missing or invalid authentication token
403 Forbidden: User does not have permission to view holidays
404 Not Found: Workspace not found
500 Internal Server Error: Server error occurred while processing the request
Notes
- Date range is inclusive (holidays on startDate and endDate are included)
- Recurring holidays are expanded to show all occurrences within the range
- Dates are compared in UTC timezone