Create an image template
POST/v1/image-templates
const url = 'https://api.ligr.live/rest/v1/image-templates';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","width":1,"height":1,"entityType":"player","sport":"football"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ligr.live/rest/v1/image-templates \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "width": 1, "height": 1, "entityType": "player", "sport": "football" }'Creates an image template. The size, the entity type and the sport cannot change later.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Create an image template. The size, the entity type and the sport cannot change later.
object
The kind of entity a template holds one image for.
Responses
Section titled “Responses”Created
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
Entity identifier
Pixel width every image of the template must have.
Pixel height every image of the template must have.
The kind of entity a template holds one image for.
URL of the default image. Null: the template has no default image.
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.
Example
{ "entityType": "player", "sport": "football"}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"}Image template not found
object
Examplegenerated
{ "message": "example"}Organization has made too many requests
object
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
object
Examplegenerated
{ "message": "example"}