Skip to content

Commit a design

POST
/v1/designs
curl --request POST \
--url 'https://api.pixonaut.app/v1/designs?lang=en' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "externalRef": "cart-10482-1", "fulfilmentPayload": { "variantSku": "TEE-BLACK-M" }, "proofToken": "eyJhdWQiOiJwcm9vZiIsImlkIjoicHJmXzljMWUyZDNmNGE1YjZjN2Q4ZTlmMGExYiIsInQiOiJhY21lIiwiZXhwIjoxNzkyNDkxMjQ3MDAwfQ.EXAMPLE_signature_not_a_real_one_0000000000" }'

Operation ID: designs.commit

Commits a customer’s design, from a proof token (secret or integration key only) or from a template and its values. A printshop it names, or the partner a locked blank is made by, is kept on the design and is where its orders go unless an order names another; with none, an order goes to the blank’s default printshop, else the tenant’s, as they are when the order is made. A fulfilment payload lacking a key is refused 422 missing_fulfilment_keys against where the design would go now, short of the keys that printshop takes only once there is an order (Printful’s recipient); each order checks every required key again against the printshop it goes to, and that check decides. A design holding a spot ink that may not print from its CMYK fallback is refused 422 spot_plate_required the same way, where that printshop takes no spot plates. A design committed from a template is fitted to and records the blank and placement it names, and a named placement that does not resolve is refused 422 unknown_placement; one committed from a proof token records the proof’s. Only a secret or integration key may attach a fulfilment payload, an external reference or choose the printshop.

tz

The IANA timezone the template’s dynamic values are resolved in, such as Europe/Stockholm: today’s date there. Absent, the workspace’s timezone.

string

The IANA timezone the template’s dynamic values are resolved in, such as Europe/Stockholm: today’s date there. Absent, the workspace’s timezone.

lang

The language the template’s dynamic values are written in when their name names none, one of en, sv, de, fr, es, nl, da, nb, fi. Absent, the workspace’s default language. A value whose name carries a language, {date.long:sv}, keeps it.

string
Allowed values: en sv de fr es nl da nb fi

The language the template’s dynamic values are written in when their name names none, one of en, sv, de, fr, es, nl, da, nb, fi. Absent, the workspace’s default language. A value whose name carries a language, {date.long:sv}, keeps it.

idempotency-key

Your own key for this request. A repeat with the same key and body within 24 hours is answered with what the first one made, marked Idempotent-Replayed: true, and makes nothing; the same key with another body is refused idempotency_key_reused, and a repeat while the first is still being answered idempotency_key_in_use. A request that is refused makes nothing, so its key may be sent again.

string
>= 1 characters <= 255 characters /^[\x21-\x7e]+$/

Your own key for this request. A repeat with the same key and body within 24 hours is answered with what the first one made, marked Idempotent-Replayed: true, and makes nothing; the same key with another body is refused idempotency_key_reused, and a repeat while the first is still being answered idempotency_key_in_use. A request that is refused makes nothing, so its key may be sent again.

Media typeapplication/json
Any of:
object
proofToken
required
string
>= 1 characters
fulfilmentPayload

The order data a printshop needs to fulfil this design, such as a material or a shipping method: a JSON object of your own keys, which Pixonaut keeps and hands on with the order without reading its keys. Its size and nesting depth are limited. Only a secret or integration key may send it, null included; a publishable key sending it is refused with secret_key_required.

printshopId

The id of the printshop that makes this design’s orders, for a design on no blank. A design on a blank is made by the blank’s printshop, set when the blank was created: naming any other is refused with printshop_differs_from_blank, and the design keeps the blank’s printshop even once the blank is deleted. Absent or null, a design on no blank goes to the tenant’s default printshop as it is when the order is made. Only a secret or integration key may send it, null included; a publishable key sending it is refused with secret_key_required.

string | null
>= 1 characters
externalRef

Your own reference for this design, such as your cart or order line id: kept exactly as sent, not unique, and never read by Pixonaut. GET /v1/designs?externalRef= finds the designs holding it, and PUT /v1/designs/{id}/external-ref replaces it. Only a secret or integration key may send it; a publishable key sending it is refused with secret_key_required.

string
>= 1 characters <= 256 characters
approve

Approve the design as it is committed, so it is never awaiting approval: an explicit approval by the caller, recorded as design.approved. Needs designs:update: a secret key and an integration key hold it, a member may, and a publishable key never does; a caller without it is refused with forbidden. Left out or false, the design waits for approval.

boolean

Examples

A connected store, from connect to delivery: 3. Commit the design with the store's reference

{
"externalRef": "cart-10482-1",
"fulfilmentPayload": {
"variantSku": "TEE-BLACK-M"
},
"proofToken": "eyJhdWQiOiJwcm9vZiIsImlkIjoicHJmXzljMWUyZDNmNGE1YjZjN2Q4ZTlmMGExYiIsInQiOiJhY21lIiwiZXhwIjoxNzkyNDkxMjQ3MDAwfQ.EXAMPLE_signature_not_a_real_one_0000000000"
}

The committed design

Media typeapplication/json
object
designId
required
string
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

A connected store, from connect to delivery: 3. Commit the design with the store's reference

{
"designId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c",
"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: placement_not_committable, print_size_not_committable, repeat_not_committable, bad_request, invalid_query

Media typeapplication/json
object
error
required
string
reason

Always sent with invalid_query.

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, 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: proof_already_committed, correction_proof, layout_proof, idempotency_key_in_use

Media typeapplication/json
object
designId

Always sent with proof_already_committed.

string
error
required
string

Examples

correction_proof

{
"error": "correction_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: idempotency_key_reused, invalid_idempotency_key, invalid_doc, invalid_fulfilment_payload, payload_too_large, missing_fulfilment_keys, 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, asset_map_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 payload_too_large, asset_map_too_large.

number
missing

Always sent with missing_fulfilment_keys.

Array<string>
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