List the templates that fit a placement
const url = 'https://api.pixonaut.app/v1/blanks/example/placements/example/fitting-templates?page=1&pageSize=50&status=all';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/placements/example/fitting-templates?page=1&pageSize=50&status=all' \ --header 'Authorization: Bearer <token>'Operation ID: blanks.placements.fittingTemplates.list
Every one of the tenant’s templates, with the verdict for its artwork at the size it would print at on this placement. It answers geometry, not whether the pairing is sold. status defaults to live templates; q keeps the templates whose name holds it, case aside. A placement without usable measurements is answered as not found. On a placement whose print area changes with an option, sizes names the option values each template can and can’t print at.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”The page to read, from 1; the first when left out.
The page to read, from 1; the first when left out.
Responses
Section titled “Responses”A page of templates with their verdicts
object
object
A link to the template’s preview, as the template search gives one, opening with no key for an hour or two. Null for a draft never published, which has no version to draw.
object
The ratio’s height part. Positive.
The ratio’s width part. Positive.
The blank’s sizes the template can and can’t print at, on a placement whose print area changes with an option (coverage full, or a position that prints one size only). Both empty on a placement whose area doesn’t, which the template fits at every size.
object
The sizes the template prints at here, by option value, such as S; several options’ values are joined with /.
The sizes the template can’t print at here: a design at one is refused when committed.
Examples
Example
{ "items": [ { "name": "T-shirt print, front", "previewUrl": "https://api.pixonaut.example/i/eyJhdWQiOiJjYXRhbG9ndWUtaW1hZ2UifQ.c2lnbmF0dXJl", "printHeightMm": 360, "printWidthMm": 280, "ratio": { "h": 360, "w": 280 }, "ratioTolerance": 0, "sizes": { "fits": [], "misfits": [] }, "status": "live", "templateId": "tshirt-basic@2", "verdict": { "legal": true } } ], "page": 1, "pageSize": 50, "total": 1}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, forbidden, feature_disabled, 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: invalid_query
object
Examples
invalid_query
{ "error": "invalid_query"}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.
Questions? Write to [email protected].