Bookings
All booking calls need the player's token.
POST /bookings
{
"facility_type_id": 1,
"start": "2026-11-22 21:00",
"duration": 90,
"court_id": 1,
"players": 4,
"note": "Left-handed, need a racket",
"client_uuid": "7f3c2a8e-1b4d-4c55-9a21-0d3e6f9b8c11"
}
| Field | Required | Meaning |
|---|---|---|
facility_type_id | yes | From /config |
start | yes | A slot start from /availability, venue local time |
duration | yes | Minutes, one of the type's durations |
court_id | no | A court from the slot's courts. Leave it out to let Odoo give the first free court. |
players | no | Number of players |
note | no | Note for the venue (up to 500 characters) |
client_uuid | recommended | A new random UUID for each booking the player confirms; see below |
The answer is 201 with the booking:
{
"data": {
"id": 78,
"uuid": "179368b8-ebf8-4605-ac03-529f165cec22",
"reference": "BK/2026/00078",
"facility_type": {
"id": 1,
"name": "Padel"
},
"court": {
"id": 1,
"name": "Court 1"
},
"start": "2026-11-22 21:00",
"stop": "2026-11-22 22:30",
"date_label": "Sunday 22 November 2026",
"time_label": "21:00-22:30",
"duration": 90,
"players": 4,
"note": "Left-handed, need a racket",
"state": "hold",
"state_label": "On Hold",
"currency": "USD",
"amount": 82.5,
"amount_label": "$ 82.50",
"paid_amount": 0.0,
"paid_amount_label": "",
"amount_due": 82.5,
"amount_due_label": "$ 82.50",
"payment_status": "unpaid",
"online_payment": "deposit",
"amount_due_online": 20.63,
"amount_due_online_label": "$ 20.63",
"hold_expires_at": "2026-11-19 07:21:48",
"can_cancel": true,
"cancel_blocked_reason": "",
"channel": "app",
"past": false,
"payment": {
"required_online": true,
"amount": 20.63,
"pay_url": "https://booking.example.com/book/pay/78?access_token=5c1f0e9a-3b7d-4e62-a8f4-2d91c6b07e35"
}
}
}
What happens next depends on the facility type's payment rule:
- Pay at the venue (
online_payment: "venue"): the booking isconfirmedat once and the player gets a confirmation email.payment.required_onlineisfalse. - Deposit or full payment online: the booking is
holdand the court is kept for the player untilhold_expires_at(UTC, 15 minutes by default). Openpayment.pay_urlto pay; see Online payment. An unpaid hold expires by itself and frees the court.
Double taps and retries: client_uuid
Mobile networks drop answers. When the app retries a booking whose first request did reach Odoo, a second booking must not be made. Create a UUID when the player taps Book, and send the same UUID with every retry of that request. Odoo answers a repeated client_uuid with the booking it already made instead of booking again. Create a new UUID for the next booking.
Limits
- A player can hold a limited number of upcoming bookings at a time (3 by default, set per facility type). Past that, the booking is refused with a message to show.
startmust be a free slot for the wholeduration, inside opening hours and the booking window.
When a court was just taken
Between loading availability and tapping Book, someone else may book the same court. The answer is 422:
{
"error": {
"code": "rejected",
"message": "This slot can't be booked: this court was just booked by someone else. Please pick another time or court."
}
}
Show the message, then load /availability again. When court_id was left out, Odoo already tried every court of the type, so a refusal means the whole time is gone.
GET /bookings
The player's bookings. scope=upcoming (the default) lists bookings that have not ended and are on hold, confirmed or checked in, soonest first. scope=past lists played, cancelled and no-show bookings, latest first. Up to 50 are returned.
GET /api/booking/v1/bookings?scope=upcoming
{
"data": [
{
"id": 78,
"uuid": "179368b8-ebf8-4605-ac03-529f165cec22",
"reference": "BK/2026/00078",
"facility_type": {
"id": 1,
"name": "Padel"
},
"court": {
"id": 1,
"name": "Court 1"
},
"start": "2026-11-22 21:00",
"stop": "2026-11-22 22:30",
"date_label": "Sunday 22 November 2026",
"time_label": "21:00-22:30",
"duration": 90,
"players": 4,
"note": "Left-handed, need a racket",
"state": "hold",
"state_label": "On Hold",
"currency": "USD",
"amount": 82.5,
"amount_label": "$ 82.50",
"paid_amount": 0.0,
"paid_amount_label": "",
"amount_due": 82.5,
"amount_due_label": "$ 82.50",
"payment_status": "unpaid",
"online_payment": "deposit",
"amount_due_online": 20.63,
"amount_due_online_label": "$ 20.63",
"hold_expires_at": "2026-11-19 07:21:48",
"can_cancel": true,
"cancel_blocked_reason": "",
"channel": "app",
"past": false,
"payment": {
"required_online": true,
"amount": 20.63,
"pay_url": "https://booking.example.com/book/pay/78?access_token=5c1f0e9a-3b7d-4e62-a8f4-2d91c6b07e35"
}
}
]
}
Bookings made at the counter or on the website for the same player appear here too, so the app shows everything the player has at the venue.
GET /bookings/{id}
One booking. A booking of another player answers 404, as if it did not exist.
POST /bookings/{id}/cancel
{"reason": "Rain plans changed"}
reason is optional. The answer is the cancelled booking:
{
"data": {
"id": 79,
"reference": "BK/2026/00079",
"facility_type": {
"id": 2,
"name": "Futsal 5-a-side"
},
"court": {
"id": 5,
"name": "Pitch 1"
},
"start": "2026-11-22 15:00",
"stop": "2026-11-22 16:00",
"state": "cancelled",
"state_label": "Cancelled",
"amount": 80.0,
"amount_label": "$ 80.00",
"can_cancel": false,
"cancel_blocked_reason": "This booking cannot be cancelled."
}
}
(Shortened: the answer is the full booking object.)
Use can_cancel and cancel_blocked_reason of the booking to show or hide the Cancel button and to explain why. A player can cancel in the app when:
- the booking is on hold or confirmed and has not started, and
- nothing has been paid on it (a booking with a payment is cancelled by the venue, which also handles the refund), and
- for a confirmed booking, the start is more than the type's
cancel_hoursaway.
Otherwise the answer is 422 with the reason, for example:
{
"error": {
"code": "rejected",
"message": "This booking cannot be cancelled."
}
}
The booking object
| Field | Meaning |
|---|---|
id | Use it in /bookings/{id} |
uuid | Odoo's unique id of the booking |
reference | Booking number to show and to quote at the counter (BK/2026/00078) |
facility_type, court | id and name |
start, stop | Venue local time, YYYY-MM-DD HH:MM |
date_label, time_label | Ready to show: "Sunday 22 November 2026", "21:00-22:30" |
duration, players, note | As booked |
state, state_label | See below |
amount, amount_label | Price of the booking, tax included |
paid_amount, paid_amount_label | Paid so far (online, at the POS or at the counter) |
amount_due, amount_due_label | Still to pay in total |
payment_status | unpaid, partial or paid |
online_payment | Payment rule when it was booked: venue, deposit or full |
amount_due_online, amount_due_online_label | Still to pay online now (0 when nothing is due online) |
hold_expires_at | UTC moment the hold ends, only while state is hold |
can_cancel, cancel_blocked_reason | Whether the player can cancel in the app, and why not |
channel | Where it was booked: app, website, pos, backend or external |
past | true once the booking has ended |
payment | required_online, amount and pay_url: see Online payment |
States
| State | Meaning for the player |
|---|---|
hold | Court kept while the player pays online. Shows a countdown to hold_expires_at. |
confirmed | Booked |
checked_in | The player arrived and was checked in at the counter |
done | Played |
cancelled | Cancelled by the player or the venue |
no_show | The player did not come |
expired | The hold ran out without payment. Not listed in /bookings; GET /bookings/{id} still shows it, and a payment link can take the court again if it is still free. |