Naming, keeping and limiting share links
A share link is known by what it opens, and two designer links for one template read alike. A link can carry a name of the workspace’s own, a designer link’s address is kept so it can be copied again, any other link’s lost address can be regenerated, and a designer link can limit how many designs its page makes.
A link’s name
name is taken by every route that hands a link out
(POST /v1/share-links, POST /v1/templates/{id}/designer-links,
POST /v1/designs/{id}/correction-links) and changed with
PATCH /v1/share-links/{id}, where null removes it. The page the link
opens never shows it.
A name is at most 80 characters once trimmed, with its inner spaces made one.
It names one working link of the workspace, case aside, so an automation can
find a link by it: a second link given a name another working link holds is
refused 409 share_link_name_taken, naming the holder. A withdrawn or expired
link frees its name.
Check a name as it is typed, before handing a link out:
GET /v1/share-links?name=Spring%20market%20stand&pageSize=1
An automation keeps the id of the link it was pointed at, not its name, so a
rename never breaks it. A design made through a link names it:
design.committed carries shareLinkId, and the design reads it as
shareLinkId.
{ "name": "Spring market stand" }
A designer link’s address
A designer link sits on a store’s product page until withdrawn, so its
address is kept: GET /v1/share-links answers it as url to whoever may
manage the link. Every other kind is private to one customer, order or
printshop, and its address is shown once, in the response that handed it out;
its url on the list is null. So is a designer link’s handed out before
addresses were kept, until it is regenerated.
A new address for the same link
POST /v1/share-links/{id}/regenerate gives a working link a new address and
answers it once. The old address opens nothing from then on; the link keeps
its id, settings, expiry, history and design count. A designer link whose
address is kept is refused 409 address_kept: copy it again instead.
A designer link’s design limit
designLimit limits the designs a designer link’s page makes: count, from
1 to 10,000, in a period of total, or a rolling hour, day or week
(the last 60 minutes, 24 hours or 7 days). Set it when handing the link out
or with PATCH /v1/share-links/{id}; null removes it.
Each side the page approves counts one: a front and a back count two. Without a return address the page commits each design, which counts. With one, the page hands the store a proof, which counts; the store’s commit of that proof carries the link and is not counted again. Previews, abandoned visits and the store’s own commits from elsewhere do not count.
At the limit, the page shows the customer when the link opens again, or, for a limit in total, to ask the shop for a new link. An approval that would pass the limit is refused whole, with when the link opens again: the moment the oldest design counted leaves the window, or null for a limit in total.
{
"name": "Market stall, 50 a day",
"designLimit": { "count": 50, "period": "day" }
}
Questions? Write to [email protected].