Set a match lineup
PUT/v2/matches/{matchId}/lineup
const url = 'https://api.ligr.live/rest/v2/matches/1/lineup';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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}]}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Entity identifier
The match identifier
Request Bodyrequired
Section titled “Request Bodyrequired”The starting and bench players of each team
object
One entry per team to replace. A team you leave out keeps its lineup.
object
Entity identifier
object
Entity identifier
Shirt number for this match. Defaults to the roster number.
Position for this match. Defaults to the roster position.
Team captain for this match. Defaults to the roster captain flag.
Order of the player in the team’s lineup. Defaults to the roster lineup position.
Football only. The formation slot of a starter, 1 to 11. Leave it out for no slot.
object
Entity identifier
Shirt number for this match. Defaults to the roster number.
Position for this match. Defaults to the roster position.
Team captain for this match. Defaults to the roster captain flag.
Order of the player in the team’s lineup. Defaults to the roster lineup position.
Football only. The formation slot of a starter, 1 to 11. Leave it out for no slot.
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 } ] } ]}Responses
Section titled “Responses”Ok
object
object
Entity identifier
Entity identifier
Default Player first name
Default Player first name
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.
The player’s position in the team’s lineup ordering as managed in the control room. Null when no explicit lineup order is set.
Example
{ "count": 24}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"}Match 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"}