Skip to navigation

Retrieve choice image by size

Retrieve the JSON description or the binary of the requested choice format.

Use the Accept header to specify the response format. If you use application/json, the JSON representation of the resource will be returned. Otherwise, the image as a binary will be returned (if the MIME type matches with the stored one).

Authentication

AuthorizationBearer
Bearer token authentication. Tokens can be generated from the user account. Privileges needed may vary.
OR
Authorizationstring

A string representation of JWT containing at least two parameters:

ctx.user_id — user’s id

ctx.account_id — user’s default account id ctx.account_uid — user’s default account uid The usage of account_(u)id from JWT is discouraged, user can have access to multiple accounts, every endpoint has to be account aware if it’s needed.

This JWT must be signed by the appropriate authority.

Path parameters

image_idstringRequired
Unique ID for the image to retrieve.
sizeenumRequired

Image size to retrieve.

default is scaled to fit within a width of 230px and a height of 230px.

thumbnail is scaled so that the smallest image side equals the largest of either 80px wide or 80px in height and then cropped.

supersize is scaled so that the smallest image side equals the largest of either 310px wide or 233px in height and then cropped.

supermobile is scaled so that the smallest image side equals the largest of either 238px wide or 164px in height and then cropped.

supersizefit is scaled to fit within a width of 310px and a height of 233px.

supermobilefit is scaled to fit within a width of 238px and a height of 164px.

Response

OK
idstringOptional
Unique ID for the image.
srcstringOptional
URL for the image.
file_namestringOptional

File name for the image (specified when image is created).

widthintegerOptional
Width of the image in pixels.
heightintegerOptional
Height of the image in pixels.
media_typeenumOptional
The MIME type of the image.
Allowed values:
has_alphabooleanOptional

True if image has alpha channel (some degree of transparency). Otherwise, false.

avg_colorstringOptional
Average color of the image in hexadecimal format.