Publish a PDF theme

Stable throughout v1

Publish a new version of one of the store’s themes (theme:<id>): only what is sent changes. Send its version as expected_version; a theme changed since is 409 STALE_VERSION. A built-in design can’t be changed: create a theme from it. Documents print the new version from now on.

PATCH/settings/documents/{id}
Base URLhttps://api.meetorderpilot.com/connect/v1
Stable throughout v1

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.
Idempotency-Key requiredRetry with the same key and body to get the original response without repeating the change. The response includes Idempotent-Replayed: true. Responses are saved for 24 hours.

Headers

AuthorizationheaderRequired

Bearer and your key, opk_….

Idempotency-KeyheaderRequired

Up to 100 characters (letters, digits, - _ : .). Kept for 24 hours.

Content-Typeheader

application/json. A body is at most 256 KB.

Parameters

idpath · stringRequired

The design’s id from GET /settings/documents (preset:<key> for a built-in design, theme:<id> for one of the store’s themes).

Body

JSON
brand_idsarray of stringOptional

Exactly the brands that print it (from GET /brands); left out: unchanged.

expected_versionintegerRequired

The theme’s version from GET /settings/documents.

namestringOptional

A new name, 1–80 characters.

optionsobjectOptional

The 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.

appearanceobjectOptional

Colours and fonts.

body_colorstringOptional

A six-digit hex colour, #RRGGBB.

body_fontstringOptional

A font family, one of the design’s fonts (Inter, Times New Roman).

border_colorstringOptional

A six-digit hex colour, #RRGGBB.

header_colorstringOptional

A six-digit hex colour, #RRGGBB.

heading_colorstringOptional

A six-digit hex colour, #RRGGBB.

heading_fontstringOptional

A font family, one of the design’s fonts (Inter, Times New Roman).

heading_weightintegerOptional

Heading weight: 400, 600 or 700.

use_accent_colorbooleanOptional

Lines and dividers in the shared accent colour (off: border_color).

use_brand_colorsbooleanOptional

Print with the document’s brand colour instead of the colours above.

block_orderarray of stringOptional

The blocks in print order (only the design’s blocks).

customizationobjectOptional

What prints on the lines and around them.

brand_linestringOptional

Print a line’s brand: always, when it differs from the document’s, or never.

One of always, differs, never.

descriptionbooleanOptional

Print item descriptions.

discountbooleanOptional

Print the discount column.

headerbooleanOptional

Print the header.

image_sizestringOptional

Picture size.

One of small, medium, large.

imagesbooleanOptional

Print line pictures.

spacingstringOptional

Spacing.

One of compact, regular, wide.

supplierbooleanOptional

Print the supplier.

text_sizestringOptional

Text size.

One of small, medium, large.

galleryobjectOptional

Layout A designs only: the layout and its options.

brand_linestringOptional

Print a line’s brand: always, when it differs from the document’s, or never.

One of always, differs, never.

descriptionbooleanOptional

Print item descriptions.

designstringOptional

The layout.

One of standard, atelier, gallery, ledger, studio, heritage, nordic, compact, proposal.

discountbooleanOptional

Print the discount column.

headerbooleanOptional

Print the header.

image_sizestringOptional

Picture size.

One of small, medium, large.

imagesbooleanOptional

Print line pictures.

spacingstringOptional

Spacing.

One of compact, regular, wide.

supplierbooleanOptional

Print the supplier.

text_sizestringOptional

Text size.

One of small, medium, large.

headerobjectOptional

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.

clockstringOptional

One of 12h, 24h.

date_formatstringOptional

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.

party_rowsbooleanOptional

Only true: the party rows are set.

rowsobjectOptional
timestringOptional

One of datetime, date.

time_zonestringOptional

store, or an IANA time zone.

titlesobjectOptional
valid_for_daysintegerOptional

Valid until: days, 1–365.

hidden_blocksarray of stringOptional

The blocks left out (only those whose can_hide is true).

jobobjectOptional

Job sheets only: the layout and the optional sections.

designstringOptional

One of standard, field, compact, ticket.

sectionsobjectOptional
sectionsobjectOptional

Summary (totals and signature), terms and wire instructions. Quotes, orders and invoices always print their summary.

summarybooleanOptional
termsbooleanOptional
wirebooleanOptional
specobjectOptional

Product spec sheets only.

designerbooleanOptional
detail_columnsstringOptional

One of preset, one, two.

dimensionsbooleanOptional
finishesbooleanOptional
image_placementstringOptional

One of preset, left, right.

notesbooleanOptional
pricebooleanOptional
structurebooleanOptional
swatch_layoutstringOptional

One of chips, list.

technical_drawingbooleanOptional
store_defaultbooleanOptional

True: also what the store prints. False is refused (400): to stop the store printing it, choose the store’s design with POST /settings/documents/assign (brand_id null).

Returns

200

OK: brands, designs, order_fields, saved_id, store_designs

Errors

Errors use { "error": { "code", "message" } }. Use code to handle the error. View all error codes.

400

The request isn’t valid (see error.code), or the API version isn’t supported.

401

No valid access token or API key.

402

The store’s subscription isn’t active.

403

Not allowed: the API is off for this store, or the caller lacks the scope or permission.

404

Not found, or not visible to this caller.

405

Wrong method for this path; Allow lists every method the path takes.

408

The request body didn’t arrive in time.

409

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.

413

The request body is too large.

422

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.

426

The app is older than the oldest version still served (error.code CLIENT_TOO_OLD); see error.min_version and error.upgrade_url.

429

Over a rate limit; wait Retry-After seconds.

500

Something went wrong on our side. A write may have partly happened: check the record before retrying it.

503

Busy, switched off, or billing couldn’t be checked; wait Retry-After seconds.

Was this page useful?