Preview a PDF design
A PDF of a design with options applied, drawn on the sample document, before you publish it: checked as Publish checks it (422 VALIDATION). Saves nothing. 503 BUSY while too many documents are being made.
Required access
- API key
- Change settingspermission
- Request limit
- Counts as 5 requests. Each key has a capacity of 15, restored at 0.6 a second.
Idempotent-Replayed: true. Responses are saved for 24 hours.Headers
Bearer and your key, opk_….
Up to 100 characters (letters, digits, - _ : .). Kept for 24 hours.
application/json. A body is at most 256 KB.
Body
JSONThe theme editor’s controls. A part left out stays as the source design has it; in a part sent, the fields left out do too ({ appearance: { heading_color } } changes one colour). header, block_order and hidden_blocks are replaced whole. Fonts are family names and colours #RRGGBB; every fixed choice (block ids, header fields, sizes, date formats) is snake_case.
Colours and fonts.
A six-digit hex colour, #RRGGBB.
A font family, one of the design’s fonts (Inter, Times New Roman).
A six-digit hex colour, #RRGGBB.
A six-digit hex colour, #RRGGBB.
A six-digit hex colour, #RRGGBB.
A font family, one of the design’s fonts (Inter, Times New Roman).
Heading weight: 400, 600 or 700.
Lines and dividers in the shared accent colour (off: border_color).
Print with the document’s brand colour instead of the colours above.
The blocks in print order (only the design’s blocks).
What prints on the lines and around them.
Print a line’s brand: always, when it differs from the document’s, or never.
One of always, differs, never.
Print item descriptions.
Print the discount column.
Print the header.
Picture size.
One of small, medium, large.
Print line pictures.
Spacing.
One of compact, regular, wide.
Print the supplier.
Text size.
One of small, medium, large.
Layout A designs only: the layout and its options.
Print a line’s brand: always, when it differs from the document’s, or never.
One of always, differs, never.
Print item descriptions.
The layout.
One of standard, atelier, gallery, ledger, studio, heritage, nordic, compact, proposal.
Print the discount column.
Print the header.
Picture size.
One of small, medium, large.
Print line pictures.
Spacing.
One of compact, regular, wide.
Print the supplier.
Text size.
One of small, medium, large.
Quotes, orders, invoices and purchase orders: the rows under Bill to, Ship to and the date column, their titles, and how dates read. Replaces the design’s whole header.
One of 12h, 24h.
How dates read: short_month_first (Nov 24, 2026), short_day_first (24 Nov 2026), long_month_first (November 24, 2026), numeric_month_first (11/24/2026), numeric_day_first (24/11/2026) or iso (2026-11-24).
One of short_month_first, short_day_first, long_month_first, numeric_month_first, numeric_day_first, iso.
Only true: the party rows are set.
One of datetime, date.
store, or an IANA time zone.
Valid until: days, 1–365.
The blocks left out (only those whose can_hide is true).
Job sheets only: the layout and the optional sections.
One of standard, field, compact, ticket.
Summary (totals and signature), terms and wire instructions. Quotes, orders and invoices always print their summary.
Product spec sheets only.
One of preset, one, two.
One of preset, left, right.
One of chips, list.
The design to draw: an id from GET /settings/documents.
Returns
OK
Errors
Errors use { "error": { "code", "message" } }. Use code to handle the error. View all error codes.
The request isn’t valid (see error.code), or the API version isn’t supported.
No valid access token or API key.
The store’s subscription isn’t active.
Not allowed: the API is off for this store, or the caller lacks the scope or permission.
Not found, or not visible to this caller.
Wrong method for this path; Allow lists every method the path takes.
The request body didn’t arrive in time.
The same Idempotency-Key is still being processed (REQUEST_IN_PROGRESS), its outcome is unknown (OUTCOME_UNKNOWN: check the record), or the record changed since it was read.
The request body is too large.
The request is valid JSON but can’t be done (a rule of the store refuses it), or the Idempotency-Key was used with a different body.
The app is older than the oldest version still served (error.code CLIENT_TOO_OLD); see error.min_version and error.upgrade_url.
Over a rate limit; wait Retry-After seconds.
Something went wrong on our side. A write may have partly happened: check the record before retrying it.
Busy, switched off, or billing couldn’t be checked; wait Retry-After seconds.