AI PadelAPI documentation Back to site

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

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

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Request body application/json

FieldTypeRequiredDescription
club_idstringyesClub
daystringyesDate YYYY-MM-DD
timestringyesSlot start HH:MM — from GET /v1/clubs/{club_id}/slots
court_idstring, or nullnoCourt from GET /v1/clubs/{club_id}/courts; omitted — any free court
promo_codestring, or nullnoClub promo code

Example request

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

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404club_not_foundClub not found
400bad_day_or_timeInvalid date or time (YYYY-MM-DD and HH:MM)
400bad_slot_timeTime does not match a club slot start
400slot_in_pastThe slot is in the past
409too_far_aheadBeyond the club booking depth; depth_days is returned
409day_limitDaily booking limit reached; limit is returned
409active_limitActive booking limit reached; limit is returned
409slot_takenNo free court for this slot
402insufficient_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

{
  "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

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/bookings/my" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh

Example response

{
  "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

NameTypeRequiredDescription
booking_idstring (uuid)yesBooking id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X POST "https://your-server/api/v1/bookings/b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40/cancel" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404booking_not_foundBooking not found or not yours
400already_cancelledThe booking is already cancelled
422[…]Parameter or body validation error: detail is a list of errors

Example response

{"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

NameTypeRequiredDescription
booking_idstring (uuid)yesBooking id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Request body application/json

FieldTypeRequiredDescription
daystringyesNew date YYYY-MM-DD
timestringyesNew slot start HH:MM

Example request

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

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404booking_not_foundBooking not found or not yours
400<status>Booking or share is not in the required status — detail holds the current status
400bad_day_or_timeInvalid date or time (YYYY-MM-DD and HH:MM)
400bad_slot_timeTime does not match a club slot start
400slot_in_pastThe slot is in the past
409slot_takenNo free court for this slot
402insufficient_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

{
  "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

NameTypeRequiredDescription
club_idstringyesClub id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/bookings/rules?club_id=c1" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404club_not_foundClub not found
422[…]Parameter or body validation error: detail is a list of errors

Example response

{
  "depthDays": 14,
  "cancelFreeHours": 24,
  "maxPerDay": 0,
  "maxActive": 0,
  "category": null,
  "categoryId": null,
  "overridden": []
}

Check a promo code #

GET/v1/promo/check

Access: Player token Header Authorization: Bearer <player token> — issued by SMS sign-in.

What a promo code gives for a slot: price, discount, total. Books nothing. If the code does not apply — a 4xx response with the reason in detail.

Query parameters

NameTypeRequiredDescription
club_idstringyesClub id
codestringyesPromo code
daystring (date)yesDate YYYY-MM-DD
atstringyesSlot start time HH:MM

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/promo/check?club_id=c1&code=AUTUMN10&day=2026-10-03&at=18:00" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404club_not_foundClub not found
400bad_timeInvalid time (HH:MM)
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

{"code": "AUTUMN10", "price": 3500, "discount": 350, "total": 3150, "note": ""}

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

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Request body application/json

FieldTypeRequiredDescription
club_idstringyesClub
daystringyesDate YYYY-MM-DD
timestringyesSlot start HH:MM

Example request

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

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404club_not_foundClub not found
400bad_day_or_timeInvalid date or time (YYYY-MM-DD and HH:MM)
400bad_slot_timeTime does not match a club slot start
400slot_in_pastThe slot is in the past
409slot_freeThe slot is free — book it instead of queueing
422[…]Parameter or body validation error: detail is a list of errors

Example response

{"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

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/bookings/waitlist/my" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh

Example response

{
  "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

NameTypeRequiredDescription
wait_idstring (uuid)yesWaitlist entry id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X POST "https://your-server/api/v1/bookings/waitlist/5a3c7e19-2b8d-4f60-9e1a-c4d7b2f8e053/cancel" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404waitlist_not_foundWaitlist entry not found
422[…]Parameter or body validation error: detail is a list of errors

Example response

{"ok": true}

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

NameTypeRequiredDescription
booking_idstring (uuid)yesBooking id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Request body application/json

FieldTypeRequiredDescription
user_idsarray [string (uuid)]yesWho to split with: 1–3 players (e.g. from GET /v1/players/recent)
items from 1; items up to 3

Example request

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

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404booking_not_foundBooking not found or not yours
400<status>Booking or share is not in the required status — detail holds the current status
404player_not_found: …Player not found (the id or phone follows in the text)
409split_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

{"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

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/bookings/splits/my" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh

Example response

{
  "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

NameTypeRequiredDescription
split_idstring (uuid)yesShare request id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X POST "https://your-server/api/v1/bookings/splits/9b1e4d72-3c6a-4f85-a0d2-7e3b9c1f5a64/accept" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404split_not_foundSplit request not found
400<status>Booking or share is not in the required status — detail holds the current status
402insufficient_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

{"ok": true}

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

NameTypeRequiredDescription
club_idstringyesClub id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/bookings/rental?club_id=c1" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
422[…]Parameter or body validation error: detail is a list of errors

Example response

{
  "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

NameTypeRequiredDescription
booking_idstring (uuid)yesBooking id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Request body application/json

FieldTypeRequiredDescription
item_idstring (uuid)yesRental item from GET /v1/bookings/rental
qtyintegernoQuantity, 1–4
min 1; max 4; default 1

Example request

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

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404booking_not_foundBooking not found or not yours
409booking_not_activeThe booking is not active
409booking_finishedThe booked game is already over
404item_not_foundRental item not found
409not_enoughNot enough items available; available is returned
402insufficient_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

{
  "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

NameTypeRequiredDescription
booking_idstring (uuid)yesBooking id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/bookings/b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40/rental" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404booking_not_foundBooking not found or not yours
422[…]Parameter or body validation error: detail is a list of errors

Example response

{
  "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

NameTypeRequiredDescription
booking_idstring (uuid)yesBooking id

Headers

NameTypeRequiredDescription
AuthorizationstringyesBearer <player token>

Example request

curl -X GET "https://your-server/api/v1/bookings/b71c2e94-0a3f-4d58-8e26-9f1d3c5a7b40/rental-pass" \
  -H "Authorization: Bearer <player token>"

Responses

CodedetailMeaning
200—Success; example below
401no_tokenNo token in the Authorization header
401invalid_tokenToken expired or invalid — refresh it via /v1/auth/refresh
404booking_not_foundBooking not found or not yours
409booking_not_activeThe booking is not active
422[…]Parameter or body validation error: detail is a list of errors

Example response

{"qr": "<QR code>", "items": [], "status": "empty", "waiting": 0}