Skip to content

Set a match lineup

PUT/v2/matches/{matchId}/lineup

PUT
/v2/matches/{matchId}/lineup
curl --request PUT \
--url https://api.ligr.live/rest/v2/matches/1/lineup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "teams": [ { "teamId": 1, "starting": [ { "playerId": 1, "number": "example", "position": "example", "captain": true, "lineupPosition": 1, "formationNumber": 1 } ], "bench": [ { "playerId": 1, "number": "example", "position": "example", "captain": true, "lineupPosition": 1, "formationNumber": 1 } ] } ] }'

Replace the lineup of one or both teams of a match. Send the full starting and bench lists of each team you replace. Players you leave out are removed from that team’s lineup. A team you leave out keeps its lineup. Sending the same body again changes nothing.

Each player must be on the team’s roster. Per-player fields you leave out take the roster value. Open overlays receive the new lineup. The response is the full match lineup, in the shape of GET /v1/matches/{matchId}/lineup.

matchId
required

Entity identifier

integer format: int32
>= 1

The match identifier

The starting and bench players of each team

Media typeapplication/json
object
teams
required

One entry per team to replace. A team you leave out keeps its lineup.

Array<object>
>= 1 items <= 2 items
object
teamId
required

Entity identifier

integer format: int32
>= 1
starting
required
Array<object>
object
playerId
required

Entity identifier

integer format: int32
>= 1
number

Shirt number for this match. Defaults to the roster number.

string
0 <= 3 characters
position

Position for this match. Defaults to the roster position.

string
nullable
captain

Team captain for this match. Defaults to the roster captain flag.

boolean
nullable
lineupPosition

Order of the player in the team’s lineup. Defaults to the roster lineup position.

integer format: int32
nullable
formationNumber

Football only. The formation slot of a starter, 1 to 11. Leave it out for no slot.

integer format: int32
nullable
bench
required
Array<object>
object
playerId
required

Entity identifier

integer format: int32
>= 1
number

Shirt number for this match. Defaults to the roster number.

string
0 <= 3 characters
position

Position for this match. Defaults to the roster position.

string
nullable
captain

Team captain for this match. Defaults to the roster captain flag.

boolean
nullable
lineupPosition

Order of the player in the team’s lineup. Defaults to the roster lineup position.

integer format: int32
nullable
formationNumber

Football only. The formation slot of a starter, 1 to 11. Leave it out for no slot.

integer format: int32
nullable
Examplegenerated
{
"teams": [
{
"teamId": 1,
"starting": [
{
"playerId": 1,
"number": "example",
"position": "example",
"captain": true,
"lineupPosition": 1,
"formationNumber": 1
}
],
"bench": [
{
"playerId": 1,
"number": "example",
"position": "example",
"captain": true,
"lineupPosition": 1,
"formationNumber": 1
}
]
}
]
}

Ok

Media typeapplication/json
object
lineup
required
Array<object>
object
id
required

Entity identifier

integer format: int32
>= 1
teamId
required

Entity identifier

integer format: int32
>= 1
firstName
required

Default Player first name

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

The player’s slot in the team’s formation layout, numbered from the goalkeeper through to the forwards. Null when no formation slot is assigned.

number format: double
nullable
lineupPosition
required

The player’s position in the team’s lineup ordering as managed in the control room. Null when no explicit lineup order is set.

number format: double
nullable
count
required
integer format: int32
Example
{
"count": 24
}

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"
}

Match 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"
}