Skip to content

Rename a share link or edit its settings

PATCH
/v1/share-links/{id}
curl --request PATCH \
--url https://api.pixonaut.app/v1/share-links/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "designLimit": { "count": 50, "period": "day" }, "name": "Spring market stand" }'

Operation ID: shareLinks.update

Changes a working link’s name or, on a designer link, its design limit and anything it was handed out with, each change audited. The link keeps its id, token and address, so a store’s product page need not change: a visit after the change opens on the new settings, and a design made before keeps what it was made with. A designer link takes every field POST /v1/templates/{id}/designer-links takes, judged as that route judges them, and templateId for the template it opens; what its page shows (the blank and placement, sizes, photos, views, variants, sides, layout and linkedPlacements) is sent whole, and any of it replaces all of it. It is held to the rules a new link is: a side for every placement its blank says an order must print (422 placement_unfilled, naming it), sizes its blank takes (422 variant_row_invalid), a panel layout its blank has (422 unknown_layout), that still fits the blank at the size the link sells (409 layout_out_of_date) and whose canvas is the template’s shape (422 layout_wrong_ratio), and linked sides that print one template (422 linked_templates_differ); its linked groups are kept as a new link keeps them, from its setting or what its blank suggests. Every other field absent is left as it is, and null removes it. Any of them on another kind is refused designer_settings_not_allowed. A name another working link holds is refused share_link_name_taken; a withdrawn or expired link, or one the caller could not have handed out (to a connected store’s integration key, one its store did not hand out), is answered as not found. Nothing is changed when any part is refused.

id
required
string
Media typeapplication/json
object
blankId

The blank it is printed on; with placementId, or a panelLayout.

string
>= 1 characters
designLimit

A designer link’s new design limit; null removes it. Refused design_limit_not_allowed for any other kind.

object
count
required

How many designs the link may make in its period.

integer
>= 1 <= 10000
period
required

total counts every design the link made; hour, day and week the last 60 minutes, 24 hours or 7 days, rolling.

string
Allowed values: total hour day week
expiresInDays

How long a designer link works from the change, in days, up to 365; null, until withdrawn. Absent, it keeps its expiry. Refused expiry_fixed_by_state while the link carries state.

integer | null
> 0 <= 365
initialVariant

The variant the side starts on, by ref: one of variants when it names any.

string
>= 3 characters <= 64 characters
initialView

The view shown first; absent, the side’s first with a photo.

string
>= 1 characters <= 64 characters
layout

How every side’s form lays out its steps: page, every step on one page, or steps, one step at a time. Absent, each side’s form follows its template’s own form.layout, and is a page when the template names none.

string
Allowed values: page steps
linkedPlacements

Which of the sides’ placements one design drives, such as a sweater’s sleeves: a preset, or groups of the sides’ placements, a group with a repeat of its own where it repeats apart from the link. The sides of one group print one template. Absent, the groups the blank suggests whose sides print one template; the link keeps the groups it was made with.

object
designSeparately

Whether the shopper may take a placement out of its group and design it on its own. Absent, no.

boolean
groups

Groups of your own in place of a preset, each a list of placements, or { placements, repeat } for a group that repeats apart from the link. A mirror left out is the blank’s suggestion, else none.

Array
Any of:

Placements one design drives, two at least.

Array<object>
>= 2 items
object
mirror

Whether the placement’s print is mirrored left to right.

boolean
placementId
required

The id of one of the blank’s placements.

string
>= 1 characters
preset

each: every placement is designed on its own. suggested: the groups the blank suggests, such as its sleeves. all: one design drives every placement. Absent with no groups, suggested.

string
Allowed values: each suggested all
locale

The language a designer link’s page is shown in; null for the workspace’s default. An address copied before that names a language (?lang=) keeps showing it: copy the link’s url again.

string | null
Allowed values: en sv de fr es nl da nb fi
mockups

The store’s own product photos the design is shown on, in place of the blank’s views.

Array<object>
>= 1 items <= 50 items
object
displacementStrength

How far the photo’s folds move the design, above 0 and at most 1; absent or null, not at all.

number | null
label
required

What the menu calls the photo.

string
>= 1 characters <= 120 characters
localizedLabels

The label per customer-facing language, by code: only the languages it has one in. A designer shown in a language left out reads label.

