Demo — sample data, resets nightly About this demo Next reset: Mon Nov 2, 2026, 3:15 AM

API reference

Generated from the OpenAPI 3.1 document at /api/v1/openapi.json. Paths below are relative to https://sportsmgnt.com/api/v1.

Version 1.0.0 · Download the OpenAPI document · Developers

REST API of the SportsMgnt demonstration platform built by WeldonPC. All data is sample data for the fictional Kestrel Basin Parks & Recreation District and resets nightly. Responses use the envelope {"data": ..., "meta": {...}}; errors use {"error": {"code", "message", "fields"}}.

catalog

Public activity catalog (no token needed)

GET /activities

Search activity sessions (same filters as the /activities page)

No token needed

Parameters: GET /activities
NameInTypeRequiredDescription
qquerystringNoKeyword (title, description or code)
categoryquerystringNoCategory slug, e.g. aquatics
agequeryintegerNoParticipant age
gradequerystringNoSchool grade K or 1-12
locationquerystringNoLocation code, e.g. L-HPCC
near_locationquerystringNoLocation code to measure distance from
distancequeryintegerNoKilometres from near_location: 1, 3, 5 or 10
day[]queryarray of string (mon, tue, wed, thu, fri, sat, sun)NoDays of week (mon..sun); repeat day[]
timequerystringNomorning, afternoon or evening
fromquerystringNoEarliest start time HH:MM
toquerystringNoLatest end time HH:MM
languagequerystringNoen, es or bilingual
adaptivequeryintegerNo1 = adaptive programs only
openqueryintegerNo1 = sessions with open seats only
seasonquerystringNoSeason code
pagequeryintegerNoPage number
per_pagequeryintegerNoRows per page (max 100)

Responses

  • 200 Paginated sessions
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/activities' \
  -H 'Accept: application/json'

GET /activities/{code}

One activity (program code like AQ-L2, or a session code) with its sessions

No token needed

Parameters: GET /activities/{code}
NameInTypeRequiredDescription
codepathstringYes

Responses

  • 200 Activity
  • 404 Not found
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/activities/AQ-L2' \
  -H 'Accept: application/json'

GET /locations

Locations of the fictional district with grid coordinates

No token needed

Responses

  • 200 Locations
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/locations' \
  -H 'Accept: application/json'

core

Health and token information

GET /health

Service health

No token needed

Responses

  • 200 OK
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/health' \
  -H 'Accept: application/json'

GET /me/token

Describe the calling token

Token required

Responses

  • 200 The token's user, scopes and expiry
  • 401 Missing, invalid, revoked or expired token
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/me/token' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN'

facilities

Facility inventory and availability (public)

GET /facilities

List facilities

Public. Filters match the web catalog.

No token needed

Parameters: GET /facilities
NameInTypeRequiredDescription
typequerystringNoFacility type
locationqueryintegerNoLocation id
capacityqueryintegerNoMinimum capacity
amenityquerystringNoAmenity key
accessiblequerystringNoAccessibility feature key
bookablequerystringNo1 = bookable online only
qquerystringNoSearch text
pagequeryintegerNoPage number
per_pagequeryintegerNoItems per page (max 100)

Responses

  • 200 OK
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/facilities' \
  -H 'Accept: application/json'

GET /facilities/{slug}

One facility

No token needed

Parameters: GET /facilities/{slug}
NameInTypeRequiredDescription
slugpathstringYes

Responses

  • 200 OK
  • 404 Unknown facility
Example request
curl 'https://sportsmgnt.com/api/v1/facilities/riverbend-shelter-1' \
  -H 'Accept: application/json'

GET /facilities/{slug}/availability

Free and busy times per day

Agency-local times (meta.timezone). Busy blocks carry a state but never who booked them.

No token needed

Parameters: GET /facilities/{slug}/availability
NameInTypeRequiredDescription
slugpathstringYes
fromquerystringNoFirst date (YYYY-MM-DD, default today)
toquerystringNoLast date (default from + 6 days; at most 31 days)

