Skip to content

Hand out a correction link for a design

POST
/v1/designs/{id}/correction-links
curl --request POST \
--url https://api.pixonaut.app/v1/designs/example/correction-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "returnUrl": "https://shop.acme.example/cart?item=1042", "state": "cart-8f2c1a" }'

Operation ID: designs.correctionLinks.create

A share link that reopens this one design in the designer, for a store to let its customer correct it: the SDK’s credential (correctionLink) on the store’s own page, or, with a returnUrl, a hosted correction page that returns to the store. It works for 2 hours, from the store’s pages and the hosted ones, for this design only. Approving in the designer makes a proof of the correction and writes nothing; PATCH /v1/designs/{id} with that proof’s token makes it the design’s next revision. Refused for a design that takes no correction. With adjustLayout, the link lays a standing design out instead, and its proofs make standing designs of their own (POST /v1/designs/standing).

id
required
string
Media typeapplication/json
object
adjustLayout

Open a standing design for its layout alone, ordered or not: the designer moves and scales its printed layers within the plate and offers nothing else, and approving makes a layout adjustment’s proof, whose token POST /v1/designs/standing makes a standing design of its own from. The design it was opened on is never changed. Refused not_standing for a design that is not a standing design. Left out or false, the link corrects the design.

boolean
brandId

The brand the link’s page is drawn in: its name, logo and accent colour (GET /v1/brands). Refused brand_not_found unless it is one of the workspace’s. Absent, a link a connected store’s key hands out keeps the store’s brand, and any other is drawn in whichever brand is the workspace’s default when it opens. A brand a link that still opens names cannot be deleted.

string
>= 1 characters
name

The workspace’s own name for the link (Spring market stand), at most 80 characters, never shown on its page. Trimmed, inner spaces made one; empty is no name. Unique among the workspace’s working links, case aside: one another holds is refused share_link_name_taken naming the holder, a longer one share_link_name_too_long. A withdrawn or expired link frees its name.

string
returnUrl

Where the hosted correction page sends the customer back to: with state and the corrected proof’s proofToken once they approve, with state alone when they cancel. Without it, the link is the SDK’s credential only, and opens no page. On one of the origins the tenant’s publishable keys are allowed on.

string
<= 2048 characters
state

Carried back to returnUrl untouched, for the store to match the customer to its own session. Only with returnUrl.

string
>= 1 characters <= 512 characters

Examples

Example

{
"returnUrl": "https://shop.acme.example/cart?item=1042",
"state": "cart-8f2c1a"
}

The new link

Media typeapplication/json
object
brandId
required

The brand the link’s page is drawn in; null for the workspace’s default, whichever that is when it opens.

string | null
expiresAt
required

When the link stops working.

number
id
required

The link’s id, as the share-link list names it.

string
name
required

The workspace’s name for the link.

string | null
token
required

The link’s token: the SDK’s correctionLink. Shown in this response only.

string
url
required

The hosted correction page, when the link names a returnUrl; null otherwise.

string | null

Examples

Example

{
"brandId": null,
"expiresAt": 1760007200000,
"id": "shl_5d0c9e3b7a1f2e4d6c8b0a91",
"name": null,
"token": "EXAMPLE_correction_link_token_not_a_real_one",
"url": "https://app.pixonaut.example/h/correct/EXAMPLE_correction_link_token_not_a_real_one"
}
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: return_url_not_https, return_url_off_store, invalid_input

Media typeapplication/json
object
error
required
string

Examples

invalid_input

{
"error": "invalid_input"
}
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: plan_limit_reached, 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
limit

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.

string
max

How many the plan allows. Always sent with plan_limit_reached.

number
plan

The plan whose limit it is. Always sent with plan_limit_reached.

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, brand_not_found

Media typeapplication/json
object
error
required
string

Examples

brand_not_found

{
"error": "brand_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: not_editable, share_link_name_taken, not_standing

Media typeapplication/json
object
error
required
string
holderId

The link holding the name. Always sent with share_link_name_taken.

string | null
reason

ordered: a print of the design has an order, so it is what was made; duplicate it instead. erased: the design’s personal data was erased, and it takes nothing more. cut_from_layout: the design is one placement’s print cut from a panel layout’s canvas; commit a new design through the layout (POST /v1/designs/layout) instead. linked: the design is one placement’s print of a linked group, which one design drives; commit the group’s placements again instead. Always sent with not_editable.

string

Examples

not_editable

{
"error": "not_editable",
"reason": "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: share_link_name_too_long, 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
maxLength

The longest name a link may have. Always sent with share_link_name_too_long.

integer

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

Media typeapplication/json
object
error
required
string

Examples

Examplelock_timeout

lock_timeout

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