Appointment Slot Calculator
Free appointment slots from working hours, busy events (JSON or ICS), duration, step, buffers, notice, capacity, time zones and public holidays.
Result
Press “Run” to see the result.
Give the working hours (working_hours: {"mon-fri":"08:00-12:00,13:30-17:30","sat":"08:00-12:00"} or the text "mon-fri 08:00-12:00,13:30-17:30; sat 08:00-12:00"), the service duration and the grid step in minutes, and the date range (from / to or days, up to 62 days). Busy time comes from busy (a list of {start, end} or {start, duration}, with an offset or in the provider zone, optional seats) and / or calendars: ics text, ics_url / ics_urls (Google, Outlook, Apple calendar links; recurring events are expanded) or an uploaded .ics file. Cancelled and "free" (transparent) events are ignored.
Rules: buffer_before / buffer_after around each booking, min_notice (minutes before the earliest slot), capacity (parallel seats: rooms, staff, chairs) with seats_left, max_per_day, closed_dates, special hours per date (date_overrides), and public holidays (holidays=VN uses the official Vietnamese days off; any other country code uses the holidays dataset; open_dates reopens a holiday). Times use the provider timezone (IANA, default Asia/Ho_Chi_Minh, daylight saving handled); customer_timezone adds the customer’s local times.
The answer lists the slots per day, the first available slot and the holidays in range. hold_start checks one slot and returns a tentative iCalendar event (format=ics returns the .ics file) to hold it while the customer confirms. Nothing is stored: keep bookings in your own calendar and send them as busy time.
Use this in your code
curl -X POST "https://apibox.io.vn/v1/booking-slots" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"timezone":"Asia/Ho_Chi_Minh","from":"2026-11-23","to":"2026-11-24","working_hours":"mon-fri 08:00-12:00,13:30-17:30; sat 08:00-12:00","duration":60,"step":30,"buffer_after":15,"holidays":"VN","busy":[{"start":"2026-11-23T09:00","end":"2026-11-23T10:30"}],"max_per_day":4}'const res = await fetch('https://apibox.io.vn/v1/booking-slots', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"timezone": "Asia/Ho_Chi_Minh",
"from": "2026-11-23",
"to": "2026-11-24",
"working_hours": "mon-fri 08:00-12:00,13:30-17:30; sat 08:00-12:00",
"duration": 60,
"step": 30,
"buffer_after": 15,
"holidays": "VN",
"busy": [
{
"start": "2026-11-23T09:00",
"end": "2026-11-23T10:30"
}
],
"max_per_day": 4
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/booking-slots",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"timezone": "Asia/Ho_Chi_Minh", "from": "2026-11-23", "to": "2026-11-24", "working_hours": "mon-fri 08:00-12:00,13:30-17:30; sat 08:00-12:00", "duration": 60, "step": 30, "buffer_after": 15, "holidays": "VN", "busy": [{"start": "2026-11-23T09:00", "end": "2026-11-23T10:30"}], "max_per_day": 4},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/booking-slots');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"timezone":"Asia/Ho_Chi_Minh","from":"2026-11-23","to":"2026-11-24","working_hours":"mon-fri 08:00-12:00,13:30-17:30; sat 08:00-12:00","duration":60,"step":30,"buffer_after":15,"holidays":"VN","busy":[{"start":"2026-11-23T09:00","end":"2026-11-23T10:30"}],"max_per_day":4}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
How do buffers work?
buffer_before and buffer_after are added around each candidate slot; the slot is offered only if the slot plus its buffers does not overlap busy time. The slot itself must fit inside the working hours.
Can it read my Google Calendar?
Yes, through the secret iCal address of the calendar (ics_url). The calendar is read for this request only and not stored.
Are Vietnamese holidays included?
With holidays=VN the official days off (Tết, Giỗ Tổ, 30/4–1/5, 2/9, 24/11) are closed on weekdays; open_dates reopens a date and date_overrides sets special hours.