Proof a correction of a design without making it
const url = 'https://api.pixonaut.app/v1/designs/example/correction-proofs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"expectedRevision":2,"values":{"namn":{"content":"Merry Christmas, Anna"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pixonaut.app/v1/designs/example/correction-proofs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "expectedRevision": 2, "values": { "namn": { "content": "Merry Christmas, Anna" } } }'Operation ID: designs.correctionProofs.create
Applies values on top of the design as it is at expectedRevision, under the rules its template version sets and at the size it was committed at, and renders the result, exactly as PATCH /v1/designs/{id} would. Empty values proof the design as it is. Writes nothing to the design. Made in the customer session x-pixonaut-session names, if any, whose wipe deletes it until it is redeemed. The answer’s proofToken is redeemed by PATCH /v1/designs/{id} with {proofToken}, which makes this document the design’s next revision as long as the design is still at expectedRevision. Refused for a design that takes no correction. Through a correction link handed out with adjustLayout, the proof is a layout adjustment of a standing design, ordered or not: values may only move and scale its layers (<layerId>.transform, xMm, yMm and scale), each within the plate, and its token is taken by POST /v1/designs/standing, never by PATCH.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
The design’s revision as the caller read it. When the design has been corrected since, the correction is refused revision_changed.
What to change, in the shape a commit’s values take: an object keyed by the layerId of a field of the design’s correctionForm, each holding an object of that field’s prop and its new value, such as {"<layerId>": {"<prop>": "new wording"}}. Applied on top of the design as it is, so anything not named stays as it was.
object
Examples
Example
{ "expectedRevision": 2, "values": { "namn": { "content": "Merry Christmas, Anna" } }}Responses
Section titled “Responses”The correction’s proof
object
When the proof and its token expire, in milliseconds since the Unix epoch.
The pictures that print below printFloorDpi at the design’s print size. A warning: nothing is refused for it.
object
The picture’s pixels along the edge that decides.
Pixels per inch along that edge, as printed.
The layer the picture fills, or the artwork’s own key for its image background.
The pixels that edge needs at the floor.
The minimum print resolution the design’s pictures were judged against: the template’s own, else the tenant’s.
Redeemed by PATCH /v1/designs/{id} with a secret key or a connected store’s integration key, to make this the design’s next revision.
The proof’s image, for the customer to see.
The revision the proof was made from.
Examples
Example
{ "docHash": "9f2b7c41d0e3a58c", "expiresAt": 1760606400000, "lowResolution": [], "printFloorDpi": 150, "proofToken": "EXAMPLE_proof_token_not_a_real_one", "proofUrl": "https://api.pixonaut.example/p/EXAMPLE_proof_token_not_a_real_one", "revision": 2}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: bad_request
object
Examples
bad_request
{ "error": "bad_request"}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: not_editable, revision_changed, not_standing
object
ordered: a print of the design has an order, so it is what was made; duplicate it instead. erased: the design’s personal data was erased, and it takes nothing more. cut_from_layout: the design is one placement’s print cut from a panel layout’s canvas; commit a new design through the layout (POST /v1/designs/layout) instead. linked: the design is one placement’s print of a linked group, which one design drives; commit the group’s placements again instead. Always sent with not_editable.
Always sent with revision_changed.
Examples
not_editable
{ "error": "not_editable", "reason": "erased"}not_standing
{ "error": "not_standing"}revision_changed
{ "error": "revision_changed", "revision": 0}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: asset_map_too_large, constraint_violation, design_doc_unreadable, payload_too_large
object
Always sent with asset_map_too_large, and may be sent with payload_too_large.
Always sent with asset_map_too_large, payload_too_large.
Always sent with constraint_violation.
object
On a text_draws_fallback_glyphs or text_draws_missing_glyphs warning: the characters the text’s font cannot draw, each once, in the order the text first holds them. Absent on every other violation.
The language whose overrides break the rule, when only the template as it reads in that language does. Absent, the original.
error refuses a publish; warning is worth the author’s attention and never does.
Examples
asset_map_too_large
{ "bytes": 0, "error": "asset_map_too_large", "maxBytes": 0}constraint_violation
{ "error": "constraint_violation", "violations": [ { "given": {}, "layerId": "string", "prop": "string", "rule": "string", "severity": "error" } ]}design_doc_unreadable
{ "error": "design_doc_unreadable"}payload_too_large
{ "error": "payload_too_large", "maxBytes": 0}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: rate_limited
object
Examples
rate_limited
{ "error": "rate_limited"}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.
The caller left before the render started
object
Examples
client_closed_request
{ "error": "client_closed_request"}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, render_failed. A request that failed unexpectedly answers as text instead.
object
Examples
db_error
{ "error": "db_error"}render_failed
{ "error": "render_failed"}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: assets_unavailable, lock_timeout
object
Examples
assets_unavailable
{ "error": "assets_unavailable"}lock_timeout
{ "error": "lock_timeout"}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].