Add or change a sent order's address
const url = 'https://api.pixonaut.app/v1/orders/example/delivery';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"recipient":{"email":"[email protected]","name":"Alexandra Lind","phone":"+44 7700 900123"},"shippingAddress":{"city":"Manchester","country":"GB","line1":"9 Deansgate","postalCode":"M3 2BW"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.pixonaut.app/v1/orders/example/delivery \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "recipient": { "email": "[email protected]", "name": "Alexandra Lind", "phone": "+44 7700 900123" }, "shippingAddress": { "city": "Manchester", "country": "GB", "line1": "9 Deansgate", "postalCode": "M3 2BW" } }'Operation ID: orders.delivery.update
A secret key, a connected store’s integration key, or a studio member holding orders:update. Gives an order its recipient and shippingAddress after it was sent: one placed without them, or one whose customer moved. Both are checked as POST /v1/orders checks them, and an address without the postcode its printshop needs is refused 422 postal_code_required.
The order’s printshop is told, and the order’s delivery says what it made of it: accepted, refused (in its own words; the order keeps the address the printshop has), sending while it is being told, or carried when what the printshop had not been sent yet takes the new address, so nothing extra is sent. A printshop that takes no address changes is refused 409 address_change_not_accepted, naming it: a custom printshop takes them when its acceptsAddressUpdates is on, and an integration when it can tell its partner. An order that has shipped, failed, been cancelled or had its personal data erased, whose outcome is unknown, whose submission has not been answered yet, or that its printshop is already making is refused 409 order_past_address_change, naming its status. A printshop that could not be told is 503 address_change_unavailable, and nothing changed.
Each change emits order.delivery_changed, again when a change that was sending is answered; neither carries the address. Send an Idempotency-Key to make a retried request safe.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”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.
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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Who the order is 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.
Where the order ships.
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.
Examples
Example
{ "recipient": { "name": "Alexandra Lind", "phone": "+44 7700 900123" }, "shippingAddress": { "city": "Manchester", "country": "GB", "line1": "9 Deansgate", "postalCode": "M3 2BW" }}Responses
Section titled “Responses”The order, with its new address
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": "printful", "blank": { "name": "Classic tee", "optionAxes": [ "Color", "Size" ], "variants": 12 }, "blankId": "blank_classic_tee", "delivery": { "at": 1791887210000, "state": "accepted", "words": null }, "designId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c", "externalOrderRef": "PF-889123", "externalRef": "WEB-10482-1", "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": 25, "recipient": { "name": "Alexandra Lind", "phone": "+44 7700 900123" }, "replacedByOrderId": null, "replacesOrderId": null, "shipTo": null, "shippingAddress": { "city": "Manchester", "country": "GB", "line1": "9 Deansgate", "postalCode": "M3 2BW" }, "spotOutput": "process", "status": "queued", "submittedAt": 1791886447000, "tenantId": "acme", "tracking": null, "updatedAt": 1791887210000, "variant": { "fields": [ { "name": "catalogVariantId", "source": "own", "value": "4012" } ], "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: 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_past_address_change, address_change_not_accepted, idempotency_key_in_use
object
Always sent with address_change_not_accepted.
Always sent with order_past_address_change.
Always sent with order_past_address_change.
Examples
address_change_not_accepted
{ "error": "address_change_not_accepted", "printshop": "string"}idempotency_key_in_use
{ "error": "idempotency_key_in_use"}order_past_address_change
{ "error": "order_past_address_change", "status": "string", "words": "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: postal_code_required, idempotency_key_reused, invalid_idempotency_key, payload_too_large
object
Sent with payload_too_large.
Always sent with payload_too_large.
Examples
idempotency_key_reused
{ "error": "idempotency_key_reused"}invalid_idempotency_key
{ "error": "invalid_idempotency_key"}payload_too_large
{ "error": "payload_too_large", "maxBytes": 0}postal_code_required
{ "error": "postal_code_required"}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: address_change_unavailable
object
Always sent with address_change_unavailable.
Always sent with address_change_unavailable.
Examples
address_change_unavailable
{ "error": "address_change_unavailable", "reason": "string", "retryable": false}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].