Skip to content

Submit a print to its printshop

POST
/v1/prints/{id}/orders
curl --request POST \
--url https://api.pixonaut.app/v1/prints/example/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "externalRef": "WEB-10482-1", "quantity": 1, "recipient": { "email": "[email protected]", "name": "Alexandra Lind" }, "shippingAddress": { "city": "London", "country": "GB", "line1": "12 High Street", "postalCode": "SW1A 1AA" } }'

Operation ID: prints.orders.create

A secret key, or a connected store’s integration key or a studio member holding orders:create. Places an order for a print with its blank’s printshop, set when the blank was created. A print still rendering is waited for: the order is written awaiting_prints and goes to its printshop on its own once the print is complete, as POST /v1/orders describes; a print that failed is refused 409 print_not_completed. A print with no blank goes to the printshop its design was committed with, else the one printshopId names, else the tenant’s default, and is refused 409 print_needs_printshop with none; in a sandbox it is placed with no printshop instead (printshopConnectionId null, adapter none). The order records which. For a print on a blank, printshopId naming another printshop is refused 422 printshop_differs_from_blank, and naming the blank’s own as an unknown field. A printshop named here that cannot take the order (unknown, disconnected, or unavailable because its integration is no longer registered) is a 422 and no order is written, as is a design whose fulfilment payload lacks a key that printshop requires. quantity is how many copies this order wants, 1 when the body leaves it out; the same print can be ordered again with another, with reorder: true. A design has one live order, in any status but failed and cancelled, whoever placed it: an order of a print of a design that has one is refused 409 design_already_ordered, naming the design and its newest live order, and nothing is written; two sent at once place one. A standing design is never refused design_already_ordered: its print is ordered on every sale. A repeat with the first request’s Idempotency-Key is answered with the first order before this is asked, and a replacement of a failed order needs no reorder. externalRef is your own reference for the order (your order or line id; not unique, and GET /v1/orders?externalRef= finds it), and recipient and shippingAddress say who it is for and where it ships; all three are optional, reach the printshop on the job ticket, and are never written to logs. The design’s first order takes the recipient and address its customer gave on its address capture page (PUT /v1/designs/{id}/delivery) when this body names neither; a body naming either is used alone, and the customer’s answer is dropped. A partner refusing the order, or a printshop that has been disconnected, is still a 201: the order is recorded as failed, naming it and why (printshop_disconnected). A printshop the merchant paused takes no order: one going there is refused 409 printshop_paused, naming it, and nothing is written. A print made by a method its printshop does not print with, where the printshop states what it prints with, is refused 422 technique_not_offered, naming the placement, the method and the printshop’s, and nothing is written. A placement its blank says an order must print, left without a print, is refused 422 placement_unfilled, naming it, and nothing is written. With replacesOrderId, the order replaces a failed order of this print, as POST /v1/orders/{id}/retry would but with what this body asks for, and is refused as a retry is.

id
required
string
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
object
expectedOrderCount

How many orders this print had when the caller read it (GET /v1/orders?printId=’s total). When it has another number now, the order is refused stale_update with the count it has, and none is placed: a request sent again after an answer that was lost does not order twice. Absent skips the check.

integer
externalRef

The caller’s own reference for this order, such as its order id in the shop. Kept exactly as sent and handed to the printshop.

string
>= 1 characters <= 256 characters
printshopId

The printshop to make this order, for a print with no blank whose design named none when it was committed. A print on a blank is made by the blank’s printshop: naming another is refused with printshop_differs_from_blank, and naming the blank’s own as an unknown field. Absent or null, a print with no blank goes to the printshop its design was committed with, else the tenant’s default.

string | null
>= 1 characters
quantity

How many copies to order. A whole number of 1 or more; 1 when left out.

integer
default: 1 > 0 <= 2147483647
recipient

Who the order is for. Left out, the first order of a design takes what its customer gave.

object
email

The recipient’s email address, for the carrier’s notices.

string format: email
<= 254 characters
name
required

The recipient’s name as a parcel label carries it, a person’s or a company’s. Up to 200 characters.

