Skip to main content

Exploring Your Club

This guide walks you through the most common read operations: discovering which clubs your account has access to, then drilling down into players, trackers, teams, and sessions — all using plain HTTP calls you can run with curl.

The staging base URL used throughout these examples is:

https://api.dp.dev.tracktics.systems

Replace <your-firebase-jwt> with the Firebase ID token for your account in every request.


Step 1 — Find your clubs

The first call you will almost always make is GET /my_clubs. It returns every club your account can access, together with your role(s) in each one.

curl -s \
-H "Authorization: Bearer <your-firebase-jwt>" \
https://api.dp.dev.tracktics.systems/my_clubs

Example response

{
"clubs": [
{
"club_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "FC Example",
"avatar": "/avatars/fc-example.png",
"timestamp": "2025-01-15T10:00:00Z",
"revision": 1
}
],
"roles": [
["club admin", "club editor"]
]
}

The roles array is parallel to the clubs array — roles[0] contains the roles for clubs[0], and so on.

Take note of the club_id; you will need it for every subsequent call.


Step 2 — Get the full club snapshot (BFF)

The BFF endpoint at GET /v1/bff/club/{club_id} returns players, trackers, roles, and tracker–player associations in a single request. This is the recommended starting point for building any club view, because it eliminates multiple round trips.

CLUB_ID="a1b2c3d4-e5f6-7890-abcd-ef1234567890"

curl -s \
-H "Authorization: Bearer <your-firebase-jwt>" \
"https://api.dp.dev.tracktics.systems/v1/bff/club/${CLUB_ID}"

Example response

{
"club": {
"club_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "FC Example",
"avatar": "/avatars/fc-example.png",
"timestamp": "2025-01-15T10:00:00Z",
"revision": 1
},
"players": [
{
"player_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"club_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Alice Müller",
"avatar": "/avatars/alice.png",
"timestamp": "2025-01-15T10:30:00Z",
"revision": 1
},
{
"player_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"club_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Bob Schmidt",
"avatar": "/avatars/bob.png",
"timestamp": "2025-01-15T10:35:00Z",
"revision": 1
}
],
"trackers": [
{
"tracker_id": "d4e5f6a7-b8c9-0123-def1-234567890123",
"club_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Tracker 01",
"timestamp": "2025-01-15T11:00:00Z",
"revision": 1
}
],
"roles": [
{
"role_id": "e5f6a7b8-c9d0-1234-ef12-345678901234",
"club_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"user_id": "f6a7b8c9-d0e1-2345-f123-456789012345",
"roles": ["club admin", "club editor"],
"timestamp": "2025-01-15T09:00:00Z",
"revision": 1
}
],
"tracker_player_relations": [
{
"relation_id": "a7b8c9d0-e1f2-3456-a123-456789012345",
"tracker_id": "d4e5f6a7-b8c9-0123-def1-234567890123",
"player_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"club_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"timestamp": "2025-01-15T11:30:00Z",
"revision": 1
}
]
}
FieldWhat it contains
clubClub metadata (name, avatar)
playersAll players registered to the club
trackersAll GPS trackers belonging to the club
rolesUser–role assignments within the club
tracker_player_relationsCurrent tracker ↔ player pairings

Step 3 — List teams

Teams are sub-collections of the club. Use the standard list endpoint:

curl -s \
-H "Authorization: Bearer <your-firebase-jwt>" \
"https://api.dp.dev.tracktics.systems/clubs/${CLUB_ID}/teams"

Example response

[
{
"team_id": "f7a8b9c0-d1e2-3456-f123-456789012345",
"club_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "First Team",
"timestamp": "2025-01-10T08:00:00Z",
"revision": 1
},
{
"team_id": "07b8c9d0-e1f2-4567-0123-456789012345",
"club_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "U17",
"timestamp": "2025-01-10T08:05:00Z",
"revision": 1
}
]

Note the team_id values — they are required to query sessions in Step 4.


Step 4 — List sessions for a team

Sessions are scoped to a team. Substitute the team_id from Step 3:

TEAM_ID="f7a8b9c0-d1e2-3456-f123-456789012345"

curl -s \
-H "Authorization: Bearer <your-firebase-jwt>" \
"https://api.dp.dev.tracktics.systems/clubs/${CLUB_ID}/teams/${TEAM_ID}/sessions"

Example response

[
{
"session_id": "17c8d9e0-f1a2-5678-1234-567890123456",
"club_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"team_id": "f7a8b9c0-d1e2-3456-f123-456789012345",
"name": "Training 2025-01-15",
"start": "2025-01-15T16:00:00Z",
"end": "2025-01-15T17:30:00Z",
"timestamp": "2025-01-15T16:00:00Z",
"revision": 1
}
]

To narrow results to a specific date range, add from and until query parameters (ISO 8601):

curl -s \
-H "Authorization: Bearer <your-firebase-jwt>" \
"https://api.dp.dev.tracktics.systems/clubs/${CLUB_ID}/teams/${TEAM_ID}/sessions?from=2025-01-01T00:00:00Z&until=2025-02-01T00:00:00Z&order=asc"

Pagination

All list endpoints (/teams, /sessions, /players, /trackers) support cursor-based pagination via the Pagination-Next-Token response header. When the header is present, there are more results:

# First page
curl -si \
-H "Authorization: Bearer <your-firebase-jwt>" \
"https://api.dp.dev.tracktics.systems/clubs/${CLUB_ID}/teams/${TEAM_ID}/sessions?limit=10" \
| grep -E "Pagination-Next-Token|^\["

# Next page — use the token from the header
curl -s \
-H "Authorization: Bearer <your-firebase-jwt>" \
"https://api.dp.dev.tracktics.systems/clubs/${CLUB_ID}/teams/${TEAM_ID}/sessions?limit=10&next_token=<token-from-header>"
ParameterDefaultDescription
limit100Items per page (maximum 100)
next_tokenCursor from the Pagination-Next-Token header
orderdescasc for oldest-first, desc for newest-first
fromOnly return items at or after this timestamp
untilOnly return items up to this timestamp

What's next?

  • Subscribe to live position data for a session via WebSocket channels
  • Query historical position data with the REST position endpoint (GET /clubs/{club_id}/trackers/{tracker_id}/positions)