Fetch every file of a print as one zip
const url = 'https://api.pixonaut.app/v1/prints/example/bundle';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/bundle \ --header 'Authorization: Bearer <token>'Operation ID: prints.files.bundle
Every file the print can be handed out as stored, each part and file, in one zip, in the folder as-stored; and for each set add names, the same print drawn for a machine profile of the tenant’s printshops (a studio member needs printshops:read to name one) or with output settings for this download only, in a folder of its own. A file a machine makes none of is left out. 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”Sets of files to add beside the print’s own, as a JSON array: each {"machineProfile": "<id>"}, a machine profile of the tenant’s printshops, or {"settings": {…}}, output settings for this download only. At most 10.
Sets of files to add beside the print’s own, as a JSON array: each {"machineProfile": "<id>"}, a machine profile of the tenant’s printshops, or {"settings": {…}}, output settings for this download only. At most 10.
Responses
Section titled “Responses”The print’s files, zipped
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, 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"}print_not_found
{ "error": "print_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, invalid_query
object
Always sent with print_raster_too_large.
Examples
ink_mask_missing
{ "error": "ink_mask_missing"}invalid_query
{ "error": "invalid_query"}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.
Questions? Write to [email protected].