Upsert Roster
Changed onUpsert 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.
Request
- Base URLhttps://developer.preciser.io
- URLhttps://developer.preciser.io/api/v1/roster
- Authnone declared. Required headers: x-api-key, League
Headers
Required API key issued by Preciser.
Required tenant/database selector, for example pitchbio-master.
Request body
Example request
{
"entries": [
{
"competition_id": "VIC",
"jersey_number": 23,
"player_name": "John Doe",
"season": "2024-25",
"team_id": "60959335-3173-45b4-b656-276a05b22011"
},
{
"competition_id": "NSW",
"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
Changes
- breaking
the
headerrequest parameterLeaguebecame required - breaking
the
headerrequest parameterx-api-keybecame required - breaking
headerrequest parameterLeaguelist-of-types was narrowed by removing typesnull - breaking
headerrequest parameterx-api-keylist-of-types was narrowed by removing typesnull - info
for the
headerrequest parameterLeague, the type was generalized from no type tostring - info
for the
headerrequest parameterx-api-key, the type was generalized from no type tostring
- breaking
- info
added the new optional request property
// - info
added the optional property
//to the response with the status - info
added the required property
//to the response with the status
- info