Skip to main content
GET
/
api
/
admin
/
bookings
Admin - Booking Management
curl --request GET \
  --url https://api.example.com/api/admin/bookings \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "<string>"
}
'
{
  "id": "<string>",
  "resourceId": "<string>",
  "playerId": "<string>",
  "bookingDate": "<string>",
  "startTime": {},
  "endTime": {},
  "pricePaid": 123,
  "currency": "<string>",
  "status": "<string>",
  "paymentStatus": "<string>",
  "cancelledAt": {},
  "cancelReason": "<string>",
  "createdAt": {},
  "updatedAt": {},
  "expiresAt": {},
  "resourceName": "<string>",
  "venueName": "<string>",
  "venueCity": "<string>"
}
All admin booking endpoints require ADMIN role. Unauthorized requests will return 403 Forbidden.

List All Bookings

Retrieve a paginated list of all bookings across the platform with full details.
curl -X GET 'https://api.sportshub.com/api/admin/bookings?page=0&size=20' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN'

Query Parameters

page
integer
default:"0"
Page number for pagination (0-indexed)
size
integer
default:"20"
Number of bookings per page

Response

id
UUID
Unique booking identifier
resourceId
UUID
ID of the booked resource (court, field, etc.)
playerId
UUID
ID of the user who made the booking
bookingDate
date
Date of the booking (YYYY-MM-DD)
startTime
time
Start time of the booking (HH:mm:ss)
endTime
time
End time of the booking (HH:mm:ss)
pricePaid
decimal
Amount paid for the booking
currency
string
Currency code (e.g., USD, EUR)
status
string
Booking status: PENDING, CONFIRMED, CANCELLED, COMPLETED, NO_SHOW
paymentStatus
string
Payment status: PENDING, PAID, REFUNDED, FAILED
cancelledAt
timestamp
Timestamp when booking was cancelled (null if not cancelled)
cancelReason
string
Reason for cancellation (null if not cancelled)
createdAt
timestamp
Booking creation timestamp
updatedAt
timestamp
Last update timestamp
expiresAt
timestamp
Expiration time for pending bookings
resourceName
string
Name of the booked resource
venueName
string
Name of the venue
venueCity
string
City where the venue is located

Example Response

[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "resourceId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "playerId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "bookingDate": "2026-03-15",
    "startTime": "14:00:00",
    "endTime": "15:30:00",
    "pricePaid": 45.00,
    "currency": "USD",
    "status": "CONFIRMED",
    "paymentStatus": "PAID",
    "cancelledAt": null,
    "cancelReason": null,
    "createdAt": "2026-03-08T10:30:00Z",
    "updatedAt": "2026-03-08T10:35:00Z",
    "expiresAt": null,
    "resourceName": "Court 1",
    "venueName": "Elite Padel Club",
    "venueCity": "Miami"
  }
]

Cancel Booking

Administratively cancel a booking with a specified reason.
curl -X PATCH 'https://api.sportshub.com/api/admin/bookings/{bookingId}/cancel' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "reason": "Venue maintenance required"
  }'

Path Parameters

bookingId
UUID
required
The unique identifier of the booking to cancel

Request Body

reason
string
required
Reason for administrative cancellation. This will be visible to the user.

Response

Returns the updated BookingResponse object with:
  • status set to CANCELLED
  • cancelledAt timestamp populated
  • cancelReason containing the provided reason
Admin cancellations may trigger automatic refunds depending on the cancellation policy. Users will be notified of the cancellation via email.

Common Admin Tasks

Monitor Booking Activity

Use the list endpoint with pagination to:
  • Review recent bookings
  • Identify problematic patterns
  • Monitor payment status issues
  • Track cancellation rates

Handle Disputes

Admins can cancel bookings to resolve:
  • Venue emergencies or maintenance
  • Customer disputes
  • Payment issues
  • Resource availability conflicts

Generate Reports

Booking data can be used for:
  • Revenue analysis
  • Resource utilization reports
  • Peak time identification
  • Venue performance metrics

Build docs developers (and LLMs) love