List the blanks a failed order could be sent to
const url = 'https://api.pixonaut.app/v1/orders/example/reroute-targets?page=1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”The page to read, from 1; the first when left out.
The page to read, from 1; the first when left out.
Only the blanks whose name, or whose printshop’s name, holds this text, case aside.
Only the blanks whose name, or whose printshop’s name, holds this text, case aside.
Responses
Section titled “Responses”A page of blanks
object
How many of the total blanks the order fits.
object
For a blank the order fits, each print and the placements it may go to; empty otherwise.
object
object
The largest print it takes.
object
It has the print’s own placement’s name, so the print goes there and nowhere else.
For a blank the order does not fit, why; empty otherwise.
object
object
object
object
The placement’s area: it is printed across all of it, so a print must be that size.
object
object
object
object
object
The print’s own placement’s name; null for none.
object
The names of the blank’s placements, in its order.
The printshop the blank is made at, which the order would go to.
object
How many variants the blank has, retired ones included.
Examples
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}Headers
Section titled “Headers”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
object
Examples
unauthorized
{ "error": "unauthorized"}Headers
Section titled “Headers”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
object
The feature the tenant does not have. Always sent with feature_disabled.
Examples
feature_disabled
{ "error": "feature_disabled", "feature": "api"}forbidden
{ "error": "forbidden"}origin_forbidden
{ "error": "origin_forbidden"}workspace_suspended
{ "error": "workspace_suspended"}Headers
Section titled “Headers”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
object
Examples
not_found
{ "error": "not_found"}order_not_found
{ "error": "order_not_found"}Headers
Section titled “Headers”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
object
Always sent with print_ticket_stale.
Always sent with order_superseded.
Always sent with order_not_retryable.
Examples
order_at_printshop
{ "error": "order_at_printshop"}order_not_retryable
{ "error": "order_not_retryable", "status": "held"}order_superseded
{ "error": "order_superseded", "newerOrderId": "string"}print_ticket_stale
{ "detail": "string", "error": "print_ticket_stale"}Headers
Section titled “Headers”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
object
Examples
invalid_query
{ "error": "invalid_query"}Headers
Section titled “Headers”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
Examples
db_error
{ "error": "db_error"}Headers
Section titled “Headers”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].