Skip to content

Create a player photo upload

POST/v1/teams/{teamId}/players/{playerId}/photo/uploads

POST
/v1/teams/{teamId}/players/{playerId}/photo/uploads
curl --request POST \
--url https://api.ligr.live/rest/v1/teams/1/players/1/photo/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "contentType": "image/png", "size": 1, "sha256": "example" }'

Opens a signed upload for the photo of a player on the roster of a team. Declare the exact PNG or JPEG file you will send. The photo must be exactly 300x300 pixels. Upload the bytes with one PUT to url and send headers with it. Then send uploadId to PUT /v1/teams/{teamId}/players/{playerId}/photo within one hour.

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

Declare the exact photo file you will upload.

object
contentType
required

The photo must be exactly 300x300 pixels.

string
Allowed values: image/png image/jpeg
size
required

Byte count of the file. The limit is 500 KB.

integer format: int32
>= 1 <= 500000
sha256
required

Lowercase hexadecimal SHA-256 of the exact bytes you will PUT.

string

Created

Media typeapplication/json
object
uploadId
required

Send it as uploadId to the PUT route of the same image.

number format: double
url
required

Signed URL for one PUT of the exact bytes.

string
expiresAt
required

Time after which url no longer accepts the PUT.

string
headers
required
object
x-amz-checksum-sha256
required

Base64 SHA-256 of the file. Send it unchanged with the PUT.

string
Examplegenerated
{
"uploadId": 1,
"url": "example",
"expiresAt": "example",
"headers": {
"x-amz-checksum-sha256": "example"
}
}