List a blank's placements, views and mockups
const url = 'https://api.pixonaut.app/v1/blanks/example/mockups?lang=en';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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”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 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.
Responses
Section titled “Responses”The blank’s placements, each with its views and their photos
object
object
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.
object
object
full when a print covers the placement’s whole area, within when it is placed inside it.
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.
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
Whether this placement’s print is mirrored left to right when the two are linked.
The id of the blank’s other placement it is linked with by default.
How the placement is printed: its own, else its blank category’s. Absent when neither names one.
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
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.
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.
object
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.
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
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.
The rows of control points, from the print’s top edge.
The pixel size every photo of the view has; null while it has none.
object
The photo’s height, in pixels.
The photo’s width, in pixels.
object
The photo’s height in pixels; null when width is.
The photo’s id: the mockupId a render names.
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
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.
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
Where the print area sits on every photo of the view, in the original photo’s pixels; null until it is marked.
object
The print area’s height, in pixels.
The print area’s width, in pixels.
The print area’s left edge, in pixels from the photo’s left.
The print area’s top edge, in pixels from the photo’s top.
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.
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.
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.
object
How far round the product the design wraps, more than 0 and at most 1. Flat is a null warp, not 0.
How much the design darkens toward the product’s sides, 0 (none) to 1 (black at the edge). Omitted, none.
The kind of wrap; cylinder is the only one.
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.
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.
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.
The print size on the model of the piece the region’s printWindowMm lies on, in mm. Present with a print window only.
object
Where the print sits on every photo of the view, in the photo’s pixels; null while it is not marked.
object
The print area’s height, in pixels.
The print area’s width, in pixels.
The print area’s left edge, in pixels from the photo’s left.
The print area’s top edge, in pixels from the photo’s top.
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
The window’s height, in mm.
The window’s width, in mm.
The window’s left edge, in mm from the piece’s left.
The window’s top edge, in mm from the piece’s top.
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
The window’s height, in mm.
The window’s width, in mm.
The window’s left edge, in mm from the print’s left.
The window’s top edge, in mm from the print’s top.
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
The multiply pass: the product’s shadows and folds.
The screen pass: the product’s highlights.
The 16-bit UV pass: for each pixel, its piece (blue) and where across (red) and down (green) that piece’s print it reads.
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.
A view of the blank that shows two placements or more on one photo, such as a sweater’s front and sleeves.
object
The view’s id, unique within the blank.
The pixel size every photo of the view has; null while it has none.
object
The photo’s height, in pixels.
The photo’s width, in pixels.
The view’s photos whose upload has finished, in stored order.
object
The photo’s id, unique within the blank.
The photo’s looks in each region it sets any for; a region left out takes the defaults.
object
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.
The region, by its placement.
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.
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.
object
How far round the product the design wraps, more than 0 and at most 1. Flat is a null warp, not 0.
How much the design darkens toward the product’s sides, 0 (none) to 1 (black at the edge). Omitted, none.
The kind of wrap; cylinder is the only one.
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.
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.
The view’s print regions, in the order they are drawn.
object
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.
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
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.
The rows of control points, from the print’s top edge.
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.
The print size on the model of the piece the region’s printWindowMm lies on, in mm. Present with a print window only.
object
The placement whose print the region shows.
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
The window’s height, in mm.
The window’s width, in mm.
The window’s left edge, in mm from the piece’s left.
The window’s top edge, in mm from the piece’s top.
Where the region’s print sits on every photo, in the photo’s original pixels; null while it is not marked.
object
The print area’s height, in pixels.
The print area’s width, in pixels.
The print area’s left edge, in pixels from the photo’s left.
The print area’s top edge, in pixels from the photo’s top.
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
The window’s height, in mm.
The window’s width, in mm.
The window’s left edge, in mm from the print’s left.
The window’s top edge, in mm from the print’s top.
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
The multiply pass: the product’s shadows and folds.
The screen pass: the product’s highlights.
The 16-bit UV pass: for each pixel, its piece (blue) and where across (red) and down (green) that piece’s print it reads.
Examples
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 } } ] } ]}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: invalid_query
object
Always sent with invalid_query.
Examples
invalid_query
{ "error": "invalid_query", "reason": "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: 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, forbidden, workspace_suspended
object
The feature the tenant does not have. Always sent with feature_disabled.
Examples
feature_disabled
{ "error": "feature_disabled", "feature": "api"}forbidden
{ "error": "forbidden"}origin_forbidden
{ "error": "origin_forbidden"}workspace_suspended
{ "error": "workspace_suspended"}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: not_found
object
Examples
not_found
{ "error": "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: 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: db_error. A request that failed unexpectedly answers as text instead.
object
Examples
db_error
{ "error": "db_error"}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
object
Examples
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].