Create Availability
Create a new availability for a calendar.
πΉ Endpointβ
POST /api/v2/availabilities
π Authenticationβ
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | Must be application/json |
| Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
π Body Fieldsβ
| Field | Type | Required | Description |
|---|---|---|---|
calendarId | string (UUID) | Yes | Calendar ID owning this availability |
serviceIds | string[] (UUID) | No | Services linked to this availability |
name | string | No | Availability name |
weeklySchedule | object | No | Map of 0..6 β array of {startTime, endTime} |
unavailableDates | array | No | Array of {startAt, endAt} ISO date-times |
overrides | object | No | Map of date (YYYY-MM-DD) β array of time intervals |
π§© Exampleβ
curl -X POST "https://openapi.onlive.site/api/v2/availabilities" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature" \
-d '{
"calendarId": "550e8400-e29b-41d4-a716-446655440000",
"serviceIds": [
"660e8400-e29b-41d4-a716-446655440000"
],
"name": "Main Office Hours",
"weeklySchedule": {
"1": [
{
"startTime": "09:00",
"endTime": "17:00"
}
],
"2": [
{
"startTime": "09:00",
"endTime": "17:00"
}
]
},
"unavailableDates": [
{
"startAt": "2025-12-31T00:00:00Z",
"endAt": "2025-12-31T23:59:59Z"
}
],
"overrides": {
"2025-12-25": [
{
"startTime": "10:00",
"endTime": "15:00"
}
]
}
}'
π€ Response (201 Created)β
Returns an Availability object. See Availability Properties.