List a blank's variants
const url = 'https://api.pixonaut.app/v1/blanks/example/variants?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/variants?lang=en' \ --header 'Authorization: Bearer <token>'Operation ID: blanks.variants.list
Every purchasable combination of the blank’s options, such as Color × Size, in the blank’s order, retired ones included. Each carries its ref, the id an order or render names it by; its options; whether it is retired, and why; and the views it has a photo in. A retired variant still resolves for the orders that name it, and a new order or render naming it is refused. A blank with no options has one variant, with none. With lang, every option, value and view is named as that language reads it, in each place it appears: the blank’s name 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 axes and variants
object
The options the blank’s print areas change with, such as Size, in option order; empty for one print area per placement. Each placement’s areas names a row of these.
The blank’s option axes, in the order the shopper sees them.
The blank’s options in that order, each with its values and how each value looks: a designer draws an option whose values have appearances as swatches.
object
Each value’s appearance, by value: every value is named.
object
object
One #rrggbb colour, or two for a heather or two-tone, drawn half and half.
object
The picture, opened with no key. It stays valid for at least 30 days and at most 60, and any cache may keep it that long.
Whether a product in each value is light or dark, by value: the tone set on its appearance, else its colour fill’s, else light. Every value of values is named. On a variant of a dark value a template’s on-dark values are used.
object
object
object
object
The views it has a photo in, in the blank’s order: each view whose photo of its row shows it.
object
Examples
Example
{ "areasVaryBy": [ "Size" ], "axes": [ "Color", "Size" ], "options": [ { "appearances": { "Heather Forest": { "colours": [ "#2f4a3a", "#5c7564" ], "kind": "fill" }, "Red": { "colours": [ "#b3261e" ], "kind": "fill" } }, "name": "Color", "tones": { "Heather Forest": "dark", "Red": "dark" }, "values": [ "Heather Forest", "Red" ] }, { "appearances": { "L": null, "M": null }, "name": "Size", "tones": { "L": "light", "M": "light" }, "values": [ "M", "L" ] } ], "variants": [ { "options": { "Color": "Heather Forest", "Size": "M" }, "ref": "v_3f9a0c1d2e4b5a6c", "retired": null, "views": [ { "label": "Front, flat lay", "placementId": "front", "viewId": "view-front-flat" } ] }, { "options": { "Color": "Heather Forest", "Size": "L" }, "ref": "v_7b2e1f0a9c8d4e3f", "retired": null, "views": [ { "label": "Front, flat lay", "placementId": "front", "viewId": "view-front-flat" } ] }, { "options": { "Color": "Red", "Size": "M" }, "ref": "v_0d4c8b7a6e5f1a2b", "retired": { "reason": "no_longer_sold" }, "views": [] } ]}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.
Questions? Write to [email protected].