string
>= 1 characters <= 200 characters
phone

The recipient’s phone number as the customer gave it, with the country code when it has one.

string
>= 1 characters <= 50 characters
reorder

Order the design again on purpose. A design has one live order (in any status but failed and cancelled): absent or false, an order of a design that has one is refused 409 design_already_ordered, naming the design and its newest live order, and nothing is written. True places the order whatever orders the design has.

boolean
replacesOrderId

The id of a failed order of this print that this order replaces, changing what it wants: another number of copies, reference, recipient, address or, for a print with no blank, printshop. Allowed under the rules POST /v1/orders/{id}/retry has, and refused as it refuses; the new order records which order it replaces.

string
>= 1 characters <= 200 characters
shipToAddressId

A saved address to ship to; the customer stays the recipient. null: the customer’s. Left out: the workspace’s setting.

string | null
>= 1 characters
shippingAddress

Where the order ships. Left out, the first order of a design takes what its customer gave.

object
city
required

The city or town.

string
>= 1 characters <= 100 characters
company

The company of a business address, which the parcel goes to; the recipient is who receives it.

string
>= 1 characters <= 200 characters
country
required

The country as a two-letter ISO 3166-1 code in capitals, such as SE or US.

string
/^[A-Z]{2}$/
line1
required

The first line of the street address: street and number.

string
>= 1 characters <= 200 characters
line2

The second line of the address: an apartment, floor or c/o.

string
>= 1 characters <= 200 characters
postalCode

The postal code as the country writes it, such as 111 22 or SW1A 1AA. Left out where the country has none; a printshop that needs one refuses the order postal_code_required.

string
>= 1 characters <= 20 characters
region

The state, province or county, where the country uses one.

string
>= 1 characters <= 100 characters
variant

The variant of the print’s blank the order is for, by ref (v_…). Left out, a blank with exactly one variant orders that one, and one with several is refused variant_required. A ref of another blank is refused variant_not_of_blank, and a retired one variant_retired. The order keeps a copy of the variant as it was: its options and the printshop fields it was sent.

string
>= 3 characters

Examples

A connected store, from connect to delivery: 6. Print and order

{
"externalRef": "WEB-10482-1",
"quantity": 1,
"recipient": {
"email": "[email protected]",
"name": "Alexandra Lind"
},
"shippingAddress": {
"city": "London",
"country": "GB",
"line1": "12 High Street",
"postalCode": "SW1A 1AA"
}
}

The submitted order

Media typeapplication/json
object
adapter
required
string
blank
required

The blank blankId names, as it reads now; null as blankId is.

object
name
required
string
optionAxes
required

Its option axes, in order: how a variant’s options read, such as Color then Size.

Array<string>
variants
required

How many variants it has, retired ones included.

number
blankId
required

The blank the order’s prints are on; null for prints on no blank, or an order placed before it was recorded.

string | null
delivery
required

The order’s latest address change, made with PATCH /v1/orders/{id}/delivery after the order was sent; null for an order whose address never changed.

object
at
required

When the change was made.

number
state
required

What the printshop made of the change: sending while it is being told, accepted, refused (the order keeps the address the printshop has), or carried when what the printshop had not been sent yet carries the new address, so nothing extra was sent.

string
words
required

The printshop’s own answer to a refused change; null otherwise.

string | null
designId
required

The design the lead print was made from.

string
externalOrderRef
required
string | null
externalRef
required
string | null
>= 1 characters <= 256 characters
failureKind
required

Why Pixonaut failed the order rather than its printshop, as a refusal code: print_failed (a print of it could not be made; lastError names it), prints_timed_out (its prints were not finished within three hours of placing it), or the refusal an order waiting for its prints met when it was handed on, such as technique_not_offered. null for an order its printshop refused, or one not failed.

string | null
hold
required

Why the order is held, while it is; null for an order not held. A held order is accepted and not handed to its printshop until the month resets with room for it or the workspace upgrades.

object
limit
required

The plan’s monthly order limit the order met.

integer
periodEnd
required

