Get Weekly Availability
This endpoint allows you to retrieve information about specific weekly availability schedules and list all schedules with optional filtering and pagination.
πΉ Endpoint Detailsβ
Get Single Scheduleβ
GET /api/v1/weekly-schedules/{id}
List Schedulesβ
GET /api/v1/weekly-schedules
π Authenticationβ
Header | Required | Description |
---|---|---|
Content-Type | Yes | Must be application/json |
Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
π Request Parametersβ
Path Parameters (Get Single Schedule)β
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
id | string (UUID) | Yes | Unique identifier of the schedule | "f57b71ad-c1cc-4af6-853b-616ecb7d234c" |
Query Parameters (List Schedules)β
Parameter | Type | Required | Description | Default |
---|---|---|---|---|
page | number | No | Page number for pagination | 1 |
limit | number | No | Items per page | 20 |
calendarId | string | No | Filter by calendar ID | - |
search | string | No | Search in schedule names | - |
expand | string or array | No | Expand related resources | - |
π§© Request Examplesβ
Get Single Scheduleβ
curl -X GET "https://openapi.onlive.site/api/v1/weekly-schedules/f57b71ad-c1cc-4af6-853b-616ecb7d234c" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"
List Schedules with Filteringβ
curl -X GET "https://openapi.onlive.site/api/v1/weekly-schedules?calendarId=4fb502ee-35cf-4e75-ad68-49b46b505a46&page=1&limit=10" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"
π€ Response Formatβ
Single Schedule Response (200 OK)β
{
"id": "f57b71ad-c1cc-4af6-853b-616ecb7d234c",
"createdAt": "2025-05-22T12:45:06.490Z",
"updatedAt": "2025-05-22T12:45:06.490Z",
"name": "Test Drive Availability",
"calendarId": "4fb502ee-35cf-4e75-ad68-49b46b505a46",
"configuration": {
"workingHours": {
"0": [
["09:00", "14:00"],
["16:00", "20:30"]
],
"1": [
["09:00", "14:00"],
["16:00", "20:30"]
],
"2": [
["09:00", "14:00"],
["16:00", "20:30"]
],
"3": [
["09:00", "14:00"],
["16:00", "20:30"]
],
"4": [
["09:00", "14:00"],
["16:00", "20:30"]
],
"5": [["10:00", "14:00"]],
"6": []
},
"dateOverrides": {
"2025-03-19": [["08:00", "12:00"]]
},
"outsOfTheOffice": [["2025-03-06T18:57", "2025-03-07T18:57"]]
},
"serviceIds": [
"1c79cfed-2076-438c-99f4-1c26da94ab0b",
"1c79cfed-2076-438c-99f4-1c26da94ab43"
]
}
List Response (200 OK)β
{
"items": [
{
// Schedule object as shown above
}
],
"total": 45,
"count": 45,
"currentPage": 1,
"totalPages": 1
}
β Error Responsesβ
401 Unauthorizedβ
{
"statusCode": 401,
"message": "Invalid or missing authorization credentials"
}
404 Not Foundβ
{
"statusCode": 404,
"message": "Schedule not found"
}
π Notesβ
- All timestamps are in ISO 8601 format with UTC timezone
- Working hours are in 24-hour format ("HH:mm")
- The list endpoint supports pagination
- Results are sorted by creation date (newest first)
- Only schedules in your organization are visible
- Time slots are returned in the schedule's timezone
β Common Use Casesβ
- π Schedule Lookup: Find specific schedule details
- π Calendar Management: List all schedules for a calendar
- π Search: Find schedules by name
- π± Pagination: Handle large numbers of schedules
π Search Tipsβ
-
Calendar Filtering
- Use
calendarId
to find all schedules for a calendar - Combine with search for targeted results
- Useful for calendar management
- Use
-
Name Search
- Case-insensitive search in schedule names
- Partial matching supported
- Useful for finding specific schedules
-
Performance
- Use appropriate page sizes (10-50 items)
- Include specific filters when possible
- Cache frequently accessed schedules