Player Matches API
The Hub platform provides an intelligent match-making system that helps players find opponents, organize matches, and manage invitations.Search Available Match Slots
Search for available court slots with eligible players nearby for organizing a match.Endpoint
Query Parameters
Latitude of the search center point
Longitude of the search center point
Search radius in kilometers
Date to search for available slots (ISO format: YYYY-MM-DD)
Earliest acceptable start time (ISO format: HH:MM:SS)
Latest acceptable start time (ISO format: HH:MM:SS)
Duration of the match in minutes
Match format:
TWO_VS_TWO, ONE_VS_ONE, AMERICANORequired skill level:
ANY, BEGINNER, INTERMEDIATE, ADVANCED, PROFESSIONALResponse
Returns an array of available match slots sorted by distance.ID of the available resource (court)
Name of the court
Type of the resource
ID of the venue
Name of the venue
City where the venue is located
Venue latitude coordinate
Venue longitude coordinate
Distance from search center in kilometers
Slot start time
Slot end time
Total price for the court booking
Currency code
Number of eligible players in the area who could join this match
Example Request
Example Response
Create Match Request
Create a match request, block the court slot, and initiate the match-making process.Endpoint
Request Body
ID of the resource to book
Date of the match (ISO format: YYYY-MM-DD)
Start time of the match (ISO format: HH:MM:SS)
Duration of the match in minutes
Match format:
TWO_VS_TWO, ONE_VS_ONE, AMERICANORequired skill level:
BEGINNER, INTERMEDIATE, ADVANCED, PROFESSIONALOptional custom message to include in player invitations
Latitude for searching eligible players
Longitude for searching eligible players
Search radius for finding eligible players in kilometers
Response
Match request ID
ID of the booked resource
Date of the match
Start time of the match
End time of the match
Match format
Required skill level
Match status:
PENDING_PAYMENT, OPEN, MATCHED, CONFIRMED, COMPLETED, CANCELLEDShareable invitation token for direct invites
Number of available player slots remaining
Price per player for the match
Expiration timestamp for pending payment
Array of players in the match
Example Request
Example Response
After creating a match request, you must confirm payment within 15 minutes using the
/api/match/requests/{id}/confirm-payment endpoint. Once payment is confirmed, the system will automatically send invitations to eligible players in the area.Get My Matches
Retrieve all matches the authenticated player is participating in.Endpoint
Response
Returns an array of match request objects (same structure as Create Match Request response).Example Request
Get Match Invitations
Retrieve all pending match invitations for the authenticated player.Endpoint
Response
Invitation ID
ID of the match request
Invitation status:
PENDING, ACCEPTED, DECLINED, EXPIREDWhen the invitation was sent
When the invitation was responded to
Date of the match
Start time of the match
End time of the match
Match format
Required skill level
Current status of the match
Number of available slots
Price per player
Name of the court
Name of the venue
City where the venue is located
Example Request
Accept Match Invitation
Accept a match invitation and join the match.Endpoint
Path Parameters
ID of the invitation to accept
Request Body
Team to join:
TEAM_A or TEAM_BResponse
Returns the updated match request object.Example Request
Decline Match Invitation
Decline a match invitation.Endpoint
Path Parameters
ID of the invitation to decline
Response
Returns 204 No Content on success.Example Request
Join Match by Token
Join a match using a shareable invitation token (for direct invites).Endpoint
Path Parameters
Invitation token from the match organizer
Request Body
Team to join:
TEAM_A or TEAM_BResponse
Returns the updated match request object.Example Request
Leave Match
Leave a match as a non-organizer player (must be more than 48 hours before match start).Endpoint
Path Parameters
ID of the match to leave
Response
Returns 204 No Content on success.Example Request
Players can only leave a match if it’s more than 48 hours before the start time. For last-minute cancellations, use the Report Absence endpoint instead.
Report Absence
Report that you cannot attend a match. This notifies other players and triggers the system to send substitute invitations.Endpoint
Path Parameters
ID of the match
Response
Returns 204 No Content on success.Example Request
Check In to Match
Check in to a match using your device’s GPS location. This confirms your attendance.Endpoint
Path Parameters
ID of the match to check in to
Query Parameters
Your current latitude
Your current longitude
GPS accuracy in meters
Response
Returns 204 No Content on success.Example Request
Check-in is typically required to be within a certain radius of the venue location. Players who don’t check in may be marked as “no-show” which affects their reliability score.
Cancel Match Request
Cancel a match request as the organizer.Endpoint
Path Parameters
ID of the match to cancel
Response
Returns 204 No Content on success.Example Request
Only the match organizer can cancel a match request. All players will be notified and any payments will be refunded according to the cancellation policy.