List the tenant's templates
const url = 'https://api.pixonaut.app/v1/templates?sort=updated&groupBy=none';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Which templates: all, draft, live, paused. Any other value is refused invalid_status.
Which templates: all, draft, live, paused. Any other value is refused invalid_status.
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.
The page, from 1. A key’s list is always paged.
The page, from 1. A key’s list is always paged.
How many templates a page holds, at most 200; 50 when only page is given.
How many templates a page holds, at most 200; 50 when only page is given.
A member’s page: only the templates filed in this category; none, those filed in none.
A member’s page: only the templates filed in this category; none, those filed in none.
A member’s page: only the templates carrying any of these tags. Repeat it for several.
A member’s page: updated (the default) the most recently updated first, name by name, designs the most designs first, which needs designs:read.
A member’s page: updated (the default) the most recently updated first, name by name, designs the most designs first, which needs designs:read.
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.
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.
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 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.
Responses
Section titled “Responses”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
object
object
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.
The template id, baseId@version, a designer is opened on.
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.
object
The ratio’s height part. Positive.
The ratio’s width part. Positive.
object
object
object
object
object
object
object
object
object
object
Whether the live version’s customer form offers anything to fill in or place: false when every layer is fixed or in no group. 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. Null for a template never published.
A link to the preview of its latest published version that opens with no key, for an hour or two, as a key’s list answers one. Null for a template never published.
The live version’s declared shape, which every print size of it is judged against; null for a template never published.
object
How far from ratio a print size may stray, relative; 0 is that shape only. Null with ratio.
How many rows the list holds across every page; grouped by tag, a template once per tag.
object
object
object
object
object
object
Whether the live version’s customer form offers anything to fill in or place: false when every layer is fixed or in no group. 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. Null for a template never published.
A link to the preview of its latest published version that opens with no key, for an hour or two, as a key’s list answers one. Null for a template never published.
The live version’s declared shape, which every print size of it is judged against; null for a template never published.
object
How far from ratio a print size may stray, relative; 0 is that shape only. Null with ratio.
Examples
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}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: invalid_status
object
Examples
invalid_status
{ "error": "invalid_status"}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: forbidden, origin_forbidden, feature_disabled, secret_key_required, workspace_suspended
object
The feature the tenant does not have. Always sent with feature_disabled.
Examples
feature_disabled
{ "error": "feature_disabled", "feature": "api"}forbidden
{ "error": "forbidden"}origin_forbidden
{ "error": "origin_forbidden"}secret_key_required
{ "error": "secret_key_required"}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: invalid_query
object
Examples
invalid_query
{ "error": "invalid_query"}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.
Questions? Write to [email protected].