Skip to content

List a blank's placements, views and mockups

GET
/v1/blanks/{id}/mockups
curl --request GET \
--url 'https://api.pixonaut.app/v1/blanks/example/mockups?lang=en' \
--header 'Authorization: Bearer <token>'

Operation ID: blanks.mockups.list

The placement and mockup ids a mockup render names, each placement’s views with their labels, photo sizes and print rects, and each view’s photos (the mockups) with the variants each shows, in stored order. The order is not an identifier: it changes when the blank is reordered in the studio, so persist the ids. A placement whose stored sizes are unusable is left out. Each placement carries the largest and default print box, whether a print covers its whole area, the bleed and safe area it prints with (its own, else the tenant’s default) and its print method. Each mockup carries a thumbnailUrl, a link to its photo that opens with no key for an hour or two, and a mount: what a storefront passes to the designer as one of mockups, with a photo link that stays valid for at least 30 days. With lang, each view’s label is the blank’s for it in that language, else its own.

id
required
string
lang

The language the blank’s options, their values and its views are named in, one of en, sv, de, fr, es, nl, da, nb, fi: each name the blank has in it, else its own. Absent, every name is its own.

string
Allowed values: en sv de fr es nl da nb fi

The language the blank’s options, their values and its views are named in, one of en, sv, de, fr, es, nl, da, nb, fi: each name the blank has in it, else its own. Absent, every name is its own.

The blank’s placements, each with its views and their photos

Media typeapplication/json
object
placements
required
Array<object>
object
areas
required

The placement’s print area per row of the options the blank’s print areas change with (areasVaryBy on the variants read): a design on a variant is printed at the area of that variant’s row, at its usual size when none is chosen. Empty when the area is the same at every size.

Array<object>
object
heightMm
required
number
row
required
object
key
additional properties
string
usualHeightMm
required
number
usualWidthMm
required
number
widthMm
required
number
bleedMm
required
number
coverage
required

full when a print covers the placement’s whole area, within when it is placed inside it.

string
defaultHeightMm
required
number
defaultWidthMm
required
number
fillColour

The colour, #rrggbb, a view of several placements shows in this placement’s region while it has no print. Absent when the placement names none.

string
id
required
string
linkWith

The placement it is linked with by default, and whether its print is mirrored then: a designer linking the blank’s suggested groups joins the two. Absent when it suggests none.

object
mirror
required

Whether this placement’s print is mirrored left to right when the two are linked.

boolean
placementId
required

The id of the blank’s other placement it is linked with by default.

string
>= 1 characters
maxHeightMm
required
number
maxWidthMm
required
number
name
required
string
printMethod

How the placement is printed: its own, else its blank category’s. Absent when neither names one.

string
safeAreaMm
required
number
shape

Where on the product a print may go: the outline, then each cut-out, in fractions of the print area, filled even-odd. A preview clips the print to it and draws it as a guide. Absent when the whole rectangle is printed.

object
cutByPrintShop

True when the print shop cuts the product to this shape: the outline and the cut-outs go into the print file as its cut line. Omitted, the product already has the shape.

boolean
dFrac
required

The shape as SVG path data in fractions of the print area, 0 to 1 across and down (curves, no arcs): its first subpath the outline, every further one a cut-out, filled even-odd, each subpath closed.

string
<= 65536 characters
views
required
Array<object>
object
id
required
string
label
required
string
maskUrl

The region’s mask, the view’s photo size, opened with no key: where it is light the print shows, where it is dark the print is hidden. Absent hides nothing. Valid as long as a photo’s url.

string
mesh

Control points the print is laid through or, marked cut, cut to, rows from its top edge and points from its left, as [x, y] in the photo’s original pixels; at least 2 and at most 33 along each side. Absent, the print is laid in the rect.

object
cut