Responses

  • 200 OK
  • 404 Unknown facility
  • 422 Invalid date range
Example request
curl 'https://sportsmgnt.com/api/v1/facilities/riverbend-shelter-1/availability' \
  -H 'Accept: application/json'

household

The signed-in household (personal access token with household:read)

GET /me/calendar

Calendar items between two dates (agency time; default the next 30 days; scope household:read)

Token required

Parameters: GET /me/calendar
NameInTypeRequiredDescription
fromquerystring (date)No
toquerystring (date)No

Responses

  • 200 Calendar items
  • 422 Invalid range
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/me/calendar' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN'

GET /me/cart

The household's open cart with seat-hold expiry times (scope household:read)

Token required

Responses

  • 200 Cart
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/me/cart' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN'

GET /me/enrollments

Enrolments of the household, newest first (scope household:read)

Token required

Parameters: GET /me/enrollments
NameInTypeRequiredDescription
statusquerystringNo
pagequeryintegerNo
per_pagequeryintegerNo

Responses

  • 200 Enrolments
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/me/enrollments' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN'

GET /me/household

The token user's active household (scope household:read)

Token required

Responses

  • 200 Household
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/me/household' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN'

GET /me/members

Household members (scope household:read; no medical data)

Token required

Responses

  • 200 Members
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/me/members' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN'

reservations

Facility reservation requests (token)

GET /reservations

Your household's reservations

Token scope household:read.

Token required

Parameters: GET /reservations
NameInTypeRequiredDescription
pagequeryintegerNoPage number
per_pagequeryintegerNoItems per page (max 100)

Responses

  • 200 OK
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
Example request
curl 'https://sportsmgnt.com/api/v1/reservations' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN'

POST /reservations

Request a reservation

Token scope reservations:write. Creates a request only: no payment is taken and nothing is confirmed here. The same validation as the web form applies (booking windows, opening hours, capacity, slot locks). Pay, sign and upload paperwork from the reservation page.

Token required

Request body

Request body: POST /reservations
PropertyTypeRequiredDescription
facilitystringYesFacility slug
householdstringNoH-number; defaults to the token user's active household
modestring (once, weekly, dates)No
datestring (date)No
daysarray of integerNoISO weekdays for mode=weekly
untilstring (date)No
datesarray of string (date)No
startstringYesAgency-local time, 15-minute steps
endstringYes
purposestring (private, nonprofit, school, commercial)No
attendeesintegerYes
titlestringNo
organisationstringNo
notesstringNo
on_conflictstring (block, drop)No
agreementobjectNoOptional: sign the rental agreement now

Responses

  • 201 Request created
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
  • 409 A requested time is already taken (program, booking, league game or blackout)
  • 422 Validation failed
  • 429 Too many requests; see Retry-After
Example request
curl -X POST 'https://sportsmgnt.com/api/v1/reservations' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"facility":"string","household":"string","mode":"once","date":"2026-10-12","days":[1],"until":"2026-10-12","dates":["2026-10-12"],"start":"10:00","end":"13:00","purpose":"private","attendees":1,"title":"string","organisation":"string","notes":"string","on_conflict":"block","agreement":{"signer_name":"string","consent":true}}'

GET /reservations/{id}

One reservation

Token scope household:read.

Token required

Parameters: GET /reservations/{id}
NameInTypeRequiredDescription
idpathstringYes

Responses

  • 200 OK
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
  • 404 Not found or not yours
Example request
curl 'https://sportsmgnt.com/api/v1/reservations/1' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN'

staff

Staff back office: rosters, attendance and reports. Requires a staff token with the matching scope; the token user's role and location scope apply, and an instructor-only user sees only the sessions they teach.

POST /staff/attendance

Record attendance for a meeting

Scope staff:attendance. The token user needs attendance.mark at the meeting's location (instructor-only users: their own sessions).

