Skip to content

List a blank's variants

GET
/v1/blanks/{id}/variants
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.

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 axes and variants

Media typeapplication/json
object
areasVaryBy
required

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.

Array<string>
axes
required

The blank’s option axes, in the order the shopper sees them.

Array<string>
options
required

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.

Array<object>
object
appearances
required

Each value’s appearance, by value: every value is named.

object
key
additional properties
One of:
object
colours
required

One #rrggbb colour, or two for a heather or two-tone, drawn half and half.

Array<string>
>= 1 items <= 2 items
kind
required
string
Allowed values: fill
name
required
string
>= 1 characters <= 80 characters
tones
required

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
key
additional properties
string
values
required
Array<string>
variants
required
Array<object>
object
options
required
object
key
additional properties
string
>= 1 characters <= 80 characters
ref
required
string
>= 3 characters
retired
required
object
reason
required
string
views
required

The views it has a photo in, in the blank’s order: each view whose photo of its row shows it.

Array<object>
object
label
required
string
placementId
required
string
viewId
required
string

Examples

Exampleexample

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": []
}
]
}
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.

Questions? Write to [email protected].

Status · Terms of service · Privacy policy · Subprocessors