object
da
string
>= 1 characters <= 120 characters
de
string
>= 1 characters <= 120 characters
en
string
>= 1 characters <= 120 characters
es
string
>= 1 characters <= 120 characters
fi
string
>= 1 characters <= 120 characters
fr
string
>= 1 characters <= 120 characters
nb
string
>= 1 characters <= 120 characters
nl
string
>= 1 characters <= 120 characters
sv
string
>= 1 characters <= 120 characters
photoSizePx

The size of the photo the rect is measured in, when it is not the size of the image the url serves; absent, the image’s own.

object
h
required

Its height, in pixels.

number
> 0
w
required

Its width, in pixels.

number
> 0
placementRectPx
required

Where the print sits in the photo, in the photo’s pixels.

object
h
required

Its height, in the photo’s pixels.

number
w
required

Its width, in the photo’s pixels.

number
x
required

From the photo’s left edge, in its pixels.

number
y
required

From the photo’s top edge, in its pixels.

number
shadingStrength

How strongly the photo’s light and shade carry onto the design, from 0 (flat) to 1; absent, the default.

number
url
required

The photo’s address, http or https.

string format: uri
<= 2048 characters
viewId

The store’s own name for the way the product is photographed: photos sharing one are one view.

string
>= 1 characters <= 64 characters
warp

How the design wraps round the product in the photo, a mug or a bottle; absent or null, flat.

object
curvature
required

How far round the product the rect reaches, above 0 and at most 1.

number
edgeFalloff

How dark the design turns toward the product’s silhouette, 0 to 1.

number
kind
required

The one kind of wrap: an upright round product.

string
Allowed values: cylinder
name

The link’s new name; null removes it. Unique among the workspace’s working links, case aside.

string | null
panelLayout

The name of a panel layout of the link’s blankId, in place of placementId: the page draws one design across the layout’s canvas, and each placement it lays out gets its print cut from it, so art runs across the seams. Not with sides or printSizes.

string
>= 1 characters <= 200 characters
placementFrame

Whether the link’s page draws the placement frame, the ring and corner handles around the shopper’s picture, at rest, as the SDK’s showPlacementFrame does. Absent, the frame shows only while the picture is dragged or sized on the preview.

boolean
placementId

The blank’s placement it is printed in; with blankId.

string
>= 1 characters
printAreaFrame

Whether the link’s page draws a thin frame around the print area on the product photo, as the SDK’s showPrintAreaFrame does. Absent, no frame.

boolean
printSizes

The sizes the shopper picks from, for a print within its area.

Array<object>
>= 1 items <= 50 items

One size in the size menu.

object
heightMm
required

The print’s height, in mm.

number
> 0
label
required

What the menu calls the size.

string
>= 1 characters <= 120 characters
localizedLabels

The label per customer-facing language, by code: only the languages it has one in. A designer shown in a language left out reads label.

object
da
string
>= 1 characters <= 120 characters
de
string
>= 1 characters <= 120 characters
en
string
>= 1 characters <= 120 characters
es
string
>= 1 characters <= 120 characters
fi
string
>= 1 characters <= 120 characters
fr
string
>= 1 characters <= 120 characters
nb
string
>= 1 characters <= 120 characters
nl
string
>= 1 characters <= 120 characters
sv
string
>= 1 characters <= 120 characters
widthMm
required

The print’s width, in mm.

number
> 0
repeat

Whether every side’s design is laid as a repeat of its template, which layouts the shopper may pick, what it starts as, and whether they may change it or turn it off; a linked group with a repeat of its own takes that instead. Absent, each design is placed once and a request through the link naming a repeat is refused. Not with panelLayout.

object
modes
required

The layouts the shopper may pick, one at least, each once.

Array<string>
>= 1 items
Allowed values: grid brick halfDrop scatter
shopperMayChange
required

Whether the shopper may pick another of modes and another size. Otherwise every design prints as start.

boolean
shopperMayTurnOff
required

Whether the shopper may place the design once instead (repeat: null). Only with shopperMayChange.

boolean
start
required

What the design starts as: a repeat in one of modes, or null for placed once, which needs shopperMayTurnOff. A request through the link that names no repeat is made with it.

object
mode
required