Token required

Request body

Request body: POST /staff/attendance
PropertyTypeRequiredDescription
meeting_idintegerYes
recordsarray of objectYes

Responses

  • 200 Saved
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
  • 404 No such meeting
  • 422 Invalid records
  • 429 Too many requests; see Retry-After
Example request
curl -X POST 'https://sportsmgnt.com/api/v1/staff/attendance' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"meeting_id":1,"records":[{"enrollment_id":1,"status":"present"}]}'

GET /staff/reports/{key}

Run a library report

Scope staff:reports. Rows are limited to the token user's location scope. Keys: enrolment, revenue_cost_center, daily_cash, transmittals, refunds_status, waitlists, facility_utilization, attendance_pct, instructor_hours, demographics, fee_assistance, inventory, donations_fund, passes, balances_aging, audit_summary.

Token required

Parameters: GET /staff/reports/{key}
NameInTypeRequiredDescription
keypathstringYes
fromquerystring (date)No
toquerystring (date)No
locationqueryintegerNo
seasonqueryintegerNo

Responses

  • 200 Report rows (sample data)
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
  • 404 Unknown report
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/staff/reports/key' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN'

GET /staff/rosters/{session}

Roster of a session

Scope staff:rosters. The token user needs rosters.view at the session's location; an instructor-only user must be assigned to the session.

Token required

Parameters: GET /staff/rosters/{session}
NameInTypeRequiredDescription
sessionpathstringYesSession code (KB-F26-1012) or numeric id

Responses

  • 200 Roster
  • 401 Missing, invalid, revoked or expired token
  • 403 The token lacks a scope, or the user lacks a permission
  • 404 No such session
  • 429 Too many requests; see Retry-After
Example request
curl 'https://sportsmgnt.com/api/v1/staff/rosters/KB-F26-1001' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Schemas

Activity object

Activity
PropertyTypeRequiredDescription
codestringYes
typestringYes
titlestringYes
descriptionstringYes
categorystringYes
agesobjectYes
gradesobjectNo
residents_onlybooleanNo
languagestringNo
adaptivebooleanNo
required_waiversarray of stringNo
required_documentsarray of stringNo
accessibility_notesstringNo
sessionsarray of ActivitySessionYes

ActivitySession object

ActivitySession
PropertyTypeRequiredDescription
codestringYes
program_codestringYes
titlestringYes
typestring (class, camp, overnight_camp, league, child_care, dropin, event)Yes
categorystringNo
seasonstringNo
locationobjectYes
facilitystring | nullNo
start_datestring (date)Yes
end_datestring (date)Yes
daysarray of stringYes
start_timestringYes
end_timestringYes
agesobjectNo
languagestringNo
adaptivebooleanNo
capacityintegerYes
seats_leftintegerYes
waitlistedintegerYes
resident_price_centsintegerYes
registrationobjectYes
urlstringNo

AttendanceRequest object

AttendanceRequest
PropertyTypeRequiredDescription
meeting_idintegerYes
recordsarray of objectYes

AttendanceResult object

AttendanceResult
PropertyTypeRequiredDescription
dataobjectNo
metaMetaNo

AvailabilityDay object

AvailabilityDay
PropertyTypeRequiredDescription
datestring (date)Yes
openbooleanYes
opens_atstringYes
closes_atstringYes
freearray of objectYes
busyarray of objectYes

CalendarItem object

CalendarItem
PropertyTypeRequiredDescription
typestringYes
titlestringYes
personstring | nullNo
person_idinteger | nullNo
starts_atstring (date-time)Yes
ends_atstring (date-time)Yes
locationstringYes
facilitystring | nullNo
notesstring | nullNo

Cart object

Cart
PropertyTypeRequiredDescription
itemsarray of objectYes
total_centsintegerYes

Enrollment object

