Set a design's first-order delivery
const url = 'https://api.pixonaut.app/v1/designs/example/delivery';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"recipient":{"email":"[email protected]","name":"Alexandra Lind","phone":"+44 20 7946 0958"},"shippingAddress":{"city":"London","country":"GB","line1":"44 Baker Street","line2":"Floor 3","postalCode":"NW1 6XE","region":"Greater London"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.pixonaut.app/v1/designs/example/delivery \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "recipient": { "email": "[email protected]", "name": "Alexandra Lind", "phone": "+44 20 7946 0958" }, "shippingAddress": { "city": "London", "country": "GB", "line1": "44 Baker Street", "line2": "Floor 3", "postalCode": "NW1 6XE", "region": "Greater London" } }'Operation ID: designs.delivery.update
A secret key, an integration key holding orders:create, a member holding orders:update, or the design’s address capture link. Replaces any delivery given before. The design’s first order takes it as its recipient and shippingAddress when its request names neither; an order whose request names either goes by the request alone, and this delivery is dropped. Once the design has an order, it changes the design’s newest open order — or, through an address capture link bound to one order, that order alone — as PATCH /v1/orders/{id}/delivery does, by the customer, when that order’s printshop takes address changes, and answers orderId and the order’s delivery; otherwise it is refused design_ordered, and order_closed once a bound link’s order has shipped, will not be made or its personal data was erased. Refused design_erased once its personal data was erased, and design_rejected once it is rejected. Never written to logs.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
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.
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 20 7946 0958" }, "shippingAddress": { "city": "London", "country": "GB", "line1": "44 Baker Street", "line2": "Floor 3", "postalCode": "NW1 6XE", "region": "Greater London" }}Responses
Section titled “Responses”Given
object
When it was given.
What that order’s printshop made of the change.
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 open order it changed, once the design was ordered.
Examples
Example
{ "capturedAt": 1791766800000}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: not_found
object
Examples
not_found
{ "error": "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: design_ordered, design_erased, design_rejected, order_closed
object
Always sent with order_closed.
Examples
design_erased
{ "error": "design_erased"}design_ordered
{ "error": "design_ordered"}design_rejected
{ "error": "design_rejected"}order_closed
{ "closed": "shipped", "error": "order_closed"}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, payload_too_large
object
Sent with payload_too_large.
Always sent with payload_too_large.
Examples
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: rate_limited
object
Examples
rate_limited
{ "error": "rate_limited"}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, 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}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].