Skip to main content

API Surface

Key public routes exposed by the backend API. Swagger is available at /api/docs.

  • Clubs & courses
    • GET /clubs/search — filter by name, code, country, visibility flags
    • GET /clubs/nearby — list nearby club codes by lat/lon
    • GET /clubs/:clubId/tee-sheet — tee sheets for all courses in a club
  • Tee sheets & times
    • GET /courses/:courseId/tee-sheet — tee sheet for one course
    • GET /courses/:courseId/tee-times/visitor — visitor slots with pricing
    • GET /courses/:courseId/tee-times/member — member slots with classification
    • GET /clubs/tee-sheet/stream — multi‑club SSE stream
  • Players
    • GET /players?q=&page=&limit= — search players
    • Me endpoints (auto IDP subject → player): GET/POST/DELETE /players/me/favorites, GET/POST/DELETE /players/me/buddies (buddy payload includes first/last/full name, email, phone), GET /players/me/buddies/groups?size=4&pad=0, GET/PUT /players/me/preferences, POST /players/me/preferences/watch?save=true
    • Player‑scoped variants remain under /players/:id/* when impersonation is required.
  • Associations & eligibility
    • GET /api/associations/golfrsa/clubs?search= — GolfRSA club search
    • GET /api/associations/dotgolf/courses?search=&countryCode= — DotGolf course search
    • GET /api/associations/course-tee-info?provider=GOLFRSA|DOTGOLF&associationCourseId=...&teeColour= — course/tee rating/slope/par metadata for handicap posting
  • Competitions
    • POST /api/competitions / GET /api/competitions?clubId=&status=&seasonId= — create and list competitions
    • GET /api/competitions/:id — detail; GET /api/competitions/:id/leaderboard — leaderboard; GET /api/competitions/:id/leaderboard.csv — CSV export
    • Entries: POST /api/competitions/:id/entries, GET /api/competitions/:id/entries, GET /api/competitions/entries/:entryId, POST /api/competitions/entries/:entryId/withdraw
    • Rounds & sync: POST /api/competitions/:roundId/draw, POST /api/competitions/rounds/:roundId/sync-tee-sheet
    • Side comps & matchplay: POST/GET /api/competitions/:id/nearest-pin, POST/GET /api/competitions/:id/longest-drive, GET /api/competitions/:id/twos-club, POST /api/competitions/:id/matchplay/brackets, POST /api/competitions/:id/matchplay/brackets/seed, POST /api/competitions/:id/matchplay/matches/:matchId/holes
  • Weather & location
    • GET /weather — hourly forecast lookup
    • GET /ip-location — approximate coordinates for caller IP
    • GET /ip-location/details — enriched IP location
  • Admin (/admin/*)
    • POST /course-tee-sheets — create course tee sheet
    • PATCH /course-tee-sheets/:id — update course tee sheet
    • DELETE /course-tee-sheets/:id — remove course tee sheet
    • PATCH /tee-sheets/:id/offline — toggle tee sheet offline

See ./configuration.md for environment variables and provider base URLs.