How the tiles are laid: grid lines them up, brick moves every other row along by half a tile, halfDrop moves every other column down by half a tile, and scatter strews them at random places, turns and sizes, arranged by seed.

string
Allowed values: grid brick halfDrop scatter
seed
required

Which arrangement a scatter draws: another seed is another arrangement of the same tile. Read by scatter only.

integer
<= 9007199254740991
size
required

The tile’s width in percent of the print area’s width, above 0 and at most 100; the tile keeps the template’s shape. A tile that would print under 10 mm on a side is drawn at 10 mm.

number
> 0 <= 100
returnUrl

Where a designer link’s page sends the shopper back to, as POST /v1/templates/{id}/designer-links takes it; null removes it, and its state with it. On one of the origins the tenant’s publishable keys are allowed on.

string | null
<= 2048 characters
selectedMockupIndex

The photo that starts selected, by its place in mockups.

integer
selectedPrintSizeIndex

The size that starts selected, by its place in printSizes.

integer
sides

Several sides of one item, a front and a back, each its own template and placement, designed one after the other; then the one-side fields go on each side instead.

Array<object>
>= 2 items <= 10 items
object
blankId

The blank it is printed on; with placementId, or a panelLayout.

string
>= 1 characters
initialVariant

The variant the side starts on, by ref: one of variants when it names any.

string
>= 3 characters <= 64 characters
initialView

The view shown first; absent, the side’s first with a photo.

string
>= 1 characters <= 64 characters
key
required

The side’s own short name, such as front: lowercase letters, digits, - and _, unique within the link.

string
/^[a-z0-9_-]{1,32}$/
label
required

What the side’s step is called, such as Front.

string
>= 1 characters <= 120 characters
localizedLabels

The label per customer-facing language, by code: only the languages it has one in. A designer shown in a language left out reads label.

object
da
string
>= 1 characters <= 120 characters
de
string
>= 1 characters <= 120 characters
en
string
>= 1 characters <= 120 characters
es
string
>= 1 characters <= 120 characters
fi
string
>= 1 characters <= 120 characters
fr
string
>= 1 characters <= 120 characters
nb
string
>= 1 characters <= 120 characters
nl
string
>= 1 characters <= 120 characters
sv
string
>= 1 characters <= 120 characters
mockups

The store’s own product photos the design is shown on, in place of the blank’s views.

Array<object>
>= 1 items <= 50 items
object
displacementStrength

How far the photo’s folds move the design, above 0 and at most 1; absent or null, not at all.

number | null
label
required

What the menu calls the photo.

string
>= 1 characters <= 120 characters
localizedLabels

The label per customer-facing language, by code: only the languages it has one in. A designer shown in a language left out reads label.

object
da
string
>= 1 characters <= 120 characters
de
string
>= 1 characters <= 120 characters
en
string
>= 1 characters <= 120 characters
es
string
>= 1 characters <= 120 characters
fi
string
>= 1 characters <= 120 characters
fr
string
>= 1 characters <= 120 characters
nb
string
>= 1 characters <= 120 characters
nl
string
>= 1 characters <= 120 characters
sv
string
>= 1 characters <= 120 characters
photoSizePx

The size of the photo the rect is measured in, when it is not the size of the image the url serves; absent, the image’s own.

object
h
required

Its height, in pixels.

number
> 0
w
required

Its width, in pixels.

number
> 0
placementRectPx
required

Where the print sits in the photo, in the photo’s pixels.

object
h
required

Its height, in the photo’s pixels.

number
w
required

Its width, in the photo’s pixels.

number
x
required

From the photo’s left edge, in its pixels.

number
y
required

From the photo’s top edge, in its pixels.

number
shadingStrength

How strongly the photo’s light and shade carry onto the design, from 0 (flat) to 1; absent, the default.

number
url
required

The photo’s address, http or https.

string format: uri
<= 2048 characters
viewId

The store’s own name for the way the product is photographed: photos sharing one are one view.

string
>= 1 characters <= 64 characters
warp

How the design wraps round the product in the photo, a mug or a bottle; absent or null, flat.

object
curvature
required

How far round the product the rect reaches, above 0 and at most 1.

number
edgeFalloff

How dark the design turns toward the product’s silhouette, 0 to 1.

