| AI | Data |
|---|
(empty)
cURL
curl -X POST https://example.com/api/print \
-H "Content-Type: application/json" \
-d '{
"jobName": "demo-label",
"output": "pdf",
"dpi": 300,
"size": { "width_mm": 100, "height_mm": 60 },
"payload": {
"zpl": "^XA^FO30,30^ADN,36,20^FDHello REST!^FS^XZ"
}
}'
fetch (JavaScript)
fetch("https://example.com/api/print", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
jobName: "demo-label",
output: "pdf",
dpi: 300,
size: { width_mm: 100, height_mm: 60 },
payload: { zpl: "^XA^FO30,30^ADN,36,20^FDHello REST!^FS^XZ" }
})
})
.then(r => r.json())
.then(console.log)
.catch(console.error);
Note: The endpoint is a placeholder (https://example.com/api/print). The button is for preview purposes only and does not trigger any request.