Update a team player
PATCH/v1/teams/{teamId}/players/{playerId}
const url = 'https://api.ligr.live/rest/v1/teams/1/players/1';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"firstName":"example","lastName":"example","number":"example","position":"example","positionType":"example","gfxFirstName":"example","gfxLastName":"example","defaultStarter":true,"defaultBench":true,"captain":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.ligr.live/rest/v1/teams/1/players/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "firstName": "example", "lastName": "example", "number": "example", "position": "example", "positionType": "example", "gfxFirstName": "example", "gfxLastName": "example", "defaultStarter": true, "defaultBench": true, "captain": true }'Changes one or more fields of a player on the roster of a team. Send only the fields to change.
Fields that you omit keep their current value. The team and the player must belong to your
organization, and the player must be on the roster of the team.
firstName and lastName change on every team of the player. All other fields change on
this team only. Use gfxFirstName and gfxLastName to set shorter names for graphics.
If a data provider supplies the player, the next provider sync replaces firstName, lastName,
number, position and positionType. The sync does not change gfxFirstName,
gfxLastName, defaultStarter, defaultBench or captain.
The response has the same shape as an item of GET /v1/teams/{teamId}/players.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Entity identifier
The team id
Entity identifier
The player id
Request Bodyrequired
Section titled “Request Bodyrequired”Change one or more fields of a roster player. Send only the fields to change.
Fields that you omit keep their current value.
firstName and lastName belong to the player and change on every team of the player.
All other fields belong to the roster entry on this team only.
gfxFirstName and gfxLastName are the names that graphics show, 1 to 16 characters.
object
Default Player first name
Default Player first name
A player position label or position key
A player position label or position key
A player name that graphics show
A player name that graphics show
Examplegenerated
{ "firstName": "example", "lastName": "example", "number": "example", "position": "example", "positionType": "example", "gfxFirstName": "example", "gfxLastName": "example", "defaultStarter": true, "defaultBench": true, "captain": true}Responses
Section titled “Responses”Ok
object
Entity identifier
Default Player first name
Name predominantly display in graphics
Name predominantly display in graphics
Default Player first name
Examplegenerated
{ "id": 1, "firstName": "example", "gfxFirstName": "example", "gfxLastName": "example", "lastName": "example", "position": "example", "positionType": "example", "number": "example", "starter": true, "bench": true, "captain": true, "photoUrl": "example"}Request is invalid
object
object
Examplegenerated
{ "message": "example", "details": { "additionalProperty": "example" }}Missing or invalid api key
object
Examplegenerated
{ "message": "example"}Api key provides insufficient access for the request
object
Examplegenerated
{ "message": "example"}Team not found
object
Examplegenerated
{ "message": "example"}Api key has made too many requests
object
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
object
Examplegenerated
{ "message": "example"}