Fetch a print's file
const url = 'https://api.pixonaut.app/v1/prints/example/file?part=combined&file=process&form=flat';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/prints/example/file?part=combined&file=process&form=flat' \ --header 'Authorization: Bearer <token>'Operation ID: prints.files.get
The print’s file as stored, or drawn for machineProfile, any machine profile of the tenant’s printshops (a studio member needs printshops:read to name one), or for settings, output settings for this one download; part names the part (combined, print or cut), the print alone by default, and file the process or separated file. With no machine, or one that names no cut name, the default part is print, the stored file; combined then carries a CutContour path, and a rectangular die is drawn as a cut path too. form asks the print’s file flat, layered or layered_live_text, its own form by default: another form is made from the print’s document on its first get and kept, charged as a get of the print’s file is, a form that keeps layers and cannot be made is refused with print_not_layered and why, never served as another in its place, and one whose making failed this time answers print_form_failed, to ask again. The response’s x-print-file-form header names the form served. Getting a print’s files without an order counts as an order the first time, unless an order of the print was placed that is not held or cancelled; getting them again is free. Past the month’s orders, free’s get is refused (plan_limit_reached, limit: "orders"); a paid plan’s draws one from the order balance, and is refused while it is empty (order_balance_empty). Since it counts as an order, the first get takes orders:create (forbidden without it); a print counted already is read with prints:read. A studio session’s first get must come from the studio (session_origin_forbidden from a page elsewhere).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Which form of the print’s files: flat, layered (each printed layer its own optional content group, every glyph a path) or layered_live_text (plain text live as well). Left out, the form the print was made in. Another form is made from the print’s document when it is first asked for, and kept.
Which form of the print’s files: flat, layered (each printed layer its own optional content group, every glyph a path) or layered_live_text (plain text live as well). Left out, the form the print was made in. Another form is made from the print’s document when it is first asked for, and kept.
Responses
Section titled “Responses”The print file
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: plan_limit_reached, order_balance_empty, forbidden, origin_forbidden, feature_disabled, workspace_suspended
object
The feature the tenant does not have. Always sent with feature_disabled.
The limit the tenant is at: templates, connectedStores, apiKeys, shareLinks, customDomains, printsMadePerMonth (prints made without an order this month), members, orders (this month’s orders, which getting a print’s files without an order counts as), or a sandbox’s own caps: sandboxPrintsPerDay, sandboxPrintsPerMonth, sandboxOrdersPerMonth. A sandbox shares every other limit with its live workspace. Always sent with plan_limit_reached.
How many the plan allows. Always sent with plan_limit_reached.
The plan whose limit it is. Always sent with plan_limit_reached.
Examples
feature_disabled
{ "error": "feature_disabled", "feature": "api"}forbidden
{ "error": "forbidden"}order_balance_empty
{ "error": "order_balance_empty"}origin_forbidden
{ "error": "origin_forbidden"}plan_limit_reached
{ "error": "plan_limit_reached", "limit": "templates", "max": 0, "plan": "free"}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: print_not_found, machine_profile_not_found, part_not_offered, separation_not_found, file_not_found, not_found
object
Examples
file_not_found
{ "error": "file_not_found"}machine_profile_not_found
{ "error": "machine_profile_not_found"}not_found
{ "error": "not_found"}part_not_offered
{ "error": "part_not_offered"}print_not_found
{ "error": "print_not_found"}separation_not_found
{ "error": "separation_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: ink_mask_missing, print_profile_unavailable, print_raster_too_large, print_not_layered, invalid_query
object
Always sent with print_raster_too_large, print_not_layered.
Examples
ink_mask_missing
{ "error": "ink_mask_missing"}invalid_query
{ "error": "invalid_query"}print_not_layered
{ "error": "print_not_layered", "reason": "string"}print_profile_unavailable
{ "error": "print_profile_unavailable"}print_raster_too_large
{ "error": "print_raster_too_large", "reason": "string"}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.
Refused: print_form_failed
object
Examples
print_form_failed
{ "error": "print_form_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.
Questions? Write to [email protected].