Enrollment
PropertyTypeRequiredDescription
idintegerYes
sessionstringYes
titlestringYes
person_idintegerYes
statusstring (pending_review, enrolled, waitlisted, offered, cancelled, transferred, completed)Yes
waitlist_positioninteger | nullNo
enrolled_atstring | null (date-time)No
offer_expires_atstring | null (date-time)No
start_datestring (date)No
end_datestring (date)No

Error object

Error
PropertyTypeRequiredDescription
errorobjectYes

Facility object

Facility
PropertyTypeRequiredDescription
slugstringYes
namestringYes
typestringYes
locationobjectYes
capacityintegerYes
amenitiesarray of stringNo
accessible_featuresarray of stringNo
bookable_onlinebooleanYes
approval_stepsintegerYes
instant_bookingbooleanYes
insurance_requiredbooleanYes
deposit_centsintegerYes
min_notice_daysintegerYes
max_advance_daysintegerYes
cutoff_daysintegerYes
opens_atstringYes
closes_atstringYes
urlstringYes

FacilityDetail

Household object

Household
PropertyTypeRequiredDescription
public_idstringYes
namestringYes
kindstringNo
residencystring (resident, nonresident)Yes
zipstring | nullNo
statusstringNo
income_statusstringNo
income_verified_untilstring | null (date)No
rolestring | null (primary, secondary, )Yes
membersintegerYes
balance_centsintegerYes
credit_centsintegerYes

Location object

Location
PropertyTypeRequiredDescription
codestringYes
namestringYes
addressstringYes
phonestring | nullNo
x_kmnumberYes
y_kmnumberYes
point_of_salebooleanNo
hoursobjectNo

Member object

Member
PropertyTypeRequiredDescription
idintegerYes
first_namestringYes
last_namestringYes
ageinteger | nullNo
relationstringYes
guardian_rolestringYes
school_gradestring | nullNo
has_allergybooleanNo

Meta object

Meta
PropertyTypeRequiredDescription
totalintegerNo
pageintegerNo
per_pageintegerNo

ReportResult object

ReportResult
PropertyTypeRequiredDescription
dataobjectNo
metaobjectNo

Reservation object

Reservation
PropertyTypeRequiredDescription
idstringYes
statusstring (draft, submitted, in_review, approved, awaiting_payment, confirmed, denied, cancelled)Yes
status_labelstringNo
facilityobjectYes
householdstringYes
purposestring (private, nonprofit, school, commercial)Yes
attendeesintegerYes
titlestring | nullNo
current_stepintegerYes
approval_stepsintegerYes
total_centsintegerYes
deposit_centsintegerYes
amount_due_centsintegerYes
insurance_statusstring (not_required, required, submitted, approved, rejected)Yes
checkpointsobjectYes
datesarray of objectYes
urlstringYes

ReservationRequest object

ReservationRequest
PropertyTypeRequiredDescription
facilitystringYesFacility slug
householdstringNoH-number; defaults to the token user's active household
modestring (once, weekly, dates)No
datestring (date)No
daysarray of integerNoISO weekdays for mode=weekly
untilstring (date)No
datesarray of string (date)No
startstringYesAgency-local time, 15-minute steps
endstringYes
purposestring (private, nonprofit, school, commercial)No
attendeesintegerYes
titlestringNo
organisationstringNo
notesstringNo
on_conflictstring (block, drop)No
agreementobjectNoOptional: sign the rental agreement now

Roster object

Roster
PropertyTypeRequiredDescription
dataobjectNo
metaMetaNo

RosterParticipant object

RosterParticipant
PropertyTypeRequiredDescription
enrollment_idintegerYes
person_idintegerYes
first_namestringYes
last_namestringYes
ageinteger | nullNo
householdstringNo
allergybooleanYes
allergy_notestring | nullNoOnly for users with medical.view at the session's location; each read is audited.
guardian_phonestring | nullNo
emergency_contactsarray of objectNo
authorized_pickupsarray of stringNo
checkin_codestringYesCode on the participant's QR pass, for check-in.