Skip to content

Render a view of a blank with its prints

GET
/v1/blanks/{id}/views/{viewId}/mockup.png
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.

id
required

The blank.

string
>= 1 characters <= 64 characters

The blank.

viewId
required

One of the blank’s views.

string
>= 1 characters <= 64 characters

One of the blank’s views.

variant

A variant ref of the blank: the view’s photo of it, each region’s print at its size.

string
>= 1 characters <= 64 characters

A variant ref of the blank: the view’s photo of it, each region’s print at its size.

prints

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.

string
<= 1024 characters

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.

size

The long edge in pixels, clamped to the sizes the api renders.

string

The long edge in pixels, clamped to the sizes the api renders.

The view with its prints

Media typeimage/png
string
X-Request-Id
required
string

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

X-Request-Id
required
string

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

Media typeapplication/json
object
error
required
string

Examples

Exampleunauthorized

unauthorized

{
"error": "unauthorized"
}
X-Request-Id
required
string

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

Media typeapplication/json
object
error
required
string
feature

The feature the tenant does not have. Always sent with feature_disabled.

string

Examples

feature_disabled

{
"error": "feature_disabled",
"feature": "api"
}
X-Request-Id
required
string

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

X-Request-Id
required
string

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

Media typeapplication/json
object
error
required
string
reason

Always sent with unknown_variant, variant_retired, variant_has_no_photo, prints_invalid.

string
ref

Always sent with unknown_variant.

string
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.

string
view

The view’s label. Always sent with variant_has_no_photo.

string
viewId

Always sent with variant_has_no_photo.

string

Examples

invalid_query

{
"error": "invalid_query"
}
X-Request-Id
required
string

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

Media typeapplication/json
object
error
required
string

Examples

Examplerate_limited

rate_limited

{
"error": "rate_limited"
}
X-Request-Id
required
string

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
error
required
string

Examples

artwork_decode_failed

{
"error": "artwork_decode_failed"
}
X-Request-Id
required
string

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

Media typeapplication/json
object
error
required
string

Examples

asset_store_unavailable

{
"error": "asset_store_unavailable"
}
X-Request-Id
required
string

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].

Status · Terms of service · Privacy policy · Subprocessors