Check cart items against the layout before printing
const url = 'https://example.com/api/v1/render/check';const options = { method: 'POST', headers: {'X-Label-Hub-Key': '<X-Label-Hub-Key>', 'Content-Type': 'application/json'}, body: '{"items":[{"content_type":"qr_only","lookup":{"app":"example","identifier":"example"}}],"layout_preset":"compact","orientation":"across","tape_mm":1}'};
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://example.com/api/v1/render/check \ --header 'Content-Type: application/json' \ --header 'X-Label-Hub-Key: <X-Label-Hub-Key>' \ --data '{ "items": [ { "content_type": "qr_only", "lookup": { "app": "example", "identifier": "example" } } ], "layout_preset": "compact", "orientation": "across", "tape_mm": 1 }'Looks up every distinct item once (at most eight lookups at a time), draws it for tape_mm with the given orientation and layout_preset, and answers one verdict per item in request order. A failing item does not fail the request: its result carries error_code (qr_payload_too_long, content_type_data_mismatch, integration_item_not_found, integration_unknown_app, integration_lookup_failed, integration_not_configured) and, where it helps, error_detail. Returns 409 (unsupported_tape) before any lookup when the tape width or the orientation is not available. Rate limit: the request’s own token pays for the first distinct lookup, each further one takes another token from the key’s bucket (never more than a full bucket); a request the remaining budget cannot cover is refused with 429 rate_limit_exceeded before any lookup. Nothing is printed and no job is created.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Cart items to check against one tape width and layout.
object
One cart item: how it is drawn and which integration item feeds it.
object
Tape-independent semantic content types for label rendering.
The integration item a label is drawn from.
object
The built-in QL 62 mm across-width layouts (docs/design/ql-layout-presets).
How the label content runs on endless tape.
Responses
Section titled “Responses”Successful Response
One result per request item, in request order.
object
Verdict for the item at index of the request.
Example generated
{ "results": [ { "error_code": "example", "error_detail": {}, "error_message": "example", "index": 1, "ok": true } ]}Unsupported tape width or orientation (unsupported_tape)
Invalid body: no items, more than 50, or an identifier too long
The key’s rate limit cannot cover the lookups (rate_limit_exceeded)