Schedules API
Schedules define availability windows for bookings.
List Schedules
GET
/api/v1/schedulesRetrieve a list of schedules
Query Parameters
| Parameter | Type | Description |
|---|---|---|
active | boolean | Filter by active status Default: true |
limit | number | Max results Default: 50 |
offset | number | Skip results Default: 0 |
Request
curl -X GET "https://api.webkasa.app/api/v1/schedules?active=true" \
-H "Authorization: Bearer wk_live_xxx..."Response
{
"data": [
{
"id": "sch_abc123",
"name": "Business Hours",
"description": "Mon-Fri 9am-5pm",
"timezone": "America/Los_Angeles",
"availability": {
"monday": { "start": "09:00", "end": "17:00" },
"tuesday": { "start": "09:00", "end": "17:00" },
"wednesday": { "start": "09:00", "end": "17:00" },
"thursday": { "start": "09:00", "end": "17:00" },
"friday": { "start": "09:00", "end": "17:00" }
},
"booking_limits": {
"max_per_day": 10,
"min_notice_hours": 24
},
"is_active": true,
"created_at": "2024-01-01T00:00:00Z"
}
],
"meta": {
"total": 3,
"limit": 50,
"offset": 0,
"hasMore": false
}
}Create Schedule
POST
/api/v1/schedulesCreate a new schedule
Request Body
| Parameter | Type | Description |
|---|---|---|
name required | string | Schedule name |
description | string | Schedule description |
timezone | string | Timezone for availability Default: UTC |
availability | object | Weekly availability windows |
booking_limits | object | Booking restrictions (max per day, min notice) |
is_active | boolean | Whether schedule is active Default: true |
Request
curl -X POST "https://api.webkasa.app/api/v1/schedules" \
-H "Authorization: Bearer wk_live_xxx..." \
-H "Content-Type: application/json" \
-d '{
"name": "Business Hours",
"description": "Mon-Fri 9am-5pm",
"timezone": "America/Los_Angeles",
"availability": {
"monday": { "start": "09:00", "end": "17:00" },
"tuesday": { "start": "09:00", "end": "17:00" },
"wednesday": { "start": "09:00", "end": "17:00" },
"thursday": { "start": "09:00", "end": "17:00" },
"friday": { "start": "09:00", "end": "17:00" }
},
"booking_limits": {
"max_per_day": 10,
"min_notice_hours": 24
},
"is_active": true
}'Response
{
"data": {
"id": "sch_abc123",
"name": "Business Hours",
"is_active": true,
"created_at": "2024-01-01T00:00:00Z"
}
}Availability Format
The availability object defines when bookings can be made. Each day can have a start and end time:
{
"availability": {
"monday": { "start": "09:00", "end": "17:00" },
"tuesday": { "start": "09:00", "end": "17:00" },
"wednesday": { "start": "09:00", "end": "12:00" },
"thursday": { "start": "09:00", "end": "17:00" },
"friday": { "start": "09:00", "end": "17:00" }
// saturday and sunday omitted = not available
}
}Days not included in the availability object are considered unavailable.
Booking Limits
Control how bookings are made with these optional limits:
{
"booking_limits": {
"max_per_day": 10, // Max bookings per day
"min_notice_hours": 24, // Minimum hours in advance
"max_advance_days": 60 // Maximum days in advance
}
}