Booking Slots Calculator API

Free appointment slots from working hours, busy events (JSON or ICS), duration, step, buffers, notice, capacity, time zones and public holidays.

GETPOSThttps://apibox.io.vn/v1/booking-slots

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.

Markdown · OpenAPI · Postman · llms.txt

Parameters

NameInTypeRequiredDefault
working_hoursbody|queryobjectnomon-fri 08:00-12:00,13:00-17:00Weekly hours: object by weekday (mon…sun, mon-fri, weekend, daily) or the text form.
durationbody|querynumberno30Service length in minutes (5–1440).
stepbody|querynumberno15Grid step between slot starts, minutes.
frombody|querystringnoFirst date (YYYY-MM-DD, default today); to or days (default 7, max 62).
timezonebody|querystringnoAsia/Ho_Chi_MinhProvider IANA time zone.
customer_timezonebody|querystringnoAdds customer_start / customer_end in this zone.
busybodyarraynoBusy intervals {start, end | duration, seats?}.
icsbodystringnoiCalendar text with busy events (or ics_url, ics_urls, an .ics file).
buffer_beforebody|querynumberno0Minutes kept free before each booking (buffer_after after).
min_noticebody|querynumberno0Minimum minutes between now and a slot.
capacitybody|querynumberno1Parallel seats (rooms, staff).
max_per_daybody|querynumbernoMaximum slots offered per day.
holidaysbody|querystringnononeVN, another country code, or none. open_dates reopens dates.
closed_datesbody|queryarraynoDates closed (YYYY-MM-DD).
date_overridesbodyobjectnoSpecial hours per date, e.g. {"2026-12-24":"08:00-12:00"}.
hold_startbody|querystringnoSlot start to hold: adds a tentative .ics (format=ics returns the file).

Example

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}'

Response

{
  "timezone": "Asia/Ho_Chi_Minh",
  "from": "2026-11-23",
  "to": "2026-11-24",
  "rules": {
    "duration_minutes": 60,
    "step_minutes": 30,
    "buffer_before_minutes": 0,
    "buffer_after_minutes": 15,
    "min_notice_minutes": 0,
    "capacity": 1,
    "max_per_day": 4,
    "holidays": "VN",
    "now": "2026-11-16T10:00:00+07:00"
  },
  "busy_intervals": 1,
  "total_slots": 4,
  "truncated": false,
  "first_available": {
    "date": "2026-11-23",
    "start": "2026-11-23T10:30:00+07:00",
    "end": "2026-11-23T11:30:00+07:00"
  },
  "days": [
    {
      "date": "2026-11-23",
      "weekday": "mon",
      "weekday_vi": "Thứ Hai",
      "open": true,
      "hours": [
        "08:00-12:00",
        "13:30-17:30"
      ],
      "slots_count": 4,
      "slots": [
        {
          "start": "2026-11-23T10:30:00+07:00",
          "end": "2026-11-23T11:30:00+07:00"
        },
        {
          "start": "2026-11-23T11:00:00+07:00",
          "end": "2026-11-23T12:00:00+07:00"
        },
        {
          "start": "2026-11-23T13:30:00+07:00",
          "end": "2026-11-23T14:30:00+07:00"
        },
        {
          "start": "2026-11-23T14:00:00+07:00",
          "end": "2026-11-23T15:00:00+07:00"
        }
      ]
    },
    {
      "date": "2026-11-24",
      "weekday": "tue",
      "weekday_vi": "Thứ Ba",
      "open": false,
      "reason": "holiday: Vietnamese Culture Day",
      "slots": []
    }
  ],
  "holidays_in_range": [
    {
      "date": "2026-11-24",
      "name": "Vietnamese Culture Day"
    }
  ]
}

Use cases

  • Offer free times in a Zalo or Messenger booking bot for a spa, clinic or salon
  • Show available appointment times on a landing page or WordPress site
  • Find free slots in a staff Google Calendar from an n8n or Make flow
  • Book rooms or chairs with several parallel seats

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.

Related APIs

Start with 1,000 free requests every month. Get free API key →