When the month resets (ISO 8601, UTC): the latest the order is released, if the new month has room for it.

string
reason
required

Why it is held: monthly_order_limit, the workspace has placed the orders its plan includes this month. Show a reason you do not know as held without one, never as a failure.

string
id
required
string
lastCheckedAt
required
number | null
lastError
required
string | null
personalDataErasedAt
required
number | null
printId
required

The order’s lead print: the first of printIds, and the only one of an order of one print.

string
printIds
required

Every print the order holds, the lead first: the prints of one item, each in its own placement on its blank.

Array<string>
prints
required

printIds with each print’s design, placement and file.

Array
Any of:
object
designId
required
string
designRevision
required

The revision of the design the print was made from: GET /v1/designs/{id}/revisions/{revision}/image draws it.

number
placementFields
required

The placement fields the printshop was sent for this print, from its position there; null for an order placed before they were recorded.

Array<object> | null
object
name
required
string
source
required

Where the value came from: the variant’s (or position’s) own, the field’s default, or nothing, sent empty.

string
value
required
string
placementId
required

The placement on its blank the print’s design was committed for; null for a design with no blank, or one committed before placements were recorded.

string | null
printId
required
string
printedAs
required

Where on the item the print goes, by the name the order’s printshop knows it by (its Printed as), recorded when the order was placed; null for a print on no blank, or an order placed before it was recorded.

string | null
spotOutput
required

Which of this print’s files the printshop was sent; null while the order waits for its prints (awaiting_prints).

string | null
status
required

Where the print has got to: created while it renders, which an order in awaiting_prints waits for, then completed, or failed.

string
printshopAsPlaced
required

The printshop as it was when the order was placed: its name and kind (adapter). null for an order placed before it was recorded.

object
adapter
required
string
name
required
string
printshopConnectionId
required
string | null
printshopName
required
string | null
quantity
required
integer
> 0 <= 2147483647
recipient
required

Who the order is for: its customer. When shipTo is set, the order ships there and the customer is who it is finally for.

object
email

The recipient’s email address, for the carrier’s notices.

string format: email
<= 254 characters
name
required

The recipient’s name as a parcel label carries it, a person’s or a company’s. Up to 200 characters.

string
>= 1 characters <= 200 characters
phone

The recipient’s phone number as the customer gave it, with the country code when it has one.

string
>= 1 characters <= 50 characters
replacedByOrderId
required

The order submitted to replace this one, which names it as replacesOrderId; null for none.

string | null
replacesOrderId
required

The failed order this one was submitted to replace; null for an order that replaces none.

string | null
shipTo
required

The workspace’s saved address the order ships to, as it was when the order was placed; null for an order that ships to its customer’s address. Its printshop is handed this address, and erasing the order’s personal data leaves it.

object
address
required
object
city
required

The city or town.

string
>= 1 characters <= 100 characters
company

The company of a business address, which the parcel goes to; the recipient is who receives it.

string
>= 1 characters <= 200 characters
country
required

The country as a two-letter ISO 3166-1 code in capitals, such as SE or US.

string
/^[A-Z]{2}$/
line1
required

The first line of the street address: street and number.

string
>= 1 characters <= 200 characters
line2

The second line of the address: an apartment, floor or c/o.

string
>= 1 characters <= 200 characters
postalCode

The postal code as the country writes it, such as 111 22 or SW1A 1AA. Left out where the country has none; a printshop that needs one refuses the order postal_code_required.

string
>= 1 characters <= 20 characters
region

The state, province or county, where the country uses one.

string
>= 1 characters <= 100 characters
name
required

What the address is called in the workspace, such as Warehouse: unique there, case aside, and the name a parcel sent there is addressed to. Up to 200 characters.

string
>= 1 characters <= 200 characters
savedAddressId
required

The saved address the order ships to, by id. It may have been changed or removed since; name and address are what the order was placed with.

string
shippingAddress
required

The customer’s address. Where the order ships, unless shipTo is set.

object
city
required

The city or town.

string
>= 1 characters <= 100 characters
company

The company of a business address, which the parcel goes to; the recipient is who receives it.

