POST /print/{target}
Send a print job to a specific printer.
Endpoint:
POST /api/v1/print/{target}Path Parameter
Section titled “Path Parameter”| Parameter | Type | Description |
|---|---|---|
target | string | The printer’s path value from GET /printers, or a tag alias (e.g. tag_zpl). |
Request Body
Section titled “Request Body”Two options for sending print data:
Option 1: Raw binary data
Section titled “Option 1: Raw binary data”Send the raw print data (ZPL, PDF, etc.) directly as the request body.
POST /api/v1/print/tcp_192-168-86-250_9100Content-Type: application/octet-streamX-API-Key: YOUR_API_KEY
^XA^FO50,50^A0N,50,50^FDHello World^FS^XZOption 2: JSON with URL
Section titled “Option 2: JSON with URL”Send a JSON body with a content field containing a URL to fetch the document from.
POST /api/v1/print/tcp_192-168-86-250_9100Content-Type: application/jsonX-API-Key: YOUR_API_KEY
{ "content": "https://example.com/label.zpl"}Success Response
Section titled “Success Response”{ "status": "success", "statusCode": 200, "result": { "module": "/print/tcp_192-168-86-250_9100", "message": "Printed successfully.", "content": null }}Error: 503 — Printer Not Ready
Section titled “Error: 503 — Printer Not Ready”Returned when the pre-flight status check detects an issue (ZPL printers only). See Pre-flight Status Check for details.
{ "status": "error", "statusCode": 503, "result": { "module": "/print/tcp_192-168-86-250_9100", "message": "Printer is not ready", "content": { "ready": false, "paperOut": false, "paused": true, "headOpen": false, "ribbonOut": false, "errors": ["Printer is paused (may need calibration — press the feed button)"] } }}