Set the team player photo
PUT/v1/teams/{teamId}/players/{playerId}/photo
PUT
/v1/teams/{teamId}/players/{playerId}/photo
const url = 'https://api.ligr.live/rest/v1/teams/1/players/1/photo';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"uploadId":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/v1/teams/1/players/1/photo \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "uploadId": 1 }'Sets the photo of a player on the roster of a team from a completed upload. The API checks the size and SHA-256 of the bytes, the image type, and the 300x300 pixel size. Each upload sets a photo one time. The photo belongs to this team only. Graphics show it as the player photo. 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”teamId
required
Entity identifier
integer format: int32
The team id
playerId
required
Entity identifier
integer format: int32
The player id
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Set the team player photo from a completed upload.
object
uploadId
required
The uploadId from the POST …/uploads route of the same image.
number format: double
Examplegenerated
{ "uploadId": 1}Responses
Section titled “Responses”Ok
Media typeapplication/json
object
id
required
Entity identifier
integer format: int32
firstName
required
Default Player first name
string
gfxFirstName
required
Name predominantly display in graphics
string
gfxLastName
required
Name predominantly display in graphics
string
lastName
required
Default Player first name
string
position
required
string
positionType
required
string
number
required
string
starter
required
boolean
bench
required
boolean
captain
required
boolean
photoUrl
string
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"}