string
>= 1 characters <= 200 characters
country
required

The country as a two-letter ISO 3166-1 code in capitals, such as SE or US.

string
/^[A-Z]{2}$/
line1
required

The first line of the street address: street and number.

string
>= 1 characters <= 200 characters
line2

The second line of the address: an apartment, floor or c/o.

string
>= 1 characters <= 200 characters
postalCode

The postal code as the country writes it, such as 111 22 or SW1A 1AA. Left out where the country has none; a printshop that needs one refuses the order postal_code_required.

string
>= 1 characters <= 20 characters
region

The state, province or county, where the country uses one.

string
>= 1 characters <= 100 characters
spotOutput
required
string | null
status
required
string
submittedAt
required
number
tenantId
required
string
tracking
required
object
carrier

Who carries it, such as DHL.

string
>= 1 characters <= 100 characters
number
required

The shipment’s tracking number.

string
>= 1 characters <= 100 characters
url

Where the shipment is followed: an https address.

string format: uri
<= 2048 characters
updatedAt
required
number
variant
required

The variant as it was when the order was placed: its options and the variant fields its printshop was sent. A later edit of the variant does not change it.

object
fields
required

Each declared field, in the printshop’s order, as it was sent.

Array<object>
object
name
required
string
source
required

Where the value came from: the variant’s (or position’s) own, the field’s default, or nothing, sent empty.

string
value
required
string
options
required
object
key
additional properties
string
ref
required
string
variantRef
required

The variant the order names; null as blankId is.

string | null

Examples

Design to order: 4. Submit the order

{
"adapter": "printful",
"blank": {
"name": "Classic tee",
"optionAxes": [
"Color",
"Size"
],
"variants": 12
},
"blankId": "blank_classic_tee",
"delivery": null,
"designId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c",
"externalOrderRef": "PF-889123",
"externalRef": "ORDER-1042",
"failureKind": null,
"hold": null,
"id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"lastCheckedAt": null,
"lastError": null,
"personalDataErasedAt": null,
"printId": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
"printIds": [
"c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f"
],
"prints": [
{
"designId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c",
"designRevision": 1,
"placementFields": [],
"placementId": "front",
"printId": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
"printedAs": "Front",
"spotOutput": "process",
"status": "completed"
}
],
"printshopAsPlaced": {
"adapter": "printful",
"name": "Printful"
},
"printshopConnectionId": "0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
"printshopName": "Printful",
"quantity": 3,
"recipient": {
"email": "[email protected]",
"name": "Alice Morgan"
},
"replacedByOrderId": null,
"replacesOrderId": null,
"shipTo": null,
"shippingAddress": {
"city": "London",
"country": "GB",
"line1": "1 High Street",
"postalCode": "SW1A 2AA"
},
"spotOutput": "process",
"status": "queued",
"submittedAt": 1790000120000,
"tenantId": "acme",
"tracking": null,
"updatedAt": 1790000121000,
"variant": {
"fields": [
{
"name": "catalogVariantId",
"source": "own",
"value": "4012"
}
],
"options": {
"Color": "White",
"Size": "M"
},
"ref": "v_3f9a1c2b7d4e8a01"
},
"variantRef": "v_3f9a1c2b7d4e8a01"
}
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: plan_limit_reached, origin_forbidden, 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
limit

The limit the tenant is at: templates, connectedStores, apiKeys, shareLinks, customDomains, printsMadePerMonth (prints made without an order this month), members, orders (this month’s orders, which getting a print’s files without an order counts as), or a sandbox’s own caps: sandboxPrintsPerDay, sandboxPrintsPerMonth, sandboxOrdersPerMonth. A sandbox shares every other limit with its live workspace. Always sent with plan_limit_reached.

string
max

How many the plan allows. Always sent with plan_limit_reached.

number
plan

The plan whose limit it is. Always sent with plan_limit_reached.

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: print_not_found, order_not_found, 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: print_not_completed, print_needs_printshop, print_ticket_stale, print_superseded, print_files_deleted, design_erased, stale_update, design_already_ordered, printshop_paused, order_not_retryable, order_at_printshop, order_superseded, idempotency_key_in_use