The points draw a shape to cut the print to (CONTEXT.md → Region cut) rather than a mesh to bend it through: the print is laid flat over the box the points span, at its own proportions and filling it, and everything outside the shape the outer points draw is cut away. Absent, the print is warped through the mesh.

boolean
points
required

The rows of control points, from the print’s top edge.

Array<Array<Array<number>>>
>= 2 items <= 33 items
photoSizePx
required

The pixel size every photo of the view has; null while it has none.

object
heightPx
required

The photo’s height, in pixels.

integer
> 0 <= 12000
widthPx
required

The photo’s width, in pixels.

integer
> 0 <= 12000
photos
required
Array<object>
object
height
required

The photo’s height in pixels; null when width is.

integer | null
> 0
id
required

The photo’s id: the mockupId a render names.

string
mount
required

What the designer mounts this mockup with, as one of mockups with its view’s label. Null when the photo has not finished uploading, its size is not known, or its view has no print area marked.

object
displacementStrength

How far the photo’s folds move the design, more than 0 and at most 1. null moves nothing. Omitted, its category’s, else nothing.

number | null
> 0 <= 1
photoSizePx
required

The size of the photo placementRectPx is measured in. The url may serve a smaller copy of it; the designer places the rect on whatever size arrives.

object
h
required
integer
> 0
w
required
integer
> 0
placementRectPx
required

Where the print area sits on every photo of the view, in the original photo’s pixels; null until it is marked.

object
h
required

The print area’s height, in pixels.

integer
<= 12000
w
required

The print area’s width, in pixels.

integer
<= 12000
x
required

The print area’s left edge, in pixels from the photo’s left.

integer
<= 12000
y
required

The print area’s top edge, in pixels from the photo’s top.

integer
<= 12000
shadingStrength

How strongly the photo’s light and shade carry onto the design, 0 (none) to 1 (all). Omitted, its category’s, else the default strength.

number
<= 1
textureStrength

How strongly the photo’s fine detail, such as a weave or a grain, shows through the print, 0 (none) to 1 (all). Omitted, its category’s, else, as for null, the default strength.

number | null
<= 1
url
required

The photo, opened with no key. It stays valid for at least 30 days and at most 60, and any cache may keep it that long; it stops opening once the mockup’s photo is replaced. Read the blank’s mockups again within 30 days for a fresh one.

string
warp
One of:
object
curvature
required

How far round the product the design wraps, more than 0 and at most 1. Flat is a null warp, not 0.

number
> 0 <= 1
edgeFalloff

How much the design darkens toward the product’s sides, 0 (none) to 1 (black at the edge). Omitted, none.

number
<= 1
kind
required

The kind of wrap; cylinder is the only one.

string
thumbnailUrl
required
string
variantRefs
required

The refs of the blank’s variants the photo shows, so a designer picks a view’s photo of the variant chosen. Empty when it names none: on a blank with no Color axis a photo shows every variant.

Array<string>
width
required

The photo’s width in pixels, so a host reserves the preview’s shape before it loads; null while the photo has not finished uploading or its size is not known.

integer | null
> 0
piece

A pattern piece of the view’s UV pass, 1 to 254: the region’s print is read through the pixels the pass marks with it, in place of a mesh.

integer
>= 1 <= 254
pieceSizeMm

The print size on the model of the piece the region’s printWindowMm lies on, in mm. Present with a print window only.

object
heightMm
required
number
> 0
widthMm
required
number
> 0
placementRectPx
required

Where the print sits on every photo of the view, in the photo’s pixels; null while it is not marked.

object
h
required

The print area’s height, in pixels.

integer
<= 12000
w
required

The print area’s width, in pixels.

integer
<= 12000
x
required

The print area’s left edge, in pixels from the photo’s left.

integer
<= 12000
y
required

The print area’s top edge, in pixels from the photo’s top.

integer
<= 12000
printWindowMm

