Fetch a catalogue image
const url = 'https://api.pixonaut.app/i/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.pixonaut.app/i/exampleOperation ID: catalogueImages.get
A library picture’s preview, a drawing of a design’s revision, a blank mockup’s photo, the image an option value is drawn as, a photo of a view of several placements, a view’s or region’s mask, or a published template’s preview, through the link a read of blanks, templates, assets or designs answered with (thumbnailUrl, previewUrl, an asset’s or a design’s pictureUrl, a showcase’s previewUrl, a mockup’s mount.url, an image appearance’s url, a view’s photo url or region maskUrl). The token in the path is signed by the api; no key is needed, so an image element can load it. A thumbnail, preview or picture link expires within two hours and only the caller’s browser may cache it. A mount.url, an appearance’s url, a view’s photo url or a maskUrl stays valid for at least 30 days and at most 60, and any cache may keep it until then; it stops opening once the mockup’s photo is replaced. A link to a mockup the blank no longer has, to a version no longer published, or to a design whose personal data was erased, does not open; a design’s link opens the revision it was minted for alone, drawn as that revision’s image is; a showcase’s link naming a set the version does not hold is 404 showcase_not_found.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”The file’s bytes
Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
The uploaded file’s height in pixels, when it is known. The bytes served may be a smaller preview.
The uploaded file’s width in pixels, when it is known. The bytes served may be a smaller preview.
The caller’s copy, named by its ETag, is current
Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
The token does not verify or has expired, or the image it names is gone (plain text), or showcase_not_found: the template holds no showcase with the id showcase names
object
Examples
showcase_not_found
{ "error": "showcase_not_found"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: asset_map_too_large, design_doc_unreadable
object
Always sent with asset_map_too_large.
Always sent with asset_map_too_large.
Examples
asset_map_too_large
{ "bytes": 0, "error": "asset_map_too_large", "maxBytes": 0}design_doc_unreadable
{ "error": "design_doc_unreadable"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: rate_limited
object
Examples
rate_limited
{ "error": "rate_limited"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
The caller left before the render started
object
Examples
client_closed_request
{ "error": "client_closed_request"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: template_defaults_invalid, db_error, render_failed. A request that failed unexpectedly answers as text instead.
object
Examples
db_error
{ "error": "db_error"}render_failed
{ "error": "render_failed"}template_defaults_invalid
{ "error": "template_defaults_invalid"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: print_box_unavailable, assets_unavailable, preview_unavailable
object
Examples
assets_unavailable
{ "error": "assets_unavailable"}preview_unavailable
{ "error": "preview_unavailable"}print_box_unavailable
{ "error": "print_box_unavailable"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Questions? Write to [email protected].