number
kind
required

The one kind of wrap: an upright round product.

string
Allowed values: cylinder
placementId

The blank’s placement it is printed in; with blankId.

string
>= 1 characters
printSizes

The sizes the shopper picks from, for a print within its area.

Array<object>
>= 1 items <= 50 items

One size in the size menu.

object
heightMm
required

The print’s height, in mm.

number
> 0
label
required

What the menu calls the size.

string
>= 1 characters <= 120 characters
localizedLabels

The label per customer-facing language, by code: only the languages it has one in. A designer shown in a language left out reads label.

object
da
string
>= 1 characters <= 120 characters
de
string
>= 1 characters <= 120 characters
en
string
>= 1 characters <= 120 characters
es
string
>= 1 characters <= 120 characters
fi
string
>= 1 characters <= 120 characters
fr
string
>= 1 characters <= 120 characters
nb
string
>= 1 characters <= 120 characters
nl
string
>= 1 characters <= 120 characters
sv
string
>= 1 characters <= 120 characters
widthMm
required

The print’s width, in mm.

number
> 0
selectedMockupIndex

The photo that starts selected, by its place in mockups.

integer
selectedPrintSizeIndex

The size that starts selected, by its place in printSizes.

integer
templateId

The template’s base id; the link’s own when absent.

string
>= 1 characters
variantRow

The size the side sells, as a value of each option its blank’s print areas change with ({"Size": "XL"}): its proofs and designs are made at that size, and a request naming another is refused. Only on a blank whose print areas change with its size; absent, the shopper’s request names the size.

object
key
additional properties
string
>= 1 characters <= 80 characters
variants

The blank’s variants offered, by ref; empty or absent, all.

Array<string>
<= 50 items
views

The blank’s views the side is shown in; empty or absent, all.

Array<string>
<= 50 items
state

What a designer link carries back to its returnUrl; null removes it. Setting one makes the link one shopper’s visit again: it works for 24 hours from the change.

string | null
>= 1 characters <= 512 characters
templateId

A designer link’s template, by base id: the one a link with one side opens, and a side naming none. Sent with what the page shows; absent, the link keeps its template.

string
>= 1 characters
variantRow

The size the side sells, as a value of each option its blank’s print areas change with ({"Size": "XL"}): its proofs and designs are made at that size, and a request naming another is refused. Only on a blank whose print areas change with its size; absent, the shopper’s request names the size.

object
key
additional properties
string
>= 1 characters <= 80 characters
variants

The blank’s variants offered, by ref; empty or absent, all.

Array<string>
<= 50 items
views

The blank’s views the side is shown in; empty or absent, all.

Array<string>
<= 50 items

Examples

Example

{
"designLimit": {
"count": 50,
"period": "day"
},
"name": "Spring market stand"
}

The link as it now stands

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
createdAt
required
number
createdBy
required

The member who handed it out; null when no member did.

object
name
required
string | null
userId
required
string
createdByKey
required

The secret key or connected store that handed the link out.

object
id
required
string
kind
required

sk for a secret key, ik for a connected store; null once the key is gone.

string | null
name
required

The key’s label, or the store’s; null once the key is gone.

string | null
designLimit
required

How many designs a designer link may make; null for none.

object
count
required

How many designs the link may make in its period.

integer
>= 1 <= 10000
period
required

total counts every design the link made; hour, day and week the last 60 minutes, 24 hours or 7 days, rolling.

string
reopensAt
required

At the limit, when the link makes designs again; null below it, and for a total limit.

number | null
used
required

The designs the limit counts now: one per side approved, in the rolling window.

integer
designs
required

How many designs a designer link made, one per side approved; null for any other kind.

integer | null
expiresAt
required

When the link stops working; null for one that never does.

number | null
id
required
string
kind
required
string
lastOpenedAt
required

When its page last opened, to the hour; null for never.

number | null
locale
required

The language the link’s page is shown in, which its url names as ?lang=<locale>; null when it names none, and the page is shown in the workspace’s default language.

string | null
mayDecide
required
boolean
name
required

The workspace’s name for the link.

string | null
placementFrame
required

Whether a designer link’s page draws the placement frame around the shopper’s picture at rest; false for every other link.

boolean
printAreaFrame
required

