Hand out a correction link for a design
const url = 'https://api.pixonaut.app/v1/designs/example/correction-links';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"returnUrl":"https://shop.acme.example/cart?item=1042","state":"cart-8f2c1a"}'};
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/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).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
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.
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.
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.
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.
Carried back to returnUrl untouched, for the store to match the customer to its own session. Only with returnUrl.
Examples
Example
{ "returnUrl": "https://shop.acme.example/cart?item=1042", "state": "cart-8f2c1a"}Sending the customer back to the store: Correcting a design from the store
{ "returnUrl": "https://shop.acme.example/account/designs?edit=6f1c8a2b", "state": "edit-7c1e"}Responses
Section titled “Responses”The new link
object
The brand the link’s page is drawn in; null for the workspace’s default, whichever that is when it opens.
When the link stops working.
The link’s id, as the share-link list names it.
The workspace’s name for the link.
The link’s token: the SDK’s correctionLink. Shown in this response only.
The hosted correction page, when the link names a returnUrl; null otherwise.
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"}Sending the customer back to the store: Correcting a design from the store
{ "brandId": null, "expiresAt": 1790007200000, "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"}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: return_url_not_https, return_url_off_store, invalid_input
object
Examples
invalid_input
{ "error": "invalid_input"}return_url_not_https
{ "error": "return_url_not_https"}return_url_off_store
{ "error": "return_url_off_store"}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: not_found, brand_not_found
object
Examples
brand_not_found
{ "error": "brand_not_found"}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: not_editable, share_link_name_taken, not_standing
object
The link holding the name. Always sent with share_link_name_taken.
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.
Examples
not_editable
{ "error": "not_editable", "reason": "erased"}not_standing
{ "error": "not_standing"}share_link_name_taken
{ "error": "share_link_name_taken", "holderId": "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: share_link_name_too_long, payload_too_large
object
Sent with payload_too_large.
Always sent with payload_too_large.
The longest name a link may have. Always sent with share_link_name_too_long.
Examples
payload_too_large
{ "error": "payload_too_large", "maxBytes": 0}share_link_name_too_long
{ "error": "share_link_name_too_long", "maxLength": 0}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
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].