Skip to content

Render a design on a product photo

GET
/v1/designs/{id}/mockup.png
curl --request GET \
--url https://api.pixonaut.app/v1/designs/example/mockup.png \
--header 'Authorization: Bearer <token>'

Operation ID: designs.mockup.get

The design drawn into the print area of its blank’s photo and blended with its shading, exactly as GET /t/{id}/mockup.png draws a template: what a store shows in its cart, order pages and emails once the customer has committed. The artwork is the design’s newest revision with a proof, as the customer was shown it. Left out, placementId is the design’s own placement, viewId the view its proof was previewed in, else the placement’s first view, and variant the variant its proof was previewed on, else the view’s default photo; mockupId names a photo instead. size caps the long edge in pixels. v, the design’s proofId, names the picture in the URL, so the answer is cached immutable; a v naming any other proof is refused proof_changed. An unknown design, placement, view, photo or variant, and a photo that is gone, are all not_found. A design with no proof, or whose personal data was erased, is proof_not_found, as its proof is. A design whose document the current model cannot read is refused design_doc_unreadable. A studio member reads it with their session, in the workspace the x-tenant-id header names.

id
required
string
placementId

A placement of the design’s blank. Left out, the design’s own.

string
>= 1 characters <= 64 characters

A placement of the design’s blank. Left out, the design’s own.

viewId

One of the placement’s views. Left out, the view the design’s proof was previewed in, else the placement’s first view.

string
>= 1 characters <= 64 characters

One of the placement’s views. Left out, the view the design’s proof was previewed in, else the placement’s first view.

variant

A variant ref of the blank: the view’s photo that shows it. Left out, the variant the design’s proof was previewed on, else the view’s default photo.

string
>= 1 characters <= 64 characters

A variant ref of the blank: the view’s photo that shows it. Left out, the variant the design’s proof was previewed on, else the view’s default photo.

mockupId

One of the placement’s photos, by id, in place of a view and variant.

string
>= 1 characters <= 64 characters

One of the placement’s photos, by id, in place of a view and variant.

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.

v

The design’s proofId. When it matches, the answer is cached immutable; when it names any other proof, it is refused proof_changed.

string

The design’s proofId. When it matches, the answer is cached immutable; when it names any other proof, it is refused proof_changed.

The design on the product photo

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, forbidden, feature_disabled, workspace_suspended

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.

Refused: not_found, proof_not_found, proof_changed

Media typeapplication/json
object
error
required
string

Examples

not_found

{
"error": "not_found"
}
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, design_doc_unreadable, asset_map_too_large, invalid_query

Media typeapplication/json
object
bytes

Always sent with asset_map_too_large.

number
error
required
string
maxBytes

Always sent with asset_map_too_large.

number

Examples

asset_map_too_large

{
"bytes": 0,
"error": "asset_map_too_large",
"maxBytes": 0
}
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.

The caller left before the render started

Media typeapplication/json
object
error
required
string

Examples

Exampleclient_closed_request

client_closed_request

{
"error": "client_closed_request"
}
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, db_error, render_failed. 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: 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