Bookings
Court booking on behalf of a player: create, reschedule, cancel, waitlist, split payment, rentals, promo codes. Access: a player token.
Base URL: https://your-server/api · Guide for this section: Clubs, courts, slots and bookings
Contents · 16 methods
Create a booking #
POST /v1/bookings
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
Books a court for a slot on behalf of the player, paid from the player's wallet. The court may be given in court_id, otherwise any free one is taken. Checked in order: the club rules for this player (booking depth, daily and active limits), availability, the price with customer category and promo code, the balance. Two players booking the same court at once — the second gets 409 slot_taken.
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Request body application/json Field Type Required Description club_idstring yes Club daystring yes Date YYYY-MM-DD timestring yes Slot start HH:MM — from GET /v1/clubs/{club_id}/slots court_idstring, or null no Court from GET /v1/clubs/{club_id}/courts; omitted — any free court promo_codestring, or null no Club promo code
Example request Copy curl -X POST "https://your-server/api/v1/bookings" \
-H "Authorization: Bearer <player token>" \
-H "Content-Type: application/json" \
-d '{"club_id": "c1", "day": "2026-10-03", "time": "18:00"}'
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 club_not_foundClub not found 400 bad_day_or_timeInvalid date or time (YYYY-MM-DD and HH:MM) 400 bad_slot_timeTime does not match a club slot start 400 slot_in_pastThe slot is in the past 409 too_far_aheadBeyond the club booking depth; depth_days is returned 409 day_limitDaily booking limit reached; limit is returned 409 active_limitActive booking limit reached; limit is returned 409 slot_takenNo free court for this slot 402 insufficient_fundsNot enough money in the wallet; balance and price are returned 4xx <reason> The code does not apply — the reason is in detail 422 […] Parameter or body validation error: detail is a list of errors
Example response Copy {
"id": "b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40",
"clubId": "c1",
"club": "Flame Padel",
"court": "Court 4",
"day": "2026-10-03",
"time": "18:00",
"durationMin": 90,
"price": 3500,
"status": "confirmed"
}
My bookings #
GET /v1/bookings/my
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
The player's last 50 bookings, newest first, with split payment shares.
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Example request Copy curl -X GET "https://your-server/api/v1/bookings/my" \
-H "Authorization: Bearer <player token>"
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
Example response Copy {
"items": [
{
"id": "b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40",
"clubId": "c1",
"club": "Flame Padel",
"court": "Court 4",
"day": "2026-10-03",
"time": "18:00",
"durationMin": 90,
"price": 3500,
"status": "confirmed",
"splits": [{"name": "Anna S.", "amount": 875, "status": "pending"}]
}
]
}
Cancel a booking #
POST /v1/bookings/{booking_id}/cancel
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
Cancels your booking. If the time to start is at least the club free-cancellation window (customer category included), the price is refunded to the wallet, otherwise refund=0. The freed slot is offered to the first player on the waitlist.
Path parameters Name Type Required Description booking_idstring (uuid) yes Booking id
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Example request Copy curl -X POST "https://your-server/api/v1/bookings/b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40/cancel" \
-H "Authorization: Bearer <player token>"
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 booking_not_foundBooking not found or not yours 400 already_cancelledThe booking is already cancelled 422 […] Parameter or body validation error: detail is a list of errors
Example response Copy {"ok": true, "refund": 3500}
Reschedule a booking #
POST /v1/bookings/{booking_id}/reschedule
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
Moves your booking to another slot in the same club. The price difference is charged to or refunded to the wallet.
Path parameters Name Type Required Description booking_idstring (uuid) yes Booking id
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Request body application/json Field Type Required Description daystring yes New date YYYY-MM-DD timestring yes New slot start HH:MM
Example request Copy curl -X POST "https://your-server/api/v1/bookings/b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40/reschedule" \
-H "Authorization: Bearer <player token>" \
-H "Content-Type: application/json" \
-d '{"day": "2026-10-04", "time": "19:30"}'
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 booking_not_foundBooking not found or not yours 400 <status> Booking or share is not in the required status — detail holds the current status 400 bad_day_or_timeInvalid date or time (YYYY-MM-DD and HH:MM) 400 bad_slot_timeTime does not match a club slot start 400 slot_in_pastThe slot is in the past 409 slot_takenNo free court for this slot 402 insufficient_fundsNot enough money in the wallet; balance and price are returned 422 […] Parameter or body validation error: detail is a list of errors
Example response Copy {
"id": "b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40",
"clubId": "c1",
"club": "Flame Padel",
"court": "Court 4",
"day": "2026-10-04",
"time": "19:30",
"durationMin": 90,
"price": 3500,
"status": "confirmed"
}
My booking rules in a club #
GET /v1/bookings/rules
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
The club booking rules for this player, customer category included: booking depth in days, free-cancellation window in hours, daily and active booking limits.
Query parameters Name Type Required Description club_idstring yes Club id
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Example request Copy curl -X GET "https://your-server/api/v1/bookings/rules?club_id=c1" \
-H "Authorization: Bearer <player token>"
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 club_not_foundClub not found 422 […] Parameter or body validation error: detail is a list of errors
Example response Copy {
"depthDays": 14,
"cancelFreeHours": 24,
"maxPerDay": 0,
"maxActive": 0,
"category": null,
"categoryId": null,
"overridden": []
}
Join the waitlist #
POST /v1/bookings/waitlist
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
Queue for a slot where all courts are taken. When a booking for it is cancelled, only the first in the queue is notified. Pressing twice does not create a second entry. The response holds the queue position.
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Request body application/json Field Type Required Description club_idstring yes Club daystring yes Date YYYY-MM-DD timestring yes Slot start HH:MM
Example request Copy curl -X POST "https://your-server/api/v1/bookings/waitlist" \
-H "Authorization: Bearer <player token>" \
-H "Content-Type: application/json" \
-d '{"club_id": "c1", "day": "2026-10-03", "time": "18:00"}'
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 club_not_foundClub not found 400 bad_day_or_timeInvalid date or time (YYYY-MM-DD and HH:MM) 400 bad_slot_timeTime does not match a club slot start 400 slot_in_pastThe slot is in the past 409 slot_freeThe slot is free — book it instead of queueing 422 […] Parameter or body validation error: detail is a list of errors
Example response Copy {"ok": true, "id": "5a3c7e19-2b8d-4f60-9e1a-c4d7b2f8e053", "position": 1}
My waitlist #
GET /v1/bookings/waitlist/my
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
The player's waitlist entries for today and later: waiting or notified.
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Example request Copy curl -X GET "https://your-server/api/v1/bookings/waitlist/my" \
-H "Authorization: Bearer <player token>"
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
Example response Copy {
"items": [
{
"id": "5a3c7e19-2b8d-4f60-9e1a-c4d7b2f8e053",
"clubId": "c1",
"club": "Flame Padel",
"day": "2026-10-03",
"time": "18:00",
"status": "waiting"
}
]
}
Leave the waitlist #
POST /v1/bookings/waitlist/{wait_id}/cancel
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
Cancels your waitlist entry.
Path parameters Name Type Required Description wait_idstring (uuid) yes Waitlist entry id
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Example request Copy curl -X POST "https://your-server/api/v1/bookings/waitlist/5a3c7e19-2b8d-4f60-9e1a-c4d7b2f8e053/cancel" \
-H "Authorization: Bearer <player token>"
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 waitlist_not_foundWaitlist entry not found 422 […] Parameter or body validation error: detail is a list of errors
Example response
Split the booking payment #
POST /v1/bookings/{booking_id}/split
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
The booker splits the price with one to three players: each gets a request for a share equal to the price divided by the number of participants including the booker (rounded down). A repeat request to the same player — 409.
Path parameters Name Type Required Description booking_idstring (uuid) yes Booking id
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Request body application/json Field Type Required Description user_idsarray [string (uuid)] yes Who to split with: 1–3 players (e.g. from GET /v1/players/recent)items from 1; items up to 3
Example request Copy curl -X POST "https://your-server/api/v1/bookings/b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40/split" \
-H "Authorization: Bearer <player token>" \
-H "Content-Type: application/json" \
-d '{"user_ids": ["a52e7c14-90bd-4e3f-8c61-7d2f0b9e4a15"]}'
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 booking_not_foundBooking not found or not yours 400 <status> Booking or share is not in the required status — detail holds the current status 404 player_not_found: …Player not found (the id or phone follows in the text) 409 split_already_sentA split request has already been sent to this player 422 […] Parameter or body validation error: detail is a list of errors
Example response Copy {"ok": true, "share": 875, "requests": 3}
My pending shares #
GET /v1/bookings/splits/my
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
Unpaid share requests addressed to the player.
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Example request Copy curl -X GET "https://your-server/api/v1/bookings/splits/my" \
-H "Authorization: Bearer <player token>"
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
Example response Copy {
"items": [
{
"id": "9b1e4d72-3c6a-4f85-a0d2-7e3b9c1f5a64",
"club": "Flame Padel",
"day": "2026-10-03",
"time": "18:00",
"amount": 875
}
]
}
Pay my share #
POST /v1/bookings/splits/{split_id}/accept
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
The player pays the share from the wallet — the money goes to the booker.
Path parameters Name Type Required Description split_idstring (uuid) yes Share request id
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Example request Copy curl -X POST "https://your-server/api/v1/bookings/splits/9b1e4d72-3c6a-4f85-a0d2-7e3b9c1f5a64/accept" \
-H "Authorization: Bearer <player token>"
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 split_not_foundSplit request not found 400 <status> Booking or share is not in the required status — detail holds the current status 402 insufficient_fundsNot enough money in the wallet; balance and price are returned 422 […] Parameter or body validation error: detail is a list of errors
Example response
Rental items in a club #
GET /v1/bookings/rental
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
Club rental items: price per hand-out and how many units are free right now.
Query parameters Name Type Required Description club_idstring yes Club id
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Example request Copy curl -X GET "https://your-server/api/v1/bookings/rental?club_id=c1" \
-H "Authorization: Bearer <player token>"
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 422 […] Parameter or body validation error: detail is a list of errors
Example response Copy {
"items": [
{
"id": "c9d4e2a7-1f83-4a6b-b0c5-3e7d9a1f2b58",
"name": "Racket",
"price": 500,
"available": 6
}
]
}
Add rental to my booking #
POST /v1/bookings/{booking_id}/rental
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
Adds rental items (1–4 units) to your active booking while the game is not over. The cost is charged to the wallet.
Path parameters Name Type Required Description booking_idstring (uuid) yes Booking id
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Request body application/json Field Type Required Description item_idstring (uuid) yes Rental item from GET /v1/bookings/rental qtyinteger no Quantity, 1–4min 1; max 4; default 1
Example request Copy curl -X POST "https://your-server/api/v1/bookings/b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40/rental" \
-H "Authorization: Bearer <player token>" \
-H "Content-Type: application/json" \
-d '{"item_id": "c9d4e2a7-1f83-4a6b-b0c5-3e7d9a1f2b58", "qty": 2}'
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 booking_not_foundBooking not found or not yours 409 booking_not_activeThe booking is not active 409 booking_finishedThe booked game is already over 404 item_not_foundRental item not found 409 not_enoughNot enough items available; available is returned 402 insufficient_fundsNot enough money in the wallet; balance and price are returned 422 […] Parameter or body validation error: detail is a list of errors
Example response Copy {
"ok": true,
"id": "4e8a2c61-7d9b-4f03-b5e1-2a6c8d0f4b97",
"charged": 1000,
"available": 4
}
Rental on a booking #
GET /v1/bookings/{booking_id}/rental
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
What has been taken for this booking and whether it was returned.
Path parameters Name Type Required Description booking_idstring (uuid) yes Booking id
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Example request Copy curl -X GET "https://your-server/api/v1/bookings/b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40/rental" \
-H "Authorization: Bearer <player token>"
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 booking_not_foundBooking not found or not yours 422 […] Parameter or body validation error: detail is a list of errors
Example response Copy {
"items": [
{
"id": "4e8a2c61-7d9b-4f03-b5e1-2a6c8d0f4b97",
"name": "Racket",
"qty": 2,
"price": 1000,
"returned": false
}
]
}
Rental QR for a booking #
GET /v1/bookings/{booking_id}/rental-pass
Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.
Booking QR for the rental desk. Shown even with nothing ordered: the desk can hand out items on the spot with it.
Path parameters Name Type Required Description booking_idstring (uuid) yes Booking id
Headers Name Type Required Description Authorizationstring yes Bearer <player token>
Example request Copy curl -X GET "https://your-server/api/v1/bookings/b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40/rental-pass" \
-H "Authorization: Bearer <player token>"
Responses Code detail Meaning 200 — Success; example below 401 no_tokenNo token in the Authorization header 401 invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh 404 booking_not_foundBooking not found or not yours 409 booking_not_activeThe booking is not active 422 […] Parameter or body validation error: detail is a list of errors
Example response Copy {"qr": "<QR code>", "items": [], "status": "empty", "waiting": 0}