Read one revision of a design
const url = 'https://api.pixonaut.app/v1/designs/example/revisions/example';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/designs/example/revisions/example \ --header 'Authorization: Bearer <token>'Operation ID: designs.revisions.get
The document the design had as this revision. A print names the revision it rendered (designRevision), so this is the document a print shows. choices lists what the customer chose in it, in the order and with the labels of the template’s form: each text they wrote, each picture they put in (an asset id) and each colour they picked (its palette entry’s name, or none for a colour of their own, and its screen swatch).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A revision number.
A revision number.
Responses
Section titled “Responses”The revision and its document
object
What the customer chose in this revision, as the template’s form labels it; null when the form could not be read.
object
The form’s label for the field.
The layer the choice is of, as the form names it.
The prop the form offered, such as content, src or fill.
What the customer wrote.
object
The picture, an asset id; null when the image was left empty or the design’s personal data was erased.
The form’s label for the field.
The layer the choice is of, as the form names it.
The prop the form offered, such as content, src or fill.
object
The colour as the design holds it.
The form’s label for the field.
The layer the choice is of, as the form names it.
The palette entry the customer picked; null for a colour of their own.
The prop the form offered, such as content, src or fill.
What a screen shows the colour as, #rrggbb.
The member who wrote it, named as they are now; null when no member did: a commit, a secret key’s correction, or a revision that predates authorship.
object
Whether this revision is the design’s document now.
Examples
Example
{ "choices": [ { "label": "Name", "layerId": "name", "prop": "content", "type": "text", "value": "Alexandra" } ], "createdAt": 1791763200000, "createdBy": null, "doc": { "background": { "color": { "editable": false, "value": { "cmyk": [ 0, 0, 0, 0 ] } }, "kind": "color" }, "dpi": 300, "fit": "contain", "id": "tshirt-basic", "layers": [ { "anchor": "top-left", "hFrac": 0.12, "id": "name", "name": "Name", "offsetFrac": { "x": 0.1, "y": 0.35 }, "props": { "align": { "editable": false, "value": "center" }, "content": { "constraints": { "maxLength": 24, "maxLines": 1 }, "description": "Printed on the chest.", "editable": true, "label": "Name", "value": "Alexandra" }, "fill": { "editable": false, "value": { "cmyk": [ 89, 74, 44, 76 ] } }, "fontFamily": { "editable": false, "value": "Poppins" }, "fontSizeFrac": { "editable": false, "value": 0.08 } }, "textBox": { "mode": "adapt", "shrinkTo": 0.04, "then": "clamp" }, "transform": { "rotate": { "editable": false }, "scale": { "editable": false }, "translate": { "bounds": "safeArea", "editable": false }, "value": { "rotationDeg": 0, "scale": 1 } }, "type": "text", "wFrac": 0.8, "z": 10 } ], "name": "Basic T-shirt", "ratio": { "h": 4, "w": 3 }, "ratioTolerance": 0.02, "tenantId": "acme", "version": 2 }, "isCurrent": false, "revision": 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_id
object
Examples
invalid_id
{ "error": "invalid_id"}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: origin_forbidden, forbidden, feature_disabled, 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"}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
object
Examples
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: 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].