Skip to content

Set a design's first-order delivery

PUT
/v1/designs/{id}/delivery
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.

id
required
string
Media typeapplication/json
object
recipient
required
object
email

The recipient’s email address, for the carrier’s notices.

string format: email
<= 254 characters
name
required

The recipient’s name as a parcel label carries it, a person’s or a company’s. Up to 200 characters.

string
>= 1 characters <= 200 characters
phone

The recipient’s phone number as the customer gave it, with the country code when it has one.

string
>= 1 characters <= 50 characters
shippingAddress
required
object
city
required

The city or town.

string
>= 1 characters <= 100 characters
company

The company of a business address, which the parcel goes to; the recipient is who receives it.

string
>= 1 characters <= 200 characters
country
required

The country as a two-letter ISO 3166-1 code in capitals, such as SE or US.

string
/^[A-Z]{2}$/
line1
required

The first line of the street address: street and number.

string
>= 1 characters <= 200 characters
line2

The second line of the address: an apartment, floor or c/o.

string
>= 1 characters <= 200 characters
postalCode

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.

string
>= 1 characters <= 20 characters
region

The state, province or county, where the country uses one.

string
>= 1 characters <= 100 characters

Examples

Exampleexample

Example

{
"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"
}
}

Given

Media typeapplication/json
object
capturedAt
required

When it was given.

number
delivery

What that order’s printshop made of the change.

object
at
required

When the change was made.

number
state
required

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.

string
words
required

The printshop’s own answer to a refused change; null otherwise.

string | null
orderId

The open order it changed, once the design was ordered.

string

Examples

Exampleexample

Example

{
"capturedAt": 1791766800000
}
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: bad_request

Media typeapplication/json
object
error
required
string

Examples

Examplebad_request

bad_request

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

Media typeapplication/json
object
error
required
string

Examples

Examplenot_found

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: design_ordered, design_erased, design_rejected, order_closed

Media typeapplication/json
object
closed

Always sent with order_closed.

string
error
required
string

Examples

design_erased

{
"error": "design_erased"
}
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: postal_code_required, payload_too_large

Media typeapplication/json
object
bytes

Sent with payload_too_large.

number
error
required
string
maxBytes

Always sent with payload_too_large.

number

Examples

payload_too_large

{
"error": "payload_too_large",
"maxBytes": 0
}
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: rate_limited

Media typeapplication/json
object
error
required
string

Examples

Examplerate_limited

rate_limited

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

Refused: lock_timeout, address_change_unavailable

Media typeapplication/json
object
error
required
string
reason

Always sent with address_change_unavailable.

string
retryable

Always sent with address_change_unavailable.

boolean

Examples

address_change_unavailable

{
"error": "address_change_unavailable",
"reason": "string",
"retryable": false
}
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