Files
dashback/docs/api/routes/labeltemplate/testprint.md
2026-11-01 04:33:45 +01:00

1.2 KiB

POST /labeltemplate/testprint

Protected. Requires a valid session cookie (credentials: 'include').

Test print label template

Dispatches a test print job for a label template or unsaved canvas objects to a specified ZPL printer. Placeholders in text and barcodes are interpolated using a sample article or the specified article SKU.

Body (JSON)

Field Required Type Description
printerId no integer
agentprinterId no integer
templateId no integer
objects no any[]
width no integer
height no integer
dpi no integer
sku no string
quantity no integer
{
  "printerId": 1,
  "agentprinterId": 1,
  "templateId": 1,
  "objects": [],
  "width": 1,
  "height": 1,
  "dpi": 1,
  "sku": "…",
  "quantity": 1
}

Response 200

Print job created

{
  "success": true
}

Errors

Status Description
400 Invalid parameters
404 Printer or template not found
500 Server error

Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.