The part of the region’s piece its print covers, in millimetres on the piece’s unwrapped surface from its top-left corner, such as a square on the side of a cup: the print is read inside it, at the window’s size, and the product shows plain outside it. It lies inside its piece, and needs the piece’s size on the view. Absent, the print covers the whole piece.

object
heightMm
required

The window’s height, in mm.

number
> 0
widthMm
required

The window’s width, in mm.

number
> 0
xMm
required

The window’s left edge, in mm from the piece’s left.

number
yMm
required

The window’s top edge, in mm from the piece’s top.

number
sourceWindowMm

The piece of the placement’s print the region shows, in millimetres from the print’s top-left corner, such as a roll’s window; clamped to the print when the print is smaller. Absent, the region shows the whole print at the size of the render’s variant.

object
heightMm
required

The window’s height, in mm.

number
> 0
widthMm
required

The window’s width, in mm.

number
> 0
xMm
required

The window’s left edge, in mm from the print’s left.

number
yMm
required

The window’s top edge, in mm from the print’s top.

number
uvPassUrls

The maps the view was rendered with from a 3D model of the product, each the view’s photo size, opened with no key: a region naming a piece is read through them. Absent on a view of photos. Valid as long as a photo’s url.

object
multiply
required

The multiply pass: the product’s shadows and folds.

string
screen
required

The screen pass: the product’s highlights.

string
uv
required

The 16-bit UV pass: for each pixel, its piece (blue) and where across (red) and down (green) that piece’s print it reads.

string
views
required

The blank’s views of several placements, in order: each region with its placement, rect, mesh, window and mask, and each photo with its variants and its looks per region.

Array<object>

A view of the blank that shows two placements or more on one photo, such as a sweater’s front and sleeves.

object
id
required

The view’s id, unique within the blank.

string
label
required
string
photoSizePx
required

The pixel size every photo of the view has; null while it has none.

object
heightPx
required

The photo’s height, in pixels.

integer
> 0 <= 12000
widthPx
required

The photo’s width, in pixels.

integer
> 0 <= 12000
photos
required

The view’s photos whose upload has finished, in stored order.

Array<object>
object
height
required
integer
> 0
id
required

The photo’s id, unique within the blank.

string
regions
required

The photo’s looks in each region it sets any for; a region left out takes the defaults.

Array<object>
object
displacementStrength

How far the photo’s folds move the design, more than 0 and at most 1. null moves nothing. Omitted, its category’s, else nothing.

number | null
> 0 <= 1
placementId
required

The region, by its placement.

string
>= 1 characters
shadingStrength

How strongly the photo’s light and shade carry onto the design, 0 (none) to 1 (all). Omitted, its category’s, else the default strength.

number
<= 1
textureStrength

How strongly the photo’s fine detail, such as a weave or a grain, shows through the print, 0 (none) to 1 (all). Omitted, its category’s, else, as for null, the default strength.

number | null
<= 1
warp
One of:
object
curvature
required

How far round the product the design wraps, more than 0 and at most 1. Flat is a null warp, not 0.

number
> 0 <= 1
edgeFalloff

How much the design darkens toward the product’s sides, 0 (none) to 1 (black at the edge). Omitted, none.

number
<= 1
kind
required

The kind of wrap; cylinder is the only one.

string
url
required

The photo, opened with no key. It stays valid for at least 30 days and at most 60, and any cache may keep it that long; it stops opening once the view no longer shows that photo.

string
variantRefs
required

The refs of the blank’s variants the photo shows. Empty when it names none: on a blank with no Color axis a photo shows every variant.

Array<string>
width
required
integer
> 0
regions
required

The view’s print regions, in the order they are drawn.

Array<object>
object
maskUrl

The region’s mask, the view’s photo size, opened with no key: where it is light the print shows, where it is dark the print is hidden. Absent hides nothing. Valid as long as a photo’s url.

string
mesh

Control points the print is laid through or, marked cut, cut to, rows from its top edge and points from its left, as [x, y] in the photo’s original pixels; at least 2 and at most 33 along each side. Absent, the print is laid in the rect.