Media typeapplication/json
object
current

Always sent with stale_update.

integer
designId

Always sent with design_already_ordered.

string
detail

Always sent with print_ticket_stale.

string
error
required
string
newerOrderId

Always sent with order_superseded.

string
orderId

Always sent with design_already_ordered.

string
reason

Always sent with printshop_paused.

string
status

Always sent with print_not_completed, order_not_retryable. With order_not_retryable: one of held, awaiting_prints, submitted, queued, printed, shipped, failed, outcome_unknown, cancelled.

string

Examples

design_already_ordered

{
"designId": "string",
"error": "design_already_ordered",
"orderId": "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: unknown_printshop, printshop_disconnected, printshop_unavailable, printshop_differs_from_blank, missing_fulfilment_keys, postal_code_required, saved_address_not_found, spot_plate_required, print_profile_unavailable, print_exceeds_position, print_not_position_size, print_exceeds_machine, print_raster_too_large, technique_not_offered, placement_unfilled, variant_not_of_blank, variant_retired, variant_required, field_value_missing, variant_not_of_design_row, print_without_placement, mixed_blanks, duplicate_placement, print_committed_elsewhere, printshop_cannot_combine, prints_disagree, idempotency_key_reused, invalid_idempotency_key, payload_too_large

Media typeapplication/json
object
bytes

Sent with payload_too_large.

number
cause

Always sent with spot_plate_required.

string
designId

Always sent with variant_not_of_design_row.

string
detail

Always sent with print_profile_unavailable.

string
error
required
string
field

Always sent with field_value_missing.

string
fieldKind

Always sent with field_value_missing.

string
key

Always sent with prints_disagree.

string
largestMm

Always sent with print_exceeds_position.

object
heightMm
required
number
widthMm
required
number
machine

Always sent with print_exceeds_machine, print_raster_too_large.

string
maxBytes

Always sent with payload_too_large.

number
mediaMm

Always sent with print_exceeds_machine.

object
heightMm
required
number
widthMm
required
number
method

Always sent with technique_not_offered.

string
missing

Always sent with missing_fulfilment_keys.

Array<string>
outputProfile

Always sent with print_profile_unavailable.

string
placement

Always sent with print_exceeds_position, print_not_position_size, technique_not_offered, placement_unfilled, and may be sent with print_exceeds_machine, print_raster_too_large.

string
placementId

Always sent with duplicate_placement.

string
position

Always sent with print_exceeds_position, print_not_position_size, and may be sent with field_value_missing.

string
printId

Always sent with print_profile_unavailable, print_without_placement, print_committed_elsewhere.

string
printMethods

Always sent with technique_not_offered.

Array<string>
printMm

Always sent with print_exceeds_position, print_not_position_size, print_exceeds_machine.

object
heightMm
required
number
widthMm
required
number
printshop

Always sent with print_exceeds_machine, print_raster_too_large.

string
reason

Always sent with unknown_printshop, printshop_disconnected, printshop_unavailable, printshop_differs_from_blank, print_exceeds_position, print_not_position_size, print_exceeds_machine, print_raster_too_large, technique_not_offered, placement_unfilled, variant_not_of_blank, variant_retired, variant_required, field_value_missing, variant_not_of_design_row.

string
references

Always sent with spot_plate_required.

Array<string>
row

Always sent with variant_not_of_design_row.

object
key
additional properties
string
sizeMm

Always sent with print_not_position_size.

object
heightMm
required
number
widthMm
required
number
sizePx

Always sent with print_raster_too_large.

object
heightPx
required
number
widthPx
required
number
variant

Always sent with variant_not_of_blank, variant_retired, variant_not_of_design_row.

string
variants

Always sent with variant_required.

number

Examples

duplicate_placement

{
"error": "duplicate_placement",
"placementId": "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: 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.

Refused: lock_timeout

Media typeapplication/json
object
error
required
string

Examples

Examplelock_timeout

lock_timeout

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