v1
OpenAPI 3.1.02026-08-0410576180.0 KBRoster
Upsert Roster
Upsert roster entries (batch support).
For each entry:
- Resolve player_id: use provided value, look up by (team_id, jersey_number, season), or generate new UUID
- Upsert player_info (by player_id)
- Upsert player_jersey mapping (team_id + jersey_number + season -> player_id)
- Upsert roster entry
- Upsert team_roster (season + player_id -> team_id)
Important: When a player changes jersey number, you MUST provide player_id in the request. Otherwise the system cannot resolve the existing player (the new jersey has no prior mapping) and will create a duplicate player record. player_id is the canonical identity; jersey_number is only a roster attribute.
post/api/v1/roster
Headers
x-api-keystring nullable
Leaguestring nullable
Request body
Example request
{
"entries": [
{
"jersey_number": 23,
"player_name": "John Doe",
"season": "2024-25",
"team_id": "60959335-3173-45b4-b656-276a05b22011"
},
{
"jersey_number": 7,
"player_id": "1b58990c-9591-49b6-951f-6b573a111583",
"player_name": "Jane Smith",
"season": "2024-25",
"team_id": "60959335-3173-45b4-b656-276a05b22011"
}
]
}Response
Successful Response