Saltar al contenido principal

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

HeaderRequiredDescription
Content-TypeYesMust be application/json
AuthorizationYesFormat: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature

📝 Request Parameters

Path Parameters (Get Single Schedule)

ParameterTypeRequiredDescriptionExample
idstring (UUID)YesUnique identifier of the schedule"f57b71ad-c1cc-4af6-853b-616ecb7d234c"

Query Parameters (List Schedules)

ParameterTypeRequiredDescriptionDefault
pagenumberNoPage number for pagination1
limitnumberNoItems per page20
calendarIdstringNoFilter by calendar ID-
searchstringNoSearch in schedule names-
expandstring or arrayNoExpand 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

  1. Calendar Filtering

    • Use calendarId to find all schedules for a calendar
    • Combine with search for targeted results
    • Useful for calendar management
  2. Name Search

    • Case-insensitive search in schedule names
    • Partial matching supported
    • Useful for finding specific schedules
  3. Performance

    • Use appropriate page sizes (10-50 items)
    • Include specific filters when possible
    • Cache frequently accessed schedules