Label Preview
Preview a thermal label via GET. Pass the same label object as a URL-encoded JSON string in query. Inside that JSON, text items use content and size (1-10), not text or fontSize. Prefer format=png for ChatGPT.
Credit cost: 3 credits per call
Parâmetros de consulta
Use png so ChatGPT can display the image. svg is for download or infinite scale.
"svg"Value in
- "svg"
- "png"
Full label config as URL-encoded JSON. Must include width and elements. Text items use content and size (1-10), not text or fontSize.
Label width. Required. Default unit is mm. Example: 40. Do not send query instead of width.
Label height in the same unit. Example: 30. Omit for receipt / continuous mode.
Measurement unit for width and height. Default mm. Use mm unless you are working in printer dots.
"mm"Value in
- "mm"
- "inch"
- "dot"
Printer DPI. Default 203.
Gap between labels in mm. Ignored for receipts.
Print speed, 1-18.
Print darkness, 0-15.
Print direction. 0 = normal, 1 = reversed.
1Value in
- 0
- 1
Number of copies. Minimum 1.
Printer profile id (tsc-te210, zebra-zd420, …).
Required array. Text items need type=text, content, and size (1-10 magnification). Do not use text, fontSize, or type=barcode. Positions x/y are in dots. Example item: {"type":"text","content":"Order: 1042","x":10,"y":10,"size":2}.
1 <= itemsPrinter language for preview. Default tsc. Example: tsc or zpl.
"tsc"Value in
- "tsc"
- "zpl"
- "epl"
- "cpcl"
- "dpl"
- "sbpl"
- "escpos"
- "starprnt"
- "ipl"
Corpo da resposta
application/json
application/json
curl -X GET "https://example.com/v1/label?query=string&width=0&elements=%5Bobject+Object%5D"{ "error": "Bad Request"}{ "error": "Internal Error"}