Skip to content

Commit a design drawn on a blank's panel layout

POST
/v1/designs/layout
curl --request POST \
--url https://api.pixonaut.app/v1/designs/layout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "blankId": "blk_3f9a2c1d8e7b6a5f4c3d2e1f", "layout": "All-over", "templateId": "pug-fur@2", "values": {}, "variantRow": { "Size": "L" } }'

Operation ID: designs.commitThroughLayout

Commits a design drawn across a blank’s panel layout, so all-over art runs unbroken across the seams of the panels it is printed on. The template is resolved once, on the layout’s canvas at the size the request names (variant or variantRow, as on POST /v1/designs), and the answer holds one design per placement the layout has a window for: its print is the canvas seen through that placement’s windows, the size of the placement’s print area at that size. Order them as the prints of one item. In place of a template and its values, a secret or integration key may send the proofToken of a layout’s proof the customer approved (POST /v1/proofs/layout): its canvas is cut as approved, at the proof’s blank, layout and size, and the token commits once. A proof of anything else is refused not_layout_proof. A layout the blank does not have is refused unknown_layout; one whose windows no longer fit the blank’s print areas at that size, layout_out_of_date. Every design is resolved and checked before any is made; one refused after that leaves the others made. A secret key, an integration key with designs:create, or a member.

Media typeapplication/json
Any of:
object
externalRef

The caller’s own reference, kept on every design made.

string
>= 1 characters <= 200 characters
proofToken
required

The token of the layout’s proof the customer approved (POST /v1/proofs/layout): its canvas is cut as approved, at its blank, layout and size. A secret or integration key only.

string
>= 1 characters

Examples

Exampleexample

Example

{
"blankId": "blk_3f9a2c1d8e7b6a5f4c3d2e1f",
"layout": "All-over",
"templateId": "pug-fur@2",
"values": {},
"variantRow": {
"Size": "L"
}
}

The designs made

Media typeapplication/json
object
designs
required

One design per placement the layout has a window for, in the order of the layout’s windows; the first is the lead.

Array<object>
object
designId
required
string
heightMm
required

The print’s trim height, in millimetres.

number
placementId
required
string
widthMm
required

The print’s trim width, in millimetres.

number
lowResolution
required

The pictures that print below printFloorDpi at the design’s print size. A warning: nothing is refused for it.

Array<object>
object
actualPx
required

The picture’s pixels along the edge that decides.

number
assetId
required
string
effectiveDpi
required

Pixels per inch along that edge, as printed.

number
layerId
required

The layer the picture fills, or the artwork’s own key for its image background.

string
minPx
required

The pixels that edge needs at the floor.

number
printFloorDpi
required

The minimum print resolution the design’s pictures were judged against: the template’s own, else the tenant’s.

number

Examples

Exampleexample

Example

{
"designs": [
{
"designId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c",
"heightMm": 720,
"placementId": "front",
"widthMm": 560
},
{
"designId": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"heightMm": 420,
"placementId": "hood",
"widthMm": 660
}
],
"lowResolution": [],
"printFloorDpi": 150
}
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: bad_request

Media typeapplication/json
object
error
required
string

Examples

Examplebad_request

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, not_found

Media typeapplication/json
object
error
required
string

Examples

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: layout_out_of_date, proof_already_committed, not_layout_proof

Media typeapplication/json
object
designId

Always sent with proof_already_committed.

string
error
required
string
reason

Always sent with layout_out_of_date.

string

Examples

layout_out_of_date

{
"error": "layout_out_of_date",
"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: 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: unknown_printshop, printshop_disconnected, printshop_unavailable, printshop_differs_from_blank, constraint_violation, unknown_placement, variant_not_of_blank, variant_row_invalid, variant_required, spot_plate_required, asset_map_too_large, unknown_layout, empty_layout, invalid_doc, payload_too_large

Media typeapplication/json
object
areasVaryBy

Always sent with variant_required.

Array<string>
bytes

Always sent with asset_map_too_large, and may be 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 asset_map_too_large, 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

asset_map_too_large

{
"bytes": 0,
"error": "asset_map_too_large",
"maxBytes": 0
}
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, link_design_limit

Media typeapplication/json
object
error
required
string
reopensAt

When the link makes designs again: when the oldest design counted leaves the window. Null for a total limit. Always sent with link_design_limit.

number | null

Examples

link_design_limit

{
"error": "link_design_limit",
"reopensAt": 0
}
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