Skip to content

Read one revision of a design

GET
/v1/designs/{id}/revisions/{revision}
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).

id
required
string
revision
required

A revision number.

string

A revision number.

The revision and its document

Media typeapplication/json
object
choices
required

What the customer chose in this revision, as the template’s form labels it; null when the form could not be read.

Array | null
One of:
object
label
required

The form’s label for the field.

string
layerId
required

The layer the choice is of, as the form names it.

string
prop
required

The prop the form offered, such as content, src or fill.

string
type
required
string
Allowed values: text
value
required

What the customer wrote.

string
createdAt
required
number
createdBy
required

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
name
required
string | null
doc
isCurrent
required

Whether this revision is the design’s document now.

boolean
revision
required
integer

Examples

Exampleexample

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
}
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_id

Media typeapplication/json
object
error
required
string

Examples

Exampleinvalid_id

invalid_id

{
"error": "invalid_id"
}
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, forbidden, feature_disabled, 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: not_found

Media typeapplication/json
object
error
required
string

Examples

Examplenot_found

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: 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