Skip to content

List the tenant's templates

GET
/v1/templates
curl --request GET \
--url 'https://api.pixonaut.app/v1/templates?sort=updated&groupBy=none' \
--header 'Authorization: Bearer <token>'

Operation ID: templates.list

A key is answered a page of the tenant’s live templates by name (items, total, page, pageSize): each one’s template id, base id, name, latest version, the ratio and tolerance a print size is judged against, the field keys its offered fields carry, and previewUrl, a link to its preview that opens with no key for an hour or two. q keeps the templates whose name holds it, case aside; a key may ask for status=live alone. With ids, any caller is answered those of the templates named that are live, in one page; a publishable key may read nothing else here, and is refused secret_key_required without them.

status

Which templates: all, draft, live, paused. Any other value is refused invalid_status.

string

Which templates: all, draft, live, paused. Any other value is refused invalid_status.

q
string
<= 200 characters
ids
Any of:
string

The templates to read, each baseId@version, at most 200; repeat it for several. Answers those that are live, in the order named, and leaves out the rest. The only list a publishable key may read, and taken alone: no other filter or page beside it.

page

The page, from 1. A key’s list is always paged.

integer
>= 1 <= 100000

The page, from 1. A key’s list is always paged.

pageSize

How many templates a page holds, at most 200; 50 when only page is given.

integer
>= 1 <= 200

How many templates a page holds, at most 200; 50 when only page is given.

category

A member’s page: only the templates filed in this category; none, those filed in none.

string
>= 1 characters <= 200 characters

A member’s page: only the templates filed in this category; none, those filed in none.

tag
Any of:
string
<= 200 characters

A member’s page: only the templates carrying any of these tags. Repeat it for several.

sort

A member’s page: updated (the default) the most recently updated first, name by name, designs the most designs first, which needs designs:read.

string
Allowed values: updated name designs

A member’s page: updated (the default) the most recently updated first, name by name, designs the most designs first, which needs designs:read.

groupBy

A member’s page: the rows ordered by their group (live, paused, draft; categories by name, none last; tags the most used first, none last), sort within each, each row naming its group. Under tag a template is listed under each of its tags.

string
Allowed values: none status category tag

A member’s page: the rows ordered by their group (live, paused, draft; categories by name, none last; tags the most used first, none last), sort within each, each row naming its group. Under tag a template is listed under each of its tags.

pageOf

A member’s page: with no page, the page that holds this template, the first place it is listed; page 1 when the filter leaves it out.

string
>= 1 characters <= 200 characters

A member’s page: with no page, the page that holds this template, the first place it is listed; page 1 when the filter leaves it out.

A key’s page of live templates, or those named by ids; a member’s archive: the tenant’s templates and what the whole archive counts, or with page, pageSize or pageOf one page of it, arranged, with its place in the whole and what its filters and groups count

Media typeapplication/json
Any of:
object
items
required
Array<object>
object
baseId
required
string
fieldKeys
required

The field keys of the fields a customer is offered: a value set on one is shown by any template with a field of the same key.

Array<string>
id
required

The template id, baseId@version, a designer is opened on.

string
latestVersion
required
number
name
required
string
offersProperties
required

Whether the customer’s form offers anything to fill in or place: false when every layer is fixed or in no group, so a customer designing on it can change nothing. A store warns a merchant who sells a template meant to be filled in as a fixed product, or one that offers nothing as personalised.

boolean
previewUrl
required
string
ratio
required
object
h
required

The ratio’s height part. Positive.

number
> 0
w
required

The ratio’s width part. Positive.

number
> 0
ratioTolerance
required
number
page
required
number
pageSize
required
number
total
required
number

Examples

Exampleexample

Example

{
"items": [
{
"baseId": "studentskylt-ballonger",
"fieldKeys": [
"name",
"class",
"photo"
],
"id": "studentskylt-ballonger@3",
"latestVersion": 3,
"name": "Graduation sign with balloons",
"offersProperties": true,
"previewUrl": "https://api.pixonaut.example/i/eyJhdWQiOiJjYXRhbG9ndWUtaW1hZ2UifQ.c2lnbmF0dXJl",
"ratio": {
"h": 3,
"w": 2
},
"ratioTolerance": 0.05
}
],
"page": 1,
"pageSize": 50,
"total": 1
}
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: invalid_status

Media typeapplication/json
object
error
required
string

Examples

Exampleinvalid_status

invalid_status

{
"error": "invalid_status"
}
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: forbidden, origin_forbidden, feature_disabled, secret_key_required, 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: invalid_query

Media typeapplication/json
object
error
required
string

Examples

Exampleinvalid_query

invalid_query

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