Submit a print job
const url = 'https://example.com/api/v1/print';const options = { method: 'POST', headers: {'X-Label-Hub-Key': '<X-Label-Hub-Key>', 'Content-Type': 'application/json'}, body: '{"content_type":"qr_only","data":{"items":[],"primary_id":"example","qr_payload":"example","secondary":[],"title":"example"},"lookup":{"app":"example","identifier":"example"},"options":{"auto_cut":true,"copies":1,"half_cut":false,"high_resolution":false,"last_page":true}}'};
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/print \ --header 'Content-Type: application/json' \ --header 'X-Label-Hub-Key: <X-Label-Hub-Key>' \ --data '{ "content_type": "qr_only", "data": { "items": [], "primary_id": "example", "qr_payload": "example", "secondary": [], "title": "example" }, "lookup": { "app": "example", "identifier": "example" }, "options": { "auto_cut": true, "copies": 1, "half_cut": false, "high_resolution": false, "last_page": true } }'Submit a label-print job. The job is queued and dispatched asynchronously by the queue worker. Returns 202 with the new job’s UUID and state queued. Returns 4xx/5xx on printer errors (tape mismatch, offline, cover open, etc.).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”POST /api/v1/print body.
Either data (RawLabelData) or lookup (PrintLookupRequest) is provided.
Exactly one of the two must be present.
object
Tape-independent semantic content types for label rendering.
Raw label payload accepted when the client supplies data directly.
Mirrors LabelData minus source_app (set server-side to ‘manual’).
All content fields are optional — ContentType-specific validation
happens in LayoutEngine._validate_data.
Every free text is bounded at the request (the same caps as sheet items): 512 characters
per text and QR payload, at most 10 secondary lines and 100 items. A label shows
far less; the renderer shortens what does not fit (#258 security review).
object
Resolve label data via an integration plugin.
object
Per-print options — copies, cut behaviour, resolution, layout.
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
POST /api/v1/print 202 body — queue accepted.
object
Example
{ "status": "queued"}Validation Error
object
object
object
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}