Skip to content

Club scenarios

All examples use an organization key ak_… (how to issue) and these variables:

Terminal window
KEY=ak_… # organization key
H=https://api.ruunso.com
ORG=<orgId> # organization id from the account URL

Repeat writes (POST, PUT, DELETE) only with an Idempotency-Key header (limits and retries).

Roster (roster)

Terminal window
# Roster list, search by name and a paging cursor
curl -H "Authorization: Bearer $KEY" "$H/v1/orgs/$ORG/roster?q=Ivan&limit=50"
# Add an athlete to the roster
curl -X POST -H "Authorization: Bearer $KEY" -H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' -d '{"athleteId":"<athleteId>"}' $H/v1/orgs/$ORG/roster

Requests to join the club: GET /v1/orgs/{id}/join-requests and the accept / reject actions.

Roster entries to an event (club_entries)

Terminal window
# What an entry needs: starts, classes, prices, consents
curl -H "Authorization: Bearer $KEY" $H/v1/events/<eventId>/entry-context
# Enter club athletes (from your own roster only)
curl -X POST -H "Authorization: Bearer $KEY" -H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{"items":[{"athleteId":"<athleteId>","raceId":1,"classId":2,"clubOrgId":"<orgId>"}]}' \
$H/v1/events/<eventId>/entries
# Unpaid club entries for a paid start
curl -H "Authorization: Bearer $KEY" "$H/v1/events/<eventId>/club-entries?org=$ORG"

On a paid start an entry creates an unpaid order. Payment happens only in the organization’s account area: the API takes no money.

Passes (passes)

Terminal window
# Club passes
curl -H "Authorization: Bearer $KEY" $H/v1/orgs/$ORG/passes
# Pass plans of the club: GET and POST /v1/orgs/{id}/pass-plans
# Freeze for 14 days
curl -X POST -H "Authorization: Bearer $KEY" -H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' -d '{"days":14}' $H/v1/passes/<passId>/freeze
# Debts: passes in debt and unpaid drop-in visits
curl -H "Authorization: Bearer $KEY" $H/v1/orgs/$ORG/club-debts

Unfreeze is POST /v1/passes/{passId}/unfreeze, auto-renewal is PUT /v1/passes/{passId}/auto-renew.

Classes and attendance (attendance)

Terminal window
# Classes of the week
curl -H "Authorization: Bearer $KEY" "$H/v1/orgs/$ORG/club-sessions?from=2026-11-02&to=2026-11-08"
# Mark an athlete: present, absent or excused
curl -X PUT -H "Authorization: Bearer $KEY" -H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' -d '{"status":"present"}' \
$H/v1/orgs/$ORG/club-sessions/<sessionId>/attendance/<athleteId>

The marks of a class: GET /v1/orgs/{id}/club-sessions/{sessionId}/attendance; an athlete’s visit history: GET /v1/athletes/{id}/club-visits. The full list of operations is in the reference.