Whether a designer link’s page draws the print area’s frame; false for every other link.

boolean
returnUrl
required
string | null
source
required

Who handed it out: member; key, a secret key or connected store (createdByKey, null for a key the deployment configures); auto, sent with an order to a custom printshop.

string
subject
required

What the link is about; null once it no longer exists.

object
label
required

The subject’s name: a template’s name; for a design, the name of its template; for an order, its external reference, null when it has none.

string | null
meta
required
One of:
object
blank
required

The blank its sides are printed on; null for none.

object
id
required
string
name
required
string | null
carriesVisit
required

Whether the link carries one shopper’s visit (state).

boolean
returnHost
required

The host its page sends a shopper back to; null for none.

string | null
sides
required

One entry per side, one for a link with one.

Array<object>
object
key
required
string | null
label
required
string | null
printSizes
required

The sizes its menu offers; empty for none.

Array<object>
object
heightMm
required
number
label
required
string
widthMm
required
number
type
required
string
Allowed values: template
warning
required

What keeps the page from opening for now: template_paused (it opens again once the template is live), printshop_disconnected; null for nothing.

string | null
subjectId
required
string
url
required

A designer link’s address, which it keeps: it sits on a store’s page until withdrawn. It carries ?lang=<locale> when the link names a locale. Null for every other kind, whose address is shown once, and for a designer link made before addresses were kept until it is regenerated.

string | null

Examples

Exampleexample

Example

{
"brandId": null,
"createdAt": 1760000000000,
"createdBy": {
"name": "Alexandra Lind",
"userId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
},
"createdByKey": null,
"designLimit": {
"count": 50,
"period": "day",
"reopensAt": null,
"used": 7
},
"designs": 212,
"expiresAt": null,
"id": "shl_9a8b7c6d5e4f3a2b1c0d9e8f",
"kind": "designer",
"lastOpenedAt": 1760400000000,
"locale": null,
"mayDecide": false,
"name": "Spring market stand",
"placementFrame": false,
"printAreaFrame": false,
"returnUrl": null,
"source": "member",
"subject": {
"label": "Student sign",
"meta": {
"blank": null,
"carriesVisit": false,
"returnHost": null,
"sides": [
{
"key": null,
"label": null,
"printSizes": [
{
"heightMm": 297,
"label": "A3",
"widthMm": 420
}
]
}
],
"type": "template"
},
"warning": null
},
"subjectId": "graduation-sign",
"url": "https://app.pixonaut.example/h/design/EXAMPLE_designer_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: design_limit_not_allowed, designer_settings_not_allowed, return_url_not_https, return_url_off_store, state_needs_return_url, expiry_fixed_by_state, invalid_input

Media typeapplication/json
object
error
required
string

Examples

design_limit_not_allowed

{
"error": "design_limit_not_allowed"
}
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, feature_disabled

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

Media typeapplication/json
object
error
required
string

Examples

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: share_link_name_taken, layout_out_of_date

Media typeapplication/json
object
error
required
string
holderId

The link holding the name. Always sent with share_link_name_taken.

string | null
reason

Always sent with layout_out_of_date.

string

Examples

layout_out_of_date

{
"error": "layout_out_of_date",
"reason": "string"
}
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, unknown_placement, print_size_illegal, placement_unfilled, variant_row_invalid, unknown_layout, layout_wrong_ratio, linked_templates_differ, payload_too_large

Media typeapplication/json
object
bytes

Sent with payload_too_large.

number
error
required
string
index

The size’s place in the side’s menu. Always sent with print_size_illegal.

integer
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
placement

Always sent with placement_unfilled.

string
reason

With print_size_illegal: too_large: larger than the placement takes. print_size_not_area: smaller than a placement printed across its whole area. wrong_ratio: further from the template’s shape than its tolerance allows. Always sent with print_size_illegal, placement_unfilled, variant_row_invalid, layout_wrong_ratio. With print_size_illegal: one of too_large, print_size_not_area, wrong_ratio.

string
side

The side’s key; null on a link with one side. Always sent with print_size_illegal.

string | null

Examples

layout_wrong_ratio

{
"error": "layout_wrong_ratio",
"reason": "string"
}
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.

Questions? Write to [email protected].

Status · Terms of service · Privacy policy · Subprocessors