Bookings
Create Booking
Create a new booking request
POST
/bookingsCreate a booking request for a boat. The booking starts in pending status and must be confirmed by the boat owner (unless instant booking is enabled).
This endpoint requires user authentication via Supabase Auth.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
boat_id | string | Yes | ID of the boat to book |
start_date | string | Yes | Start date (YYYY-MM-DD) |
end_date | string | Yes | End date (YYYY-MM-DD) |
start_time | string | Yes | Start time (HH:MM, 24-hour) |
end_time | string | Yes | End time (HH:MM, 24-hour) |
guests | integer | Yes | Number of guests |
message | string | No | Message to the boat owner |
Request
Response
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Created booking ID |
status | string | Initial status (pending or confirmed for instant book) |
total_price | number | Calculated total price |
Errors
| Status | Message |
|---|---|
400 | Boat is not available for the selected dates |
400 | Number of guests exceeds boat capacity |
400 | Booking duration is below minimum required hours |
401 | Authentication required |