Skip to content

Update a team player

PATCH/v1/teams/{teamId}/players/{playerId}

PATCH
/v1/teams/{teamId}/players/{playerId}
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.

teamId
required

Entity identifier

integer format: int32
>= 1

The team id

playerId
required

Entity identifier

integer format: int32
>= 1

The player id

Media typeapplication/json

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
firstName

Default Player first name

string
>= 1 characters <= 35 characters
lastName

Default Player first name

string
>= 1 characters <= 35 characters
number
string
0 <= 3 characters
position

A player position label or position key

string
>= 1 characters <= 255 characters
positionType

A player position label or position key

string
>= 1 characters <= 255 characters
gfxFirstName

A player name that graphics show

string
>= 1 characters <= 16 characters
gfxLastName

A player name that graphics show

string
>= 1 characters <= 16 characters
defaultStarter
boolean
defaultBench
boolean
captain
boolean
Examplegenerated
{
"firstName": "example",
"lastName": "example",
"number": "example",
"position": "example",
"positionType": "example",
"gfxFirstName": "example",
"gfxLastName": "example",
"defaultStarter": true,
"defaultBench": true,
"captain": true
}

Ok

Media typeapplication/json
object
id
required

Entity identifier

integer format: int32
>= 1
firstName
required

Default Player first name

string
>= 1 characters <= 35 characters
gfxFirstName
required

Name predominantly display in graphics

string
nullable >= 1 characters <= 19 characters
gfxLastName
required

Name predominantly display in graphics

string
nullable >= 1 characters <= 19 characters
lastName
required

Default Player first name

string
>= 1 characters <= 35 characters
position
required
string
nullable
positionType
required
string
nullable
number
required
string
0 <= 3 characters
starter
required
boolean
bench
required
boolean
captain
required
boolean
photoUrl
string
nullable /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/
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

Media typeapplication/json
object
message
required
string
details
required
object
key
additional properties
Examplegenerated
{
"message": "example",
"details": {
"additionalProperty": "example"
}
}

Missing or invalid api key

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Api key provides insufficient access for the request

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Team not found

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Api key has made too many requests

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

An unexpected error has occured. If problems persist please contact support

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}