Skip to content

Find or create a standing design

POST
/v1/designs/standing
curl --request POST \
--url https://api.pixonaut.app/v1/designs/standing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "approve": true, "blankId": "blk_3f9a2c1d8e7b6a5f4c3d2e1f", "heightMm": 90, "placementId": "front", "templateId": "mug-wrap@4", "widthMm": 200 }'

Operation ID: designs.findOrCreateStanding

Finds the workspace’s standing design for a template version, blank, placement and print size, or makes it from the template version as its author left it: the workspace’s own design for a fixed product, which is ordered any number of times without reorder, each order reusing the print of its current revision. One live standing design per template version, blank, placement and size: the same request again answers the same design, 200 with created: false, and two sent at once make one. Made, it answers 201 with created: true. A rejected or deleted standing design is not found, and the next request makes another. blankId and placementId, both or neither, and widthMm and heightMm, both or neither, as on POST /v1/designs: no size is the placement’s default size, which finds the design naming that size made. On a blank whose print areas change with its size, variant or variantRow names the size it is for, as on POST /v1/designs, and one standing design is kept per size. A connected store finds only the standing designs its own keys made, and never the workspace’s own. The version is read as a number, so mug@04 finds the design mug@4 made, and the answer spells it mug@4. A key, the store’s own name for a product, keeps a standing design per product: one naming a key finds only the design that key made, from the same store. A proofToken from a correction link handed out with adjustLayout makes the design from that layout adjustment, as a standing design of its own that the same proof finds again, for a store to keep one product’s row laid out by hand while the others follow the template; the design it was laid out from is not changed. A secret key, an integration key or a member holding designs:create; a publishable key or a link is refused secret_key_required. Nothing is approved unless approve: true asks.

Media typeapplication/json
object
approve

Approve the design, made by this call or found not yet approved, recorded as design.approved like any other approval. Needs designs:update as well as designs:create; a caller without it is refused with forbidden and nothing is written. Left out or false, nothing is approved.

boolean
blankId
string
>= 1 characters
heightMm
number
> 0
key

The store’s own name for the product the design is for, such as product-123: two products on one template version, blank, placement and size each keep their own standing design. Found only by the same key, from the same store. Left out, the design is the one every request naming no key finds.

string
>= 1 characters <= 200 characters
placementId
string
>= 1 characters
proofToken

A layout adjustment’s proof: the token a correction link handed out with adjustLayout answered for one of the caller’s own standing designs of the same key, template version, blank, placement, size and row. The design is made from that proof’s document, as a standing design of its own; the same proof again finds it, and the design it was laid out from is not changed. Any other proof is refused not_a_layout_proof, one of another key, placement, size or row layout_proof_mismatch, and one whose design was since rejected, deleted or erased unknown_proof.

string
>= 1 characters
templateId
required

The published template version, <baseId>@<version>. A base id without its version is refused with template_version_required.

string
>= 1 characters
variant

A variant of the blank, by ref (v_…). On a blank whose print areas change with its size, the design is sized at, and keeps, that variant’s size; a ref the blank has no variant of is refused with variant_not_of_blank. On any other blank it is not checked. A proof also keeps it as proofVariant, for display.

string
>= 3 characters <= 100 characters
variantRow

The size the design is for, as the blank’s option values, such as {"Size": "XL"}, in place of variant: a value of each option the blank’s print areas change with, and nothing else, or it is refused with variant_row_invalid. Ignored on a blank whose print areas change with nothing.

object
key
additional properties
string
>= 1 characters <= 80 characters
widthMm
number
> 0

Examples

Exampleexample

Example

{
"approve": true,
"blankId": "blk_3f9a2c1d8e7b6a5f4c3d2e1f",
"heightMm": 90,
"placementId": "front",
"templateId": "mug-wrap@4",
"widthMm": 200
}

The standing design found

Media typeapplication/json
object
adjusted
required