object
cut

The points draw a shape to cut the print to (CONTEXT.md → Region cut) rather than a mesh to bend it through: the print is laid flat over the box the points span, at its own proportions and filling it, and everything outside the shape the outer points draw is cut away. Absent, the print is warped through the mesh.

boolean
points
required

The rows of control points, from the print’s top edge.

Array<Array<Array<number>>>
>= 2 items <= 33 items
piece

A pattern piece of the view’s UV pass, 1 to 254: the region’s print is read through the pixels the pass marks with it, in place of a mesh.

integer
>= 1 <= 254
pieceSizeMm

The print size on the model of the piece the region’s printWindowMm lies on, in mm. Present with a print window only.

object
heightMm
required
number
> 0
widthMm
required
number
> 0
placementId
required

The placement whose print the region shows.

string
printWindowMm

The part of the region’s piece its print covers, in millimetres on the piece’s unwrapped surface from its top-left corner, such as a square on the side of a cup: the print is read inside it, at the window’s size, and the product shows plain outside it. It lies inside its piece, and needs the piece’s size on the view. Absent, the print covers the whole piece.

object
heightMm
required

The window’s height, in mm.

number
> 0
widthMm
required

The window’s width, in mm.

number
> 0
xMm
required

The window’s left edge, in mm from the piece’s left.

number
yMm
required

The window’s top edge, in mm from the piece’s top.

number
rectPx
required

Where the region’s print sits on every photo, in the photo’s original pixels; null while it is not marked.

object
h
required

The print area’s height, in pixels.

integer
<= 12000
w
required

The print area’s width, in pixels.

integer
<= 12000
x
required

The print area’s left edge, in pixels from the photo’s left.

integer
<= 12000
y
required

The print area’s top edge, in pixels from the photo’s top.

integer
<= 12000
sourceWindowMm

The piece of the placement’s print the region shows, in millimetres from the print’s top-left corner, such as a roll’s window; clamped to the print when the print is smaller. Absent, the region shows the whole print at the size of the render’s variant.

object
heightMm
required

The window’s height, in mm.

number
> 0
widthMm
required

The window’s width, in mm.

number
> 0
xMm
required

The window’s left edge, in mm from the print’s left.

number
yMm
required

The window’s top edge, in mm from the print’s top.

number
uvPassUrls

The maps the view was rendered with from a 3D model of the product, each the view’s photo size, opened with no key: a region naming a piece is read through them. Absent on a view of photos. Valid as long as a photo’s url.

object
multiply
required

The multiply pass: the product’s shadows and folds.

string
screen
required

The screen pass: the product’s highlights.

string
uv
required

The 16-bit UV pass: for each pixel, its piece (blue) and where across (red) and down (green) that piece’s print it reads.

string

Examples

Exampleexample

Example

