Cloud Print API
The Cloud Print API sends labels to printers connected through the LabelZoom Print Agent. Cloud Print is in public beta.
Before you begin
Section titled “Before you begin”- Install and enroll the Print Agent, and add a printer. See LabelZoom Print Agent.
- Create an API key with the
printscope in the dashboard.
Authentication and scopes
Section titled “Authentication and scopes”The base URL is https://api.labelzoom.com/api/v3. Send your API key as a bearer token:
Authorization: Bearer API_KEY| Scope | Can call |
|---|---|
print |
Every endpoint on this page. A print key also has the convert scope. |
convert |
List, get, and render templates. |
A key without the required scope gets 403. An API key can’t manage agents, printers, or templates; those requests return 401. Use these instead:
| Task | Where |
|---|---|
| Enroll or remove an agent | Printers page |
| Add or remove a printer, or add a failover agent | Printers page. To change a printer’s settings, remove it and add it again. |
| Refresh a printer’s status, or retry a failed job | Printers page |
| Publish a template | LabelZoom Studio or the web designer |
| Delete a template | Print templates page |
Endpoints
Section titled “Endpoints”| Method | Path | Description |
|---|---|---|
GET |
/printers |
List printers. |
GET |
/printers/{printerId}/status |
Get a printer’s status. |
POST |
/printers/{printerId}/print |
Send a document to a printer. |
GET |
/printers/{printerId}/jobs |
List a printer’s jobs. |
GET |
/jobs/{jobId} |
Get a print job. |
GET |
/print/quota |
Get your account’s limits and usage. |
GET |
/templates |
List templates. |
GET |
/templates/{templateId} |
Get a template. |
POST |
/printers/{printerId}/templates/{templateId}/print |
Print a template. |
POST |
/templates/{templateId}/convert |
Render a template without printing it. |
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Document size | 4 MB as sent, and 8 MB after conversion to the printer’s language |
| Entries in a template batch | 25 |
copies |
1 to 9999 |
| Print requests | Rate limited per account. A 429 includes Retry-After. |
Call GET /print/quota for your account’s current agent, printer, and daily job limits:
curl "https://api.labelzoom.com/api/v3/print/quota" -H "Authorization: Bearer API_KEY"The response holds plan, the size limits, and used, limit, and remaining counts for agents, printers, and jobsToday. The daily count resets at 00:00 UTC. Trimmed response:
{ "plan": "beta", "limits": { "maxPayloadBytes": 4194304, "maxStoredPayloadBytes": 8388608, "maxBatchSize": 25 }}A request that hits a limit returns 409, 413, or 429 with a code. See Error codes.
Print from an SDK
Section titled “Print from an SDK”Each LabelZoom SDK prints a document or a template, gets a job, and reads the quota. A printer is the target of a conversion, so a print takes the same source options as a conversion. Every print sends an Idempotency-Key, so the SDK’s automatic retries can’t print a label twice; set your own key to make a repeated call safe too.
import { readFile } from 'node:fs/promises';import { LabelZoomClient } from '@labelzoom/sdk';
const client = new LabelZoomClient({ apiKey: 'API_KEY' }); // needs the print scope
const job = await client.convert() .fromPdf(await readFile('label.pdf')) .toPrinter('PRINTER_ID') .withCopies(2) .withIdempotencyKey('SO-1001') .execute();
const batch = await client.convert() .fromTemplate('TEMPLATE_ID') .withData({ orderNumber: 'SO-1001', sku: 'A-100' }) .toPrinter('PRINTER_ID') .execute();
const details = await client.jobs.get(job.jobId);console.log(details.status, batch.jobs.length);from pathlib import Pathfrom labelzoom import LabelZoomClient
with LabelZoomClient("API_KEY") as client: job = client.print( "pdf", "PRINTER_ID", Path("label.pdf").read_bytes(), copies=2, idempotency_key="SO-1001", )
batch = client.print_template( "TEMPLATE_ID", "PRINTER_ID", [{"orderNumber": "SO-1001", "sku": "A-100"}], )
details = client.jobs.get(job.job_id) print(details.status)try (LabelZoomClient client = LabelZoomClient.builder().build()) { // reads LABELZOOM_API_KEY PrintJob job = client.convert() .fromPdf(Files.readAllBytes(Path.of("shipping-label.pdf"))) .toPrinter("PRINTER_ID") .withCopies(2) .withIdempotencyKey("SO-1001") .execute();
PrintBatch batch = client.convert() .fromTemplate("TEMPLATE_ID") .withData(Map.of("orderNumber", "SO-1001", "sku", "A-100")) .toPrinter("PRINTER_ID") .execute();
PrintJobDetails details = client.jobs().get(job.jobId()); System.out.println(details.status()); // for example, "dispatched" or "completed"}using LabelZoom.Sdk;
using var client = new LabelZoomClient("API_KEY"); // needs the print scope
var job = await client.Convert() .FromPdf(File.ReadAllBytes("label.pdf")) .ToPrinter("PRINTER_ID") .WithCopies(2) .WithIdempotencyKey("SO-1001") .ExecuteAsync();
var batch = await client.Convert() .FromTemplate("TEMPLATE_ID") .WithData(new { orderNumber = "SO-1001", sku = "A-100" }) .ToPrinter("PRINTER_ID") .ExecuteAsync();
var details = await client.Jobs.GetAsync(job.JobId);Console.WriteLine(details.Status); // queued, dispatched, printing, completed, or failed$job = $client->convert() ->fromPdf(file_get_contents('shipping-label.pdf')) ->toPrinter('PRINTER_ID') ->withCopies(2) ->withIdempotencyKey('SO-1001') ->execute();
$batch = $client->convert() ->fromTemplate('TEMPLATE_ID') ->withData([['orderNumber' => 'SO-1001', 'sku' => 'A-100']]) ->toPrinter('PRINTER_ID') ->execute();
echo $client->jobs()->get($job->getJobId())->getStatus();job, err := client.Print(ctx, labelzoom.PrintRequest{ Source: labelzoom.SourcePDF, Body: pdf, PrinterID: "PRINTER_ID", Copies: labelzoom.Ptr(2), IdempotencyKey: "SO-1001",})if err != nil { log.Fatal(err)}
batch, err := client.PrintTemplate(ctx, labelzoom.TemplatePrintRequest{ TemplateID: "TEMPLATE_ID", Data: labelzoom.DataRecord{"orderNumber": "SO-1001", "sku": "A-100"}, PrinterID: "PRINTER_ID",})if err != nil { log.Fatal(err)}details, err := client.GetPrintJob(ctx, job.JobID)if err != nil { log.Fatal(err)}log.Printf("job %s is %s; the template made %d job(s)", details.ID, details.Status, len(batch.Jobs))require "labelzoom"
client = LabelZoom::Client.new(api_key: "API_KEY")
job = client.print( :pdf, "PRINTER_ID", File.binread("label.pdf"), copies: 2, idempotency_key: "SO-1001")
client.print_template( "TEMPLATE_ID", "PRINTER_ID", data: [{ orderNumber: "SO-1001", sku: "A-100" }])
puts client.jobs.get(job.job_id).statususe labelzoom::{LabelZoomClient, PrintRequest, SourceFormat, TemplatePrintRequest};use serde_json::json;
let client = LabelZoomClient::builder().api_key("API_KEY").build()?;
let job = client.print( &PrintRequest::new(SourceFormat::Pdf, std::fs::read("label.pdf")?, "PRINTER_ID") .copies(2) .idempotency_key("SO-1001"), // a repeat returns this job instead of printing again)?;
let record = serde_json::from_value(json!({ "orderNumber": "SO-1001", "sku": "A-100" }))?;let batch = client.print_template( &TemplatePrintRequest::new("TEMPLATE_ID", "PRINTER_ID").with_data([record]),)?;
let details = client.get_print_job(&job.job_id)?; // queued, dispatched, printing, completed, failedprintln!("{} ({} template jobs)", details.status, batch.jobs.len());Printers
Section titled “Printers”List printers
Section titled “List printers”curl "https://api.labelzoom.com/api/v3/printers" -H "Authorization: Bearer API_KEY"connection_type is tcp, usb, or spooler. Trimmed response:
{ "printers": [ { "id": "5b0e3c1a-8f2d-4c6e-9a7b-1d2e3f4a5b6c", "name": "Warehouse Zebra", "connection_type": "tcp", "config": { "nativeFormat": "zpl" }, "status": "ready", "agents": [{ "agentName": "Warehouse PC", "isPrimary": true, "agentOnline": true, "status": "ready" }] } ]}Status codes: 200, 401, 403.
Get printer status
Section titled “Get printer status”curl "https://api.labelzoom.com/api/v3/printers/PRINTER_ID/status" -H "Authorization: Bearer API_KEY"This response uses camelCase field names. Trimmed response:
{ "id": "5b0e3c1a-8f2d-4c6e-9a7b-1d2e3f4a5b6c", "status": "paper_out", "statusDetail": { "hostStatus": { "paperOut": true, "headOpen": false, "paused": false } }, "deviceInfo": { "device": { "model": "ZTC GK420d", "firmware": "V61.17.17Z", "dpi": 203 } }, "lastStatusDate": "2026-10-11T15:04:12Z", "agents": [{ "agentName": "Warehouse PC", "isPrimary": true, "agentOnline": true, "status": "paper_out" }]}status combines every agent’s view, and agents lists each one. statusDetail (the printer’s flags) and deviceInfo (its model and settings) are null until the agent first reads them. Status can be up to about a minute old.
Where the flags come from depends on the printer:
| Printer | Flags in statusDetail |
statusDetail.source |
|---|---|---|
| Zebra (ZPL) on the network | hostStatus |
zpl |
| IPL printer on the network | conditions |
ipl |
| Any other printer on the network with SNMP turned on | conditions |
snmp |
| A printer that reports neither | None | tcp |
conditions holds only the flags that the printer reports: paperOut, ribbonOut, headOpen, paused, overTemp, headFault, jammed, serviceRequested, bufferFull, and labelWaiting. A missing flag means the printer can’t report it, not that the condition is clear. printerState is idle, printing, or warmup when the printer reports it.
To get status from a printer over SNMP, turn SNMP on in the printer’s settings with the read community public. If your printer uses another community, set snmpCommunity in the printer’s config.
status |
Meaning |
|---|---|
ready |
Reachable and reporting no problems. |
online |
Reachable, but the printer doesn’t report detailed status. |
paused |
Paused. |
paper_out |
Out of media or ribbon. |
head_open |
The printhead is open. |
error |
A fault the printer can’t clear by itself. |
offline |
Unreachable. |
unknown |
No online agent can see the printer. |
Status codes: 200, 401, 403, 404.
Print jobs
Section titled “Print jobs”Send a document to a printer
Section titled “Send a document to a printer”The request body is the document, as raw bytes with no JSON wrapper and no base64 encoding. If its format differs from the printer’s language, LabelZoom converts it, so you can send a PDF or a BarTender file to a ZPL printer.
curl -X POST "https://api.labelzoom.com/api/v3/printers/PRINTER_ID/print?sourceFormat=zpl" \ -H "Authorization: Bearer API_KEY" \ -H "Content-Type: text/plain" \ -H "Idempotency-Key: 3f1c9a2e-1b7d-4e6a-9c2f-8a5b1d4e7c90" \ --data-binary '^XA^FO50,50^A0N,50,50^FDHello^FS^XZ'| Query parameter | Description |
|---|---|
sourceFormat |
The document’s format: any source in Supported formats except url. Required for printer code and for NiceLabel, BarTender, and DYMO files; without it, the document is sent unconverted. For a PDF or image, its Content-Type is enough. |
copies |
How many times to send the job, from 1 to 9999. See Copies. |
| Conversion parameters | Any conversion parameter, such as rotation=90, applied before printing. Without dpi, a PDF or an image is converted at the printer’s Resolution, if the printer has one. |
To make the request safe to retry, send an Idempotency-Key. See Idempotency. Response:
{ "jobId": "9f1c7e2a-4b30-4d6e-8a11-5c2f9d4e7b83", "status": "dispatched", "copies": null }status is dispatched when an agent is online, or queued when none is. copies is null when the request doesn’t set it. A replayed request also includes "idempotent": true.
Status codes: 200, 400 (an empty body or invalid copies), 401, 403 (another account’s printer), 404, 413, 422, 429, 502 (the document couldn’t be converted). For the code values, see Error codes.
List a printer’s jobs
Section titled “List a printer’s jobs”curl "https://api.labelzoom.com/api/v3/printers/PRINTER_ID/jobs?status=failed&limit=20" \ -H "Authorization: Bearer API_KEY"| Query parameter | Description |
|---|---|
status |
Only jobs with this status. Omit it for every job. |
limit |
From 1 to 200. Default 50. |
Returns jobs newest first. Trimmed response:
{ "jobs": [{ "id": "9f1c7e2a-4b30-4d6e-8a11-5c2f9d4e7b83", "status": "completed", "source_format": "zpl", "copies": null, "error": null, "retry_count": 0, "created_date": "2026-10-11T15:00:00Z", "completed_date": "2026-10-11T15:00:02Z" }] }Status codes: 200, 401, 403, 404.
Get a print job
Section titled “Get a print job”curl "https://api.labelzoom.com/api/v3/jobs/JOB_ID" -H "Authorization: Bearer API_KEY"Returns one job with the list’s fields, plus printer_id and agent_id. Poll it to track a job to completion. Status codes: 200, 401, 403, 404.
Job statuses
Section titled “Job statuses”| Status | Meaning |
|---|---|
queued |
No agent is online. The job prints when one reconnects. |
dispatched |
Sent to an online agent. |
printing |
The agent is sending the job to the printer. A job with copies stays printing until every copy is sent. |
completed |
Every copy was sent to the printer. |
failed |
error says why. You can retry the job from the dashboard for about 24 hours. |
Job history is kept for 30 days.
Copies
Section titled “Copies”To send a whole job to the printer more than once, add copies to either print endpoint:
| Rule | Detail |
|---|---|
| Range | A whole number from 1 to 9999. Anything else returns 400. |
| Quantity in the document | Multiplies: ^PQ3 with copies=5 prints 15 labels. |
| Several labels in one document | Print collated: labels A and B with copies=2 print A, B, A, B, as one job. |
copies=1 |
The same as omitting it. |
| Partial failure | The job is failed, and error says how many copies were sent. |
| Outdated agent | If an agent that serves the printer is outdated, copies above 1 returns 422 agent_update_required and nothing prints. It never falls back to one copy. Update the agent. |
| Installed driver printers | The driver can cap the copy count. If it can’t print the number you asked for, the job fails. |
For a large run of a complex label, the printer’s own quantity command, such as ZPL ^PQ, is faster.
Idempotency
Section titled “Idempotency”To make a print safe to retry, send an Idempotency-Key header with a unique value, such as a UUID or an order number. It works on both print endpoints.
| Request | Result |
|---|---|
| Same key, same request | Returns the original job with "idempotent": true. Nothing prints again. |
| Same key, different request | Returns 422 idempotency_key_reused. Nothing prints. |
A request is different if the document, merge data, printer, template, sourceFormat, conversion parameters, or copies change. The order of query parameters and of JSON keys doesn’t matter. Keys are scoped to your account, so give a deliberate reprint a new key.
In a template batch, each entry gets its own key: your key followed by #0, #1, and so on. If any entry conflicts, the whole batch is refused and nothing prints.
Templates
Section titled “Templates”A print template is a label published from LabelZoom Studio or the web designer. You send only the values for its merge fields.
List templates
Section titled “List templates”curl "https://api.labelzoom.com/api/v3/templates" -H "Authorization: Bearer API_KEY"{ "templates": [{ "id": "7c8a0f8e-1111-4222-8333-444455556666", "name": "shipping-label", "merge_fields": ["orderNumber", "sku"], "default_target_format": "zpl" }] }Status codes: 200, 401, 403.
Get a template
Section titled “Get a template”curl "https://api.labelzoom.com/api/v3/templates/TEMPLATE_ID" -H "Authorization: Bearer API_KEY"Returns one template with the list’s fields, plus its label content. Status codes: 200, 401, 403, 404.
Print a template
Section titled “Print a template”The body is a JSON object for one label, or an array of up to 25 objects for a batch. Each label is converted to the printer’s language.
curl -X POST "https://api.labelzoom.com/api/v3/printers/PRINTER_ID/templates/TEMPLATE_ID/print?validate=true" \ -H "Authorization: Bearer API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: SO-1001" \ -d '{"orderNumber":"SO-1001","sku":"A-100"}'| Query parameter | Description |
|---|---|
copies |
How many times to send each job, from 1 to 9999. See Copies. |
validate |
true checks every entry for missing merge fields before anything prints. |
The response is always 202. An object returns one job, and an array returns {"jobs": [...]}:
{ "jobId": "9f1c7e2a-4b30-4d6e-8a11-5c2f9d4e7b83", "status": "dispatched", "copies": null }With validate=true, a missing field returns 422. index is the entry’s position in the array:
{ "message": "Payload is missing required fields", "problems": [{ "index": 0, "missing": ["sku"] }] }If a batch can’t finish in one request, the 202 response holds the jobs submitted so far, a message, and remaining: the number of entries at the end of the array that weren’t submitted. To submit them, send the same request with the same Idempotency-Key; submitted entries replay without printing again. Without a key, send only the last remaining entries.
Status codes: 202, 400 (the body isn’t an object or a non-empty array, or copies is invalid), 401, 403, 404, 413, 422 (a missing field with validate=true, agent_update_required, idempotency_key_reused, or a printer language the template can’t render), 429, 502 (a label couldn’t be rendered).
Render a template
Section titled “Render a template”target sets the output format. Without it, the template’s default format is used.
curl -X POST "https://api.labelzoom.com/api/v3/templates/TEMPLATE_ID/convert?target=zpl" \ -H "Authorization: Bearer API_KEY" \ -H "Content-Type: application/json" \ -d '{"orderNumber":"SO-1001","sku":"A-100"}' \ --output label.zplThe response is 200. An object body returns the label as raw bytes, with an X-LZ-Format header that names the format. An array body returns JSON:
{ "labels": [{ "format": "zpl", "contentType": "text/plain; charset=utf-8", "base64": "XlhB..." }] }Status codes: 200, 400, 401, 403, 404, 413, 422 (a format the template can’t render), 429, 502.
What’s next
Section titled “What’s next”- LabelZoom Print Agent: install, enroll, and update the agent.
- Merge fields: the placeholder syntax for templates.
- Errors: status codes and error codes.
- n8n integration and Zapier integration: print from a workflow.