Whether the design is a layout adjustment’s, made from proofToken, rather than the template version as its author left it.

boolean
blankId
required
string | null
created
required

Whether this call made the design; false when it found one.

boolean
designId
required
string
heightMm
required

The print’s trim height, in millimetres.

number
key
required

The store’s key the request named; null for none.

string | null
placementId
required
string | null
revision
required
integer
standing
required
boolean
status
required

The design’s status after the call: approved when approved by this call or before, else committed.

string
templateId
required
string
widthMm
required

The print’s trim width, in millimetres.

number

Examples

Exampleexample

Example

{
"adjusted": false,
"blankId": "blk_3f9a2c1d8e7b6a5f4c3d2e1f",
"created": false,
"designId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c",
"heightMm": 90,
"key": null,
"placementId": "front",
"revision": 1,
"standing": true,
"status": "approved",
"templateId": "mug-wrap@4",
"widthMm": 200
}
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.

The standing design made

Media typeapplication/json
object
adjusted
required

Whether the design is a layout adjustment’s, made from proofToken, rather than the template version as its author left it.

boolean
blankId
required
string | null
created
required

Whether this call made the design; false when it found one.

boolean
designId
required
string
heightMm
required

The print’s trim height, in millimetres.

number
key
required

The store’s key the request named; null for none.

string | null
placementId
required
string | null
revision
required
integer
standing
required
boolean
status
required

The design’s status after the call: approved when approved by this call or before, else committed.

string
templateId
required
string
widthMm
required

The print’s trim width, in millimetres.

number

Examples

Exampleexample

Example

{
"adjusted": false,
"blankId": "blk_3f9a2c1d8e7b6a5f4c3d2e1f",
"created": true,
"designId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c",
"heightMm": 90,
"key": null,
"placementId": "front",
"revision": 1,
"standing": true,
"status": "approved",
"templateId": "mug-wrap@4",
"widthMm": 200
}
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: template_version_required, bad_request

Media typeapplication/json
object
error
required
string

Examples

bad_request

{
"error": "bad_request"
}
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: secret_key_required, forbidden, origin_forbidden, feature_disabled, 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: unknown_proof

Media typeapplication/json
object
error
required
string

Examples

Exampleunknown_proof

unknown_proof

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

Media typeapplication/json
object
error
required
string

Examples

Exampleproof_expired

proof_expired

{
"error": "proof_expired"
}
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: spot_plate_required, unknown_printshop, printshop_disconnected, printshop_unavailable, printshop_differs_from_blank, constraint_violation, unknown_placement, variant_not_of_blank, variant_row_invalid, variant_required, not_a_layout_proof, layout_proof_mismatch, invalid_doc, payload_too_large

Media typeapplication/json
object
areasVaryBy

Always sent with variant_required.

Array<string>
bytes

Sent with payload_too_large.

number
cause

Always sent with spot_plate_required.

string
detail

Always sent with invalid_doc.

error
required
string
maxBytes

Always sent with payload_too_large.

number
reason

Always sent with unknown_printshop, printshop_disconnected, printshop_unavailable, printshop_differs_from_blank, variant_not_of_blank, variant_row_invalid, variant_required.

string
references

Always sent with spot_plate_required.

Array<string>
variant

Always sent with variant_not_of_blank.

string
violations

Always sent with constraint_violation.

Array<object>
object
characters

On a text_draws_fallback_glyphs or text_draws_missing_glyphs warning: the characters the text’s font cannot draw, each once, in the order the text first holds them. Absent on every other violation.

Array<string>
given
required
language

The language whose overrides break the rule, when only the template as it reads in that language does. Absent, the original.

string
layerId
required
string
prop
required
string
rule
required
string
severity
required

error refuses a publish; warning is worth the author’s attention and never does.

string

Examples

constraint_violation

{
"error": "constraint_violation",
"violations": [
{
"given": {},
"layerId": "string",
"prop": "string",
"rule": "string",
"severity": "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: 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