Skip to content

Set the default image

PUT/v1/image-templates/{imageTemplateId}/default-image

PUT
/v1/image-templates/{imageTemplateId}/default-image
curl --request PUT \
--url https://api.ligr.live/rest/v1/image-templates/1/default-image \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "uploadId": 1 }'

Sets the default image of a template from a completed upload. The API checks the size, the SHA-256, the image type and the pixel size of the bytes. Each upload sets a default image one time. The response has the same shape as an item of GET /v1/image-templates.

imageTemplateId
required

Entity identifier

integer format: int32
>= 1

The image template id

Media typeapplication/json

Set the default image from a completed upload.

object
uploadId
required

The uploadId from the POST …/uploads route of the same image.

number format: double
Examplegenerated
{
"uploadId": 1
}

Ok

Media typeapplication/json

One image slot, such as a player cut-out or a team banner, with a fixed pixel size. Each player, team or competition of the entity type can hold one image for the template.

object
id
required

Entity identifier

integer format: int32
>= 1
name
required
string
width
required

Pixel width every image of the template must have.

number format: double
height
required

Pixel height every image of the template must have.

number format: double
entityType
required

The kind of entity a template holds one image for.

string
Allowed values: player team competition
sport
required
string
Allowed values: football rugbyUnion rugbyLeague netball cricket futsal iceHockey fieldHockey waterPolo handBall lacrosse touchFootball ausRules basketball rugbySevens gridiron volleyball baseball tennis
defaultImageUrl
required

URL of the default image. Null: the template has no default image.

string
nullable
defaultFileId
required

File id of the default image. Send it as defaultFileId on a Rive asset exposure to use it as the fallback image. Null: the template has no default image.

number format: double
nullable
createdAt
required
string
updatedAt
required
string
Example
{
"entityType": "player",
"sport": "football"
}

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

Image template not found

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

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