Label printing
Send ZPL or a carrier PDF from your backend and it comes out of the right label printer, in the right warehouse, at the right size. Byte-exact output, real status back.
One label from one desk is easy. A thousand a day across three warehouses is a different problem entirely.
Fetch the carrier's label, open it, pick the printer, press print. At fifty orders a day it is the bottleneck; at five hundred it is a full-time job.
A 4×6 label sent through a generic PDF path comes out at 94%, and the barcode stops scanning. Byte-exact ZPL is the only reliable answer.
Your fulfilment service can't reach it, and neither can the carrier's API. Something has to bridge that gap without opening the network.
The agent at the warehouse holds the connection open. Your backend just makes an HTTPS call.
On any computer at the site — Windows, macOS, or Linux. Zebra, TSC, Godex, Brother and other installed label printers register automatically with a numeric printer_code.
Send ZPL as content_type: raw for byte-exact output, or the carrier's PDF as content or content_url. Route by printer_code, so warehouse A never prints warehouse B's labels.
A signed webhook reports completed or failed with a reason code — so a label that never printed becomes an alert, not a missing parcel.
const zpl = `^XA
^FO40,40^A0N,40,40^FDACME Fulfillment^FS
^FO40,100^BY3^BCN,120,Y,N,N^FD1Z999AA10123456784^FS
^FO40,260^A0N,30,30^FDShip to: 350 5th Ave, New York^FS
^XZ`;
await fetch('https://api.printbase.cloud/v1/print-jobs', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
printer_code: warehouse.labelPrinterCode,
content_type: 'raw', // ZPL straight to the Zebra
content: Buffer.from(zpl).toString('base64'),
copies: 1,
}),
});RAW ZPL means the printer renders the label itself: no scaling, no driver, and a barcode that scans on the first pass.
Anywhere a label has to come out of a specific printer at a specific site, triggered by something other than a person.
The moment a carrier returns a label, print it at the warehouse packing that order — no download, no manual step.
One order table, one printer map, one API. The order's warehouse decides the printer_code; the code path never changes.
Print on behalf of many clients with scoped API keys and organizations, without buying a separate integrator plan.
Return labels and pickup slips print at the counter printer while the customer is still standing there.
^XA to ^XZ reaches the printer untouched — barcodes, QR codes, rotation, and darkness exactly as your template renders them, at 203 or 300 dpi.
Pass the carrier's PDF as base64 or a URL the agent downloads. Handy when the carrier gives you a PDF and not ZPL.
DOWNLOAD_FAILED tells you a signed label URL expired in the queue; PRINTER_OFFLINE tells you to send someone to the packing bench. Different failures, different responses.
Printers, computers, and jobs all belong to an organization, so a printer_code map is all you need to keep warehouses apart.
The long-form versions, with runnable code.
From ^XA to barcodes and previews, then delivering ZPL from your backend.
The full pipeline: where labels come from, routing, and failure handling.
Knowing what actually printed: signatures, retries, and reason codes.
Request shape, status state machine, and failure codes.
Yes. Set content_type to raw and base64-encode the ZPL. The printer renders it natively, which is why RAW is the right choice for labels — nothing rescales or resamples your barcode.
Send it as content_type: pdf, either inline as base64 or as a content_url the agent downloads. If the URL is signed, make sure it outlives the queue — an expired link surfaces as a DOWNLOAD_FAILED job.
Any printer the host computer can print to. RAW works whenever the printer understands the language you send — ZPL for Zebra and compatibles, EPL, TSPL, or ESC/POS-based label models.
Route by printer_code from your own warehouse-to-printer map, and use separate organizations with scoped API keys when the sites belong to different customers.
Webhooks report print_job.completed or print_job.failed with a reason code, the printer name, and the computer name. Add a periodic sweep over jobs still unsettled and nothing goes missing quietly.
Yes — 100 print jobs a month on one computer, permanently free, no credit card required.
100 free jobs a month, no credit card. Install the agent, POST some ZPL, and watch it come off the roll.