Render a view of a blank with its prints
const url = 'https://api.pixonaut.app/v1/blanks/example/views/example/mockup.png';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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/v1/blanks/example/views/example/mockup.png \ --header 'Authorization: Bearer <token>'Operation ID: blanks.views.mockup.get
The view’s photo with a published template drawn in each of its regions, as a PNG a storefront shows: a sweater’s front and both sleeves on one photo, a roll’s window of its print. A region with no template shows its placement’s fill colour, or the photo alone. An unknown blank, view or template, and a photo that is gone, are 404.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The blank.
The blank.
One of the blank’s views.
One of the blank’s views.
Query Parameters
Section titled “Query Parameters”A variant ref of the blank: the view’s photo of it, each region’s print at its size.
A variant ref of the blank: the view’s photo of it, each region’s print at its size.
What each region shows: placementId:templateId@version pairs, comma-separated, each a published template. A region left out shows its placement’s fill colour, or the photo alone.
What each region shows: placementId:templateId@version pairs, comma-separated, each a published template. A region left out shows its placement’s fill colour, or the photo alone.
The long edge in pixels, clamped to the sizes the api renders.
The long edge in pixels, clamped to the sizes the api renders.
Responses
Section titled “Responses”The view with its prints
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’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.
Refused: unauthorized
object
Examples
unauthorized
{ "error": "unauthorized"}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: origin_forbidden, feature_disabled
object
The feature the tenant does not have. Always sent with feature_disabled.
Examples
feature_disabled
{ "error": "feature_disabled", "feature": "api"}origin_forbidden
{ "error": "origin_forbidden"}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.
No blank, view, photo or published template answers to these ids
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: mockup_rect_unusable, mockup_rect_outside_photo, mockup_placed_box_empty, photo_decode_failed, mockup_mesh_unusable, mockup_cut_unusable, mockup_mask_decode_failed, mockup_uv_decode_failed, mockup_uv_pass_mismatch, unknown_variant, variant_retired, variant_has_no_photo, prints_invalid, mockup_mask_unreadable, mockup_uv_unreadable, invalid_query
object
Always sent with unknown_variant, variant_retired, variant_has_no_photo, prints_invalid.
Always sent with unknown_variant.
With variant_retired: The retired variant’s ref. With variant_has_no_photo: The variant’s ref. Always sent with variant_retired, variant_has_no_photo.
The view’s label. Always sent with variant_has_no_photo.
Always sent with variant_has_no_photo.
Examples
invalid_query
{ "error": "invalid_query"}mockup_cut_unusable
{ "error": "mockup_cut_unusable"}mockup_mask_decode_failed
{ "error": "mockup_mask_decode_failed"}mockup_mask_unreadable
{ "error": "mockup_mask_unreadable"}mockup_mesh_unusable
{ "error": "mockup_mesh_unusable"}mockup_placed_box_empty
{ "error": "mockup_placed_box_empty"}mockup_rect_outside_photo
{ "error": "mockup_rect_outside_photo"}mockup_rect_unusable
{ "error": "mockup_rect_unusable"}mockup_uv_decode_failed
{ "error": "mockup_uv_decode_failed"}mockup_uv_pass_mismatch
{ "error": "mockup_uv_pass_mismatch"}mockup_uv_unreadable
{ "error": "mockup_uv_unreadable"}photo_decode_failed
{ "error": "photo_decode_failed"}prints_invalid
{ "error": "prints_invalid", "reason": "string"}unknown_variant
{ "error": "unknown_variant", "reason": "string", "ref": "string"}variant_has_no_photo
{ "error": "variant_has_no_photo", "reason": "string", "variant": "string", "view": "string", "viewId": "string"}variant_retired
{ "error": "variant_retired", "reason": "string", "variant": "string"}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.
Refused: artwork_decode_failed, encode_failed, downscale_size_overflow, input_too_large, mockup_warp_unreadable, mockup_mesh_unreadable, mockup_cut_unreadable, mockup_uv_view_missing, composite_failed, template_defaults_invalid, db_error. A request that failed unexpectedly answers as text instead.
object
Examples
artwork_decode_failed
{ "error": "artwork_decode_failed"}composite_failed
{ "error": "composite_failed"}db_error
{ "error": "db_error"}downscale_size_overflow
{ "error": "downscale_size_overflow"}encode_failed
{ "error": "encode_failed"}input_too_large
{ "error": "input_too_large"}mockup_cut_unreadable
{ "error": "mockup_cut_unreadable"}mockup_mesh_unreadable
{ "error": "mockup_mesh_unreadable"}mockup_uv_view_missing
{ "error": "mockup_uv_view_missing"}mockup_warp_unreadable
{ "error": "mockup_warp_unreadable"}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, asset_store_unavailable, assets_unavailable
object
Examples
asset_store_unavailable
{ "error": "asset_store_unavailable"}assets_unavailable
{ "error": "assets_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].