Weekly Availability Properties
This document defines the structure of the weekly availability entity, including all properties and their descriptions.
🔹 Core Properties
Property | Type | Required | Description | Example |
---|---|---|---|---|
id | string | Yes | Unique identifier for the schedule | "550e8400-e29b-41d4-a716-446655440000" |
name | string | Yes | Name of the schedule | "Regular Business Hours" |
calendarId | string | Yes | Associated calendar identifier | "123e4567-e89b-12d3-a456-426614174000" |
timezone | string | No | IANA timezone name | "Europe/Berlin" |
serviceIds | string[] | No | Associated service IDs | ["123e4567-...", "223e4567-..."] |
⚙️ Configuration Structure
The configuration
object contains the detailed schedule settings:
🕒 Working Hours
Property | Type | Required | Description |
---|---|---|---|
workingHours | object | Yes | Day-to-day schedule mapping |
{
"workingHours": {
"0": [["09:00", "17:00"]], // Monday
"2": [
// Wednesday
["09:00", "12:30"], // Morning shift
["13:30", "18:00"] // Afternoon shift
]
}
}
📅 Date Overrides
Property | Type | Required | Description |
---|---|---|---|
dateOverrides | object | No | Special schedules for specific dates |
{
"dateOverrides": {
"2025-12-25": [], // Christmas - Closed
"2025-07-04": [["10:00", "14:00"]] // Special holiday hours
}
}
🏖️ Out of Office Periods
Property | Type | Required | Description |
---|---|---|---|
outsOfTheOffice | string[][] | No | Array of date ranges for unavailability |
{
"outsOfTheOffice": [
["2025-08-01", "2025-08-15"], // Summer vacation
["2025-12-24", "2025-12-26"] // Christmas break
]
}
🧩 Complete Example
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "2024-05-09T21:27:28.565Z",
"updatedAt": "2024-09-03T07:31:40.626Z",
"name": "Standard Work Week",
"calendarId": "123e4567-e89b-12d3-a456-426614174000",
"configuration": {
"workingHours": {
"0": [["09:00", "17:00"]],
"1": [["09:00", "17:00"]],
"2": [
["09:00", "12:30"],
["13:30", "17:00"]
],
"3": [["09:00", "17:00"]],
"4": [["09:00", "16:00"]]
},
"dateOverrides": {
"2025-12-25": [],
"2025-12-31": [["09:00", "13:00"]]
},
"outsOfTheOffice": [["2025-07-15", "2025-07-30"]]
},
"serviceIds": [
"123e4567-e89b-12d3-a456-426614174000",
"223e4567-e89b-12d3-a456-426614174111"
]
}
📘 Important Notes
-
Day Numbering
- 0 = Monday
- 1 = Tuesday
- 2 = Wednesday
- 3 = Thursday
- 4 = Friday
- 5 = Saturday
- 6 = Sunday
-
Time Format
- All times are in 24-hour format ("HH:mm")
- Times are interpreted in the schedule's timezone
- Empty array
[]
indicates day off/closed
-
Date Format
- Dates in
dateOverrides
use "YYYY-MM-DD" format - Out of office dates are in UTC timezone
- Date ranges are inclusive of start and end dates
- Dates in
✅ Common Configurations
-
Regular Business Hours
- Monday to Friday, 9 AM to 5 PM
- Lunch break included or split shifts
- Weekend days omitted
-
Split Shifts
- Morning and afternoon sessions
- Multiple time ranges per day
- Custom break periods
-
Special Schedules
- Holiday hours
- Seasonal changes
- Event-specific times
🔍 Validation Rules
-
Time Slots
- Must be in "HH:mm" format
- End time must be after start time
- No overlapping time slots within a day
-
Date Overrides
- Must be valid dates
- Can be empty array for closed days
- Take precedence over regular working hours
-
Out of Office
- End date must be after start date
- Dates must be in chronological order
- Can overlap with regular working hours