Skip to content

List the blanks a failed order could be sent to

GET
/v1/orders/{id}/reroute-targets
curl --request GET \
--url 'https://api.pixonaut.app/v1/orders/example/reroute-targets?page=1' \
--header 'Authorization: Bearer <token>'

Operation ID: orders.rerouteTargets

A secret key, or a connected store’s integration key or a studio member holding orders:create. Every blank of the workspace but the order’s own, at any printshop, for POST /v1/orders/{id}/retry with reroute: those the order’s prints fit first, then the rest, each half by name, 50 to a page with the total. A print fits a placement whose largest print holds its trim size, width against width and height against height, and is that size where the placement is printed across its whole area, and whose print method is the one it was made by; it goes to the placement of its own placement’s name when the blank has one. A fitting blank lists each print’s placements; another says why, per print (print_exceeds_placement with both sizes, print_short_of_area with the print’s size and the area of a placement printed across its whole area, technique_differs with both methods, technique_unknown, no_placement_fits), or too_few_placements when they cannot take one print each. Refused 409 as a retry is when the order cannot be submitted again.

id
required
string
page

The page to read, from 1; the first when left out.

integer
default: 1 >= 1 <= 100000

The page to read, from 1; the first when left out.

q

Only the blanks whose name, or whose printshop’s name, holds this text, case aside.

string
<= 200 characters

Only the blanks whose name, or whose printshop’s name, holds this text, case aside.

A page of blanks

Media typeapplication/json
object
fitting
required

How many of the total blanks the order fits.

number
page
required
number
pageSize
required
number
targets
required
Array<object>
object
blankId
required
string
candidates
required

For a blank the order fits, each print and the placements it may go to; empty otherwise.

Array<object>
object
placements
required
Array<object>
object
id
required
string
largestMm
required

The largest print it takes.

object
heightMm
required
number
widthMm
required
number
name
required
string
sameName
required

It has the print’s own placement’s name, so the print goes there and nowhere else.

boolean
printId
required
string
fits
required
boolean
misfits
required

For a blank the order does not fit, why; empty otherwise.

Array
One of:
object
kind
required
string
Allowed values: print_exceeds_placement
largestMm
required
object
heightMm
required
number
widthMm
required
number
placement
required
string
printId
required
string
printMm
required
object
heightMm
required
number
widthMm
required
number
name
required
string
placements
required

The names of the blank’s placements, in its order.

Array<string>
printshop
required

The printshop the blank is made at, which the order would go to.

object
id
required
string
name
required
string
variants
required

How many variants the blank has, retired ones included.

number
total
required
number

Examples

Exampleexample

Example

{
"fitting": 1,
"page": 1,
"pageSize": 50,
"targets": [
{
"blankId": "blank_northside_tee",
"candidates": [
{
"placements": [
{
"id": "front",
"largestMm": {
"heightMm": 500,
"widthMm": 400
},
"name": "Front",
"sameName": true
}
],
"printId": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f"
}
],
"fits": true,
"misfits": [],
"name": "Unisex tee, Northside",
"placements": [
"Front",
"Back"
],
"printshop": {
"id": "1c2d3e4f-5a6b-4c7d-9e8f-0a1b2c3d4e5f",
"name": "Northside Print"
},
"variants": 12
},
{
"blankId": "blank_kids_tee",
"candidates": [],
"fits": false,
"misfits": [
{
"kind": "print_exceeds_placement",
"largestMm": {
"heightMm": 250,
"widthMm": 200
},
"placement": "Front",
"printId": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
"printMm": {
"heightMm": 300,
"widthMm": 200
}
}
],
"name": "Kids tee",
"placements": [
"Front"
],
"printshop": {
"id": "1c2d3e4f-5a6b-4c7d-9e8f-0a1b2c3d4e5f",
"name": "Northside Print"
},
"variants": 4
}
],
"total": 2
}
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, 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: 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: order_not_retryable, order_at_printshop, order_superseded, print_ticket_stale

Media typeapplication/json
object
detail

Always sent with print_ticket_stale.

string
error
required
string
newerOrderId

Always sent with order_superseded.

string
status

Always sent with order_not_retryable.

string

Examples

order_at_printshop

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

Examples

Exampleinvalid_query

invalid_query

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