Update Availability

Bulk update availability schedules

PUT/calendar/availability
Requires Bearer authentication

Replace all availability schedules with a new set. This is useful for setting up weekly availability in one request.

Request Body

schedulesarrayrequired

Array of availability slots to set.

day_of_weekintegerrequired

Day of week (0=Sunday through 6=Saturday).

start_timestringrequired

Start time in HH:MM:SS format.

end_timestringrequired

End time in HH:MM:SS format.

appointment_type_idstring

Optional appointment type restriction.

PUT/calendar/availability
curl -X PUT "https://api.vastal.agency/v1/calendar/availability" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "schedules": [
    { "day_of_week": 1, "start_time": "09:00:00", "end_time": "17:00:00" },
    { "day_of_week": 2, "start_time": "09:00:00", "end_time": "17:00:00" },
    { "day_of_week": 3, "start_time": "09:00:00", "end_time": "17:00:00" },
    { "day_of_week": 4, "start_time": "09:00:00", "end_time": "17:00:00" },
    { "day_of_week": 5, "start_time": "09:00:00", "end_time": "12:00:00" }
  ]
}'
200Success
{
"schedules": [
  {
    "id": "avail_1",
    "day_of_week": 1,
    "start_time": "09:00:00",
    "end_time": "17:00:00",
    "is_active": true
  },
  {
    "id": "avail_2",
    "day_of_week": 2,
    "start_time": "09:00:00",
    "end_time": "17:00:00",
    "is_active": true
  },
  {
    "id": "avail_3",
    "day_of_week": 3,
    "start_time": "09:00:00",
    "end_time": "17:00:00",
    "is_active": true
  },
  {
    "id": "avail_4",
    "day_of_week": 4,
    "start_time": "09:00:00",
    "end_time": "17:00:00",
    "is_active": true
  },
  {
    "id": "avail_5",
    "day_of_week": 5,
    "start_time": "09:00:00",
    "end_time": "12:00:00",
    "is_active": true
  }
]
}