Chatilo
USDPrices shown in US dollars Sign in Start free trial
Guide

Take a booking

Customers can already book on WhatsApp, and the team books by hand in the calendar. This guide adds a third door: your own website, app or front-desk system. All three share one calendar, so a time can never be given away twice.

The flow #

Show the services, show the free times for the day the customer picks, book the one they choose. Opening hours, days off, how long each service takes, gaps between appointments and how many can run at once are all set in the app under Bookings → Settings; the API follows them.

  1. List what can be booked #

    List services
    curl "https://chatilo.me/api/v1/bookings/services" \
      -H "Authorization: Bearer YOUR_API_KEY"
    Response
    {
        "ok": true,
        "services": [
            {
                "id": 3,
                "name": "Bridal consultation",
                "duration_minutes": 45,
                "price": 50000,
                "currency": "INR",
                "description": "Fabric, fitting and delivery dates.",
                "active": true
            }
        ]
    }

    price is in the currency’s smallest unit: 50000 is ₹500. If the business lets customers choose who they see, list the staff as well.

  2. Show the free times for a day #

    Ask for one day at a time. The day is a calendar day on the business’s own clock, whatever timezone your server is in.

    Free times on 8 December
    curl "https://chatilo.me/api/v1/bookings/slots?service_id=3&date=2026-12-08" \
      -H "Authorization: Bearer YOUR_API_KEY"
    Response
    {
        "ok": true,
        "date": "2026-12-08",
        "timezone": "Asia/Kolkata",
        "service_id": 3,
        "duration_minutes": 45,
        "slots": [
            {
                "start": "2026-12-08T05:00:00Z",
                "local_start": "2026-12-08T10:30",
                "staff_ids": [
                    2,
                    3
                ]
            },
            {
                "start": "2026-12-08T05:30:00Z",
                "local_start": "2026-12-08T11:00",
                "staff_ids": [
                    3
                ]
            }
        ]
    }

    Show local_start to the customer; keep start to send back. An empty list means nothing is free that day: closed, full, too soon, or further ahead than bookings are open. Add staff_id to see only one person’s free times.

  3. Book the time they chose #

    Send the service, the start exactly as you received it, and who it is for. With a phone number the customer becomes a contact (or is matched to the one you already have), and "notify": true sends them the business’s confirmation on WhatsApp when that is allowed.

    Create a booking
    curl -X POST "https://chatilo.me/api/v1/bookings" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Idempotency-Key: web-booking-8f31c2" \
      -H "Content-Type: application/json" \
      -d '{
        "service_id": 3,
        "start": "2026-12-08T05:00:00Z",
        "customer": {
            "phone": "+919876543210",
            "name": "Grace Miller"
        },
        "notes": "Booked on the website",
        "notify": true
    }'
    Response · HTTP 201 (shortened)
    {
        "ok": true,
        "booking": {
            "id": 7001,
            "ref": "BK-7Q2M",
            "status": "confirmed",
            "service": "Bridal consultation",
            "staff": "Anu",
            "starts_at": "2026-12-08T05:00:00Z",
            "local_start": "2026-12-08T10:30",
            "timezone": "Asia/Kolkata",
            "…": "…"
        },
        "contact": {
            "id": 1001,
            "name": "Grace Miller",
            "…": "…"
        },
        "notified": true,
        "notify_reason": null
    }

    Show the customer the ref. They can quote it to the business, and you can use it in place of the id in later requests.

  4. Handle “someone got there first” #

    Between showing the times and the customer choosing, someone else may have booked the same one. The time is checked again at the moment of booking, and of two requests for the last place exactly one succeeds. The other gets:

    Error · HTTP 409
    {
        "ok": false,
        "error": {
            "code": "slot_unavailable",
            "message": "That time isn’t free. Ask GET /bookings/slots for the times that are."
        }
    }

    When you see slot_unavailable, fetch the free times again and ask the customer to pick another. Don’t retry the same time.

About telling the customer #

WhatsApp only lets a business send free text within 24 hours of the customer’s last message. So with "notify": true the confirmation goes out if the customer has written recently, and otherwise nothing is sent and the response says so:

When no message could be sent
{
    "notified": false,
    "notify_reason": "The customer hasn’t written in the last 24 hours, so WhatsApp only allows an approved template."
}

In that case, confirm on your own page or by email, or send an approved template. Reminders before the appointment are planned automatically for every booking, however it was made, using the settings in the app.

Move or cancel a booking #

To move a booking, get the free times for the new day and send the one chosen. The same checks apply. The booking keeps its reference.

Reschedule
curl -X POST "https://chatilo.me/api/v1/bookings/BK-7Q2M/reschedule" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "start": "2026-12-09T05:30:00Z",
    "notify": true
}'

Cancelling frees the time at once for someone else:

Cancel
curl -X POST "https://chatilo.me/api/v1/bookings/BK-7Q2M/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Customer asked to cancel",
    "notify": true
}'

Customer rules and staff rules #

By default the API books like a customer does: not sooner than the business’s minimum notice, and not further ahead than its booking horizon. A front-desk system used by the business’s own staff can add "rules": "staff" (or ?rules=staff when asking for free times) to skip those two limits, as the team’s own calendar does. Opening hours, days off and capacity always apply.

Hear about bookings made elsewhere #

Bookings made on WhatsApp or by the team should reach your system too. Subscribe to booking.created, booking.rescheduled and booking.cancelled (see webhooks), or list a day’s bookings:

One day’s upcoming bookings
curl "https://chatilo.me/api/v1/bookings?status=confirmed&from=2026-12-08T00:00:00%2B05:30&to=2026-12-09T00:00:00%2B05:30" \
  -H "Authorization: Bearer YOUR_API_KEY"

In a query string, write the + of a timezone offset as %2B, or use a UTC time ending in Z.

Cookies on this site

We use the cookies needed to run the site and keep you signed in. With your OK we also remember choices you make here, such as the currency for prices. We don’t use advertising or tracking cookies. Cookie policy