Submit a failed order again
const url = 'https://api.pixonaut.app/v1/orders/example/retry';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pixonaut.app/v1/orders/example/retry \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'Operation ID: orders.retry
Places a new order for the same print as a failed one, recording which order it replaces. A print of it that failed is rendered again in place, under the same id and from the design revision it was made from, and the new order is awaiting_prints until its prints complete, then goes to its printshop on its own; a render that fails again fails it print_failed, and it may be retried again. A print of it still rendering is waited for in the same way. It goes to the printshop the failed order went to, which is its blank’s: a blank’s printshop is set when the blank is created. A body naming a printshop is refused as unknown. With reroute, the order goes to another blank and its printshop instead, the failed order’s printshop is not called, and no blank moves; it is refused 422 when that blank is unknown or the failed order’s, when a print is left without a placement or two share one, when a print goes elsewhere than the placement of its own name, and when a print does not fit its placement (print_exceeds_placement, print_short_of_area, technique_differs, technique_unknown). Refused when the order is not failed, reached the printshop, or has already been submitted again; refused 422, writing nothing, when the printshop it would go to cannot take it or the design lacks a key that printshop requires, 409 printshop_paused when that printshop is paused, and 422 technique_not_offered when it does not print with the print’s method, and 422 placement_unfilled when a placement the blank must print has no print.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”object
Sends the order to another blank rather than back to its own: the same prints, copies, reference and address, at that blank’s printshop. The prints are not made again, so each must fit the placement it goes to: its trim size within the placement’s largest print, never turned, and made by the placement’s print method. GET /v1/orders/{id}/reroute-targets lists the blanks it fits.
object
The blank to send the order to: any other blank of the workspace. The order goes to its printshop.
Where each print of the order goes on the blank, one placement each. A print goes to the placement of its own placement’s name when the blank has one, matched without regard to case.
object
The placement on the blank the print goes to.
The variant of that blank the order is for, by ref. May be left out for a blank with one variant.
Examples
Example
{}Responses
Section titled “Responses”The new order
object
The blank blankId names, as it reads now; null as blankId is.
object
Its option axes, in order: how a variant’s options read, such as Color then Size.
How many variants it has, retired ones included.
The blank the order’s prints are on; null for prints on no blank, or an order placed before it was recorded.
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
When the change was made.
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.
The printshop’s own answer to a refused change; null otherwise.
The design the lead print was made from.
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.
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
The plan’s monthly order limit the order met.
When the month resets (ISO 8601, UTC): the latest the order is released, if the new month has room for it.
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.
The order’s lead print: the first of printIds, and the only one of an order of one print.
Every print the order holds, the lead first: the prints of one item, each in its own placement on its blank.
printIds with each print’s design, placement and file.
object
The revision of the design the print was made from: GET /v1/designs/{id}/revisions/{revision}/image draws it.
The placement fields the printshop was sent for this print, from its position there; null for an order placed before they were recorded.
object
Where the value came from: the variant’s (or position’s) own, the field’s default, or nothing, sent empty.
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.
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.
Which of this print’s files the printshop was sent; null while the order waits for its prints (awaiting_prints).
Where the print has got to: created while it renders, which an order in awaiting_prints waits for, then completed, or failed.
object
A fill print is made from no design.
A fill print: an optional placement of the blank the order left undesigned, printed flat in this colour (#rrggbb), its fill colour, at the placement’s whole area.
The placement fields the printshop was sent for this print, from its position there; null for an order placed before they were recorded.
object
Where the value came from: the variant’s (or position’s) own, the field’s default, or nothing, sent empty.
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.
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.
Which of this print’s files the printshop was sent; null while the order waits for its prints (awaiting_prints).
Where the print has got to: created while it renders, which an order in awaiting_prints waits for, then completed, or failed.
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
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
The recipient’s email address, for the carrier’s notices.
The recipient’s name as a parcel label carries it, a person’s or a company’s. Up to 200 characters.
The recipient’s phone number as the customer gave it, with the country code when it has one.
The order submitted to replace this one, which names it as replacesOrderId; null for none.
The failed order this one was submitted to replace; null for an order that replaces none.
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
object
The city or town.
The company of a business address, which the parcel goes to; the recipient is who receives it.
The country as a two-letter ISO 3166-1 code in capitals, such as SE or US.
The first line of the street address: street and number.
The second line of the address: an apartment, floor or c/o.
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.
The state, province or county, where the country uses one.
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.
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.
The customer’s address. Where the order ships, unless shipTo is set.
object
The city or town.
The company of a business address, which the parcel goes to; the recipient is who receives it.
The country as a two-letter ISO 3166-1 code in capitals, such as SE or US.
The first line of the street address: street and number.
The second line of the address: an apartment, floor or c/o.
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.
The state, province or county, where the country uses one.
object
Who carries it, such as DHL.
The shipment’s tracking number.
Where the shipment is followed: an https address.
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
Each declared field, in the printshop’s order, as it was sent.
object
Where the value came from: the variant’s (or position’s) own, the field’s default, or nothing, sent empty.
object
The variant the order names; null as blankId is.
Examples
Example
{ "adapter": "custom", "blank": { "name": "Classic tee", "optionAxes": [ "Color", "Size" ], "variants": 12 }, "blankId": "blank_classic_tee", "delivery": null, "designId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c", "externalOrderRef": null, "externalRef": "WEB-10482-1", "failureKind": null, "hold": null, "id": "a7b8c9d0-e1f2-4a3b-9c4d-5e6f7a8b9c0d", "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": [ { "name": "pos", "source": "own", "value": "FR" } ], "placementId": "front", "printId": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f", "printedAs": "Front", "spotOutput": "process", "status": "completed" } ], "printshopAsPlaced": { "adapter": "custom", "name": "Nordic Print Works" }, "printshopConnectionId": "0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e", "printshopName": "Nordic Print Works", "quantity": 25, "recipient": { "name": "Alexandra Lind", "phone": "+44 7700 900123" }, "replacedByOrderId": null, "replacesOrderId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b", "shipTo": null, "shippingAddress": { "city": "London", "country": "GB", "line1": "12 High Street", "line2": "Floor 2", "postalCode": "SW1A 1AA" }, "spotOutput": "process", "status": "submitted", "submittedAt": 1791965767000, "tenantId": "acme", "tracking": null, "updatedAt": 1791965767000, "variant": { "fields": [ { "name": "colorCode", "source": "own", "value": "WHT" }, { "name": "sizeCode", "source": "own", "value": "M" } ], "options": { "Color": "White", "Size": "M" }, "ref": "v_3f9a1c2b7d4e8a01" }, "variantRef": "v_3f9a1c2b7d4e8a01"}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: bad_request
object
Examples
bad_request
{ "error": "bad_request"}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: plan_limit_reached, origin_forbidden, forbidden, feature_disabled, workspace_suspended
object
The feature the tenant does not have. Always sent with feature_disabled.
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.
How many the plan allows. Always sent with plan_limit_reached.
The plan whose limit it is. Always sent with plan_limit_reached.
Examples
feature_disabled
{ "error": "feature_disabled", "feature": "api"}forbidden
{ "error": "forbidden"}origin_forbidden
{ "error": "origin_forbidden"}plan_limit_reached
{ "error": "plan_limit_reached", "limit": "templates", "max": 0, "plan": "free"}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: print_not_found, order_not_found, not_found
object
Examples
not_found
{ "error": "not_found"}order_not_found
{ "error": "order_not_found"}print_not_found
{ "error": "print_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: 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
object
Always sent with stale_update.
Always sent with design_already_ordered.
Always sent with print_ticket_stale.
Always sent with order_superseded.
Always sent with design_already_ordered.
Always sent with printshop_paused.
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.
Examples
design_already_ordered
{ "designId": "string", "error": "design_already_ordered", "orderId": "string"}design_erased
{ "error": "design_erased"}order_at_printshop
{ "error": "order_at_printshop"}order_not_retryable
{ "error": "order_not_retryable", "status": "held"}order_superseded
{ "error": "order_superseded", "newerOrderId": "string"}print_files_deleted
{ "error": "print_files_deleted"}print_needs_printshop
{ "error": "print_needs_printshop"}print_not_completed
{ "error": "print_not_completed", "status": "string"}print_superseded
{ "error": "print_superseded"}print_ticket_stale
{ "detail": "string", "error": "print_ticket_stale"}printshop_paused
{ "error": "printshop_paused", "reason": "string"}stale_update
{ "current": 0, "error": "stale_update"}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: 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, reroute_blank_not_found, reroute_same_blank, print_not_of_order, print_not_mapped, print_mapped_twice, placement_not_of_blank, placement_taken, placement_name_differs, print_exceeds_placement, print_short_of_area, technique_differs, technique_unknown, payload_too_large
object
Always sent with print_short_of_area.
object
Sent with payload_too_large.
Always sent with spot_plate_required.
Always sent with variant_not_of_design_row.
Always sent with print_profile_unavailable.
Always sent with field_value_missing.
Always sent with field_value_missing.
Always sent with prints_disagree.
Always sent with print_exceeds_position, print_exceeds_placement.
object
Always sent with print_exceeds_machine, print_raster_too_large.
Always sent with payload_too_large.
Always sent with print_exceeds_machine.
object
Always sent with technique_not_offered.
Always sent with missing_fulfilment_keys.
Always sent with placement_name_differs.
Always sent with print_profile_unavailable.
Always sent with print_exceeds_position, print_not_position_size, technique_not_offered, placement_unfilled, placement_taken, placement_name_differs, print_exceeds_placement, print_short_of_area, technique_differs, technique_unknown, and may be sent with print_exceeds_machine, print_raster_too_large.
Always sent with duplicate_placement, placement_not_of_blank.
Always sent with technique_differs, technique_unknown.
Always sent with print_exceeds_position, print_not_position_size, and may be sent with field_value_missing.
Always sent with print_profile_unavailable, print_without_placement, print_committed_elsewhere, print_not_of_order, print_not_mapped, print_mapped_twice, placement_name_differs, print_exceeds_placement, print_short_of_area, technique_differs, technique_unknown.
Always sent with placement_taken.
Always sent with technique_differs, technique_unknown.
Always sent with technique_not_offered.
Always sent with print_exceeds_position, print_not_position_size, print_exceeds_machine, print_exceeds_placement, print_short_of_area.
object
Always sent with print_exceeds_machine, print_raster_too_large.
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, reroute_blank_not_found, reroute_same_blank, print_not_of_order, print_not_mapped, print_mapped_twice, placement_not_of_blank, placement_taken, placement_name_differs, print_exceeds_placement, print_short_of_area, technique_differs, technique_unknown.
Always sent with spot_plate_required.
Always sent with variant_not_of_design_row.
object
Always sent with print_not_position_size.
object
Always sent with print_raster_too_large.
object
Always sent with variant_not_of_blank, variant_retired, variant_not_of_design_row.
Always sent with variant_required.
Examples
duplicate_placement
{ "error": "duplicate_placement", "placementId": "string"}field_value_missing
{ "error": "field_value_missing", "field": "string", "fieldKind": "variant", "reason": "string"}missing_fulfilment_keys
{ "error": "missing_fulfilment_keys", "missing": [ "string" ]}mixed_blanks
{ "error": "mixed_blanks"}payload_too_large
{ "error": "payload_too_large", "maxBytes": 0}placement_name_differs
{ "error": "placement_name_differs", "named": "string", "placement": "string", "printId": "string", "reason": "string"}placement_not_of_blank
{ "error": "placement_not_of_blank", "placementId": "string", "reason": "string"}placement_taken
{ "error": "placement_taken", "placement": "string", "printIds": [ "string" ], "reason": "string"}placement_unfilled
{ "error": "placement_unfilled", "placement": "string", "reason": "string"}postal_code_required
{ "error": "postal_code_required"}print_committed_elsewhere
{ "error": "print_committed_elsewhere", "printId": "string"}print_exceeds_machine
{ "error": "print_exceeds_machine", "machine": "string", "mediaMm": { "heightMm": 0, "widthMm": 0 }, "printMm": { "heightMm": 0, "widthMm": 0 }, "printshop": "string", "reason": "string"}print_exceeds_placement
{ "error": "print_exceeds_placement", "largestMm": { "heightMm": 0, "widthMm": 0 }, "placement": "string", "printId": "string", "printMm": { "heightMm": 0, "widthMm": 0 }, "reason": "string"}print_exceeds_position
{ "error": "print_exceeds_position", "largestMm": { "heightMm": 0, "widthMm": 0 }, "placement": "string", "position": "string", "printMm": { "heightMm": 0, "widthMm": 0 }, "reason": "string"}print_mapped_twice
{ "error": "print_mapped_twice", "printId": "string", "reason": "string"}print_not_mapped
{ "error": "print_not_mapped", "printId": "string", "reason": "string"}print_not_of_order
{ "error": "print_not_of_order", "printId": "string", "reason": "string"}print_not_position_size
{ "error": "print_not_position_size", "placement": "string", "position": "string", "printMm": { "heightMm": 0, "widthMm": 0 }, "reason": "string", "sizeMm": { "heightMm": 0, "widthMm": 0 }}print_profile_unavailable
{ "detail": "string", "error": "print_profile_unavailable", "outputProfile": "string", "printId": "string"}print_raster_too_large
{ "error": "print_raster_too_large", "machine": "string", "printshop": "string", "reason": "string", "sizePx": { "heightPx": 0, "widthPx": 0 }}print_short_of_area
{ "areaMm": { "heightMm": 0, "widthMm": 0 }, "error": "print_short_of_area", "placement": "string", "printId": "string", "printMm": { "heightMm": 0, "widthMm": 0 }, "reason": "string"}print_without_placement
{ "error": "print_without_placement", "printId": "string"}prints_disagree
{ "error": "prints_disagree", "key": "string"}printshop_cannot_combine
{ "error": "printshop_cannot_combine"}printshop_differs_from_blank
{ "error": "printshop_differs_from_blank", "reason": "string"}printshop_disconnected
{ "error": "printshop_disconnected", "reason": "string"}printshop_unavailable
{ "error": "printshop_unavailable", "reason": "string"}reroute_blank_not_found
{ "error": "reroute_blank_not_found", "reason": "string"}reroute_same_blank
{ "error": "reroute_same_blank", "reason": "string"}saved_address_not_found
{ "error": "saved_address_not_found"}spot_plate_required
{ "cause": "printshop_takes_no_plates", "error": "spot_plate_required", "references": [ "string" ]}technique_differs
{ "error": "technique_differs", "placement": "string", "placementMethod": "string", "printId": "string", "printMethod": "string", "reason": "string"}technique_not_offered
{ "error": "technique_not_offered", "method": "string", "placement": "string", "printMethods": [ "string" ], "reason": "string"}technique_unknown
{ "error": "technique_unknown", "placement": "string", "placementMethod": "string", "printId": "string", "printMethod": "string", "reason": "string"}unknown_printshop
{ "error": "unknown_printshop", "reason": "string"}variant_not_of_blank
{ "error": "variant_not_of_blank", "reason": "string", "variant": "string"}variant_not_of_design_row
{ "designId": "string", "error": "variant_not_of_design_row", "reason": "string", "row": {}, "variant": "string"}variant_required
{ "error": "variant_required", "reason": "string", "variants": 0}variant_retired
{ "error": "variant_retired", "reason": "string", "variant": "string"}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.
Refused: lock_timeout
object
Examples
lock_timeout
{ "error": "lock_timeout"}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].