{
"placements": [
{
"areas": [
{
"heightMm": 320,
"row": {
"Size": "S"
},
"usualHeightMm": 320,
"usualWidthMm": 250,
"widthMm": 250
},
{
"heightMm": 360,
"row": {
"Size": "M"
},
"usualHeightMm": 360,
"usualWidthMm": 280,
"widthMm": 280
}
],
"bleedMm": 3,
"coverage": "within",
"defaultHeightMm": 360,
"defaultWidthMm": 280,
"id": "front",
"maxHeightMm": 360,
"maxWidthMm": 280,
"name": "Front",
"printMethod": "dtg",
"safeAreaMm": 5,
"views": [
{
"id": "view-front-flat",
"label": "Front, flat lay",
"photoSizePx": {
"heightPx": 3000,
"widthPx": 2400
},
"photos": [
{
"height": 3000,
"id": "mock-front",
"mount": {
"displacementStrength": 0.4,
"photoSizePx": {
"h": 3000,
"w": 2400
},
"placementRectPx": {
"h": 1130,
"w": 880,
"x": 760,
"y": 640
},
"shadingStrength": 0.6,
"url": "https://api.pixonaut.example/i/eyJhdWQiOiJjYXRhbG9ndWUtaW1hZ2UiLCJwIjoxfQ.c2lnbmF0dXJl"
},
"thumbnailUrl": "https://api.pixonaut.example/i/eyJhdWQiOiJjYXRhbG9ndWUtaW1hZ2UifQ.c2lnbmF0dXJl",
"variantRefs": [
"v_white_s",
"v_white_m"
],
"width": 2400
}
],
"placementRectPx": {
"h": 1130,
"w": 880,
"x": 760,
"y": 640
}
}
]
},
{
"areas": [],
"bleedMm": 3,
"coverage": "within",
"defaultHeightMm": 300,
"defaultWidthMm": 250,
"id": "back",
"maxHeightMm": 360,
"maxWidthMm": 280,
"name": "Back",
"printMethod": "dtg",
"safeAreaMm": 5,
"views": [
{
"id": "view-back-flat",
"label": "Back, flat lay",
"photoSizePx": {
"heightPx": 3000,
"widthPx": 2400
},
"photos": [
{
"height": 3000,
"id": "mock-back",
"mount": {
"photoSizePx": {
"h": 3000,
"w": 2400
},
"placementRectPx": {
"h": 1060,
"w": 880,
"x": 760,
"y": 600
},
"url": "https://api.pixonaut.example/i/eyJhdWQiOiJjYXRhbG9ndWUtaW1hZ2UiLCJwIjoxfQ.c2lnbmF0dXJl"
},
"thumbnailUrl": "https://api.pixonaut.example/i/eyJhdWQiOiJjYXRhbG9ndWUtaW1hZ2UifQ.c2lnbmF0dXJl",
"variantRefs": [
"v_white_s",
"v_white_m"
],
"width": 2400
}
],
"placementRectPx": {
"h": 1060,
"w": 880,
"x": 760,
"y": 600
}
}
]
}
],
"views": [
{
"id": "view_3f9a1c2b7d4e8a60",
"label": "Whole tee",
"photoSizePx": {
"heightPx": 3000,
"widthPx": 2400
},
"photos": [
{
"height": 3000,
"id": "mock-whole",
"regions": [
{
"placementId": "back",
"shadingStrength": 0.5
}
],
"url": "https://api.pixonaut.example/i/eyJhdWQiOiJjYXRhbG9ndWUtaW1hZ2UiLCJwIjoyfQ.c2lnbmF0dXJl",
"variantRefs": [
"v_white_s",
"v_white_m"
],
"width": 2400
}
],
"regions": [
{
"placementId": "front",
"rectPx": {
"h": 1130,
"w": 880,
"x": 760,
"y": 640
}
},
{
"maskUrl": "https://api.pixonaut.example/i/eyJhdWQiOiJjYXRhbG9ndWUtaW1hZ2UiLCJwIjozfQ.c2lnbmF0dXJl",
"placementId": "back",
"rectPx": {
"h": 360,
"w": 300,
"x": 1900,
"y": 700
},
"sourceWindowMm": {
"heightMm": 140,
"widthMm": 120,
"xMm": 0,
"yMm": 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: invalid_query

Media typeapplication/json
object
error
required
string
reason

Always sent with invalid_query.

string

Examples

Exampleinvalid_query

invalid_query

{
"error": "invalid_query",
"reason": "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.

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

Media typeapplication/json
object
error
required
string

Examples

Examplenot_found

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: 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: db_error. A request that failed unexpectedly answers as text instead.

object
error
required
string

Examples

Exampledb_error

db_error

{
"error": "db_error"
}
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

Media typeapplication/json
object
error
required
string

Examples

Exampleprint_box_unavailable

print_box_unavailable

{
"error": "print_box_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