If your business is a Sports & Facilities business, you book courts, fields, rooms and other facilities by the hour instead of booking appointments with staff. The API has its own addresses for these. They work only for Sports & Facilities businesses, and the appointment addresses (services, staff and availability) are for Services businesses.
A court or facility booking made in one go is one booking with one reference (like B2E250BB), even when it covers several courts or times. The booking has a line for each court and run of back-to-back times. You use the reference to read or cancel it.
Addresses
Address | What it does | Permission the key needs |
|---|---|---|
| Courts and facilities, with slot length and usual hourly price | Read courts and facilities |
| Every court's slots for a day, and which are free | Read courts and facilities |
| Court bookings | Read bookings |
| Make a court booking | Make, move and cancel bookings |
| Cancel a court booking | Make, move and cancel bookings |
You also need Read locations to list your locations, and Read customers and Add and change customers to find or add the customer you are booking for.
See which times are free
curl "https://app.bookingly.com/api/v1/facility-availability?locationId=63&date=2026-11-17" \
-H "Authorization: Bearer bkly_live_your_key_here"The answer is the same timetable your online booking page shows:
{
"locationId": 63,
"timezone": "Pacific/Auckland",
"date": "2026-11-17",
"isOpen": true,
"openFrom": "07:00",
"openTo": "22:00",
"unitMinutes": 60,
"membershipLevelName": null,
"facilities": [
{
"facilityId": 24,
"name": "Court 1",
"slotMinutes": 60,
"pricePerHour": 28.0,
"slots": [
{ "start": "07:00", "end": "08:00", "price": 28.0, "status": "available" },
{ "start": "08:00", "end": "09:00", "price": 28.0, "status": "booked" }
]
}
],
"blocks": []
}- Times are the wall-clock time at the location.
- A slot's
statusisavailable,booked,unavailable(in the past, or outside the times customers can book),blocked(you have blocked it off, andblocksgives the reason) orheld(a customer is part way through booking it). priceis what that slot costs, which can change through the day if you have peak and off-peak prices. It isnullwhen the court has no price.
Make a booking
Needs Make, move and cancel bookings.
curl -X POST https://app.bookingly.com/api/v1/facility-bookings \
-H "Authorization: Bearer bkly_live_your_key_here" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 0b9d1b5e-6e0a-4c21-8f55-6a6a2f5d9a10" \
-d '{
"customerId": 265,
"locationId": 63,
"date": "2026-11-17",
"items": [
{ "facilityId": 24, "startTime": "07:00", "slotCount": 2 }
],
"notes": "Club night"
}'dateis the day at the location, andstartTimeis the time of the first slot as a 24-hour time at the location.slotCountis how many back-to-back slots to book on that court. Two one-hour slots from07:00is07:00to09:00.itemscan list more than one court or time, but only when your business lets customers book several at once on its booking page. The same limit on how many applies.- The times must be ones
facility-availabilityshows asavailable. Anything else, including a court someone else just booked, is refused with a409. The booking page's own rules apply too: how soon before the start and how far ahead customers can book. - The price comes from your court prices. If the customer is a member, their member prices apply.
- The booking is made without online payment, as if a member of your team had entered it.
- The customer gets the usual confirmation email unless you add
"sendNotifications": false.
You get 201 Created and the booking:
{
"reference": "B2E250BB",
"status": "confirmed",
"locationId": 63,
"timezone": "Pacific/Auckland",
"startsAt": "2026-11-17T07:00:00",
"endsAt": "2026-11-17T09:00:00",
"startsAtUtc": "2026-11-16T18:00:00.000Z",
"endsAtUtc": "2026-11-16T20:00:00.000Z",
"price": 56.0,
"notes": "Club night",
"createdAt": "2026-11-13T04:39:36.427Z",
"customer": { "id": 265, "name": "Rawiri Edwards", "email": "rawiri.edwards@example.com" },
"lines": [
{
"id": 1761,
"facilityId": 24,
"facilityName": "Court 1",
"status": "confirmed",
"startsAt": "2026-11-17T07:00:00",
"endsAt": "2026-11-17T09:00:00",
"startsAtUtc": "2026-11-16T18:00:00.000Z",
"endsAtUtc": "2026-11-16T20:00:00.000Z",
"price": 56.0
}
]
}startsAt and endsAt for the whole booking run from its first line to its last. price is the total of the lines before any discount, or null if a court has no price.
Read bookings
curl "https://app.bookingly.com/api/v1/facility-bookings?from=2026-11-16&to=2026-11-22&status=confirmed" \
-H "Authorization: Bearer bkly_live_your_key_here"You can filter by locationId, facilityId, customerId and status (pending, confirmed, arrived, started, did-not-show, cancelled or completed). from and to are dates at each booking's location, and both days are included. A booking is listed if any of its lines matches. Paging works as described in Pagination, dates and times.
A booking's status is cancelled only when every line is. If someone cancelled just one court of a booking that has several, the booking shows the status of the lines that are left, and each line has its own status.
Cancel a booking
Needs Make, move and cancel bookings.
curl -X POST https://app.bookingly.com/api/v1/facility-bookings/B2E250BB/cancel \
-H "Authorization: Bearer bkly_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{}'This cancels every line that is still pending or confirmed, and frees the time. Things to know:
- A booking that has already started can't be cancelled through the API.
- A booking that was paid for online, or partly paid with a gift card, is refused with a
409, because the money has to be given back. Cancel those in Bookingly, where you choose the refund. - Cancelling a booking that is already cancelled succeeds and changes nothing.
- The customer is told unless you add
"sendNotifications": false.
Webhooks
Court bookings send their own events: facility_booking.created, facility_booking.updated and facility_booking.cancelled, with the booking above as the data. See Webhooks.