Chartquery

Label Compile

POST
/v1/label/compile

Compile a label to printer commands (tsc, zpl, epl, …). POST width, language, and elements. Text uses content and size (1-10), not text or fontSize. No barcode element. Example: {"width":40,"height":30,"unit":"mm","language":"zpl","elements":[{"type":"text","content":"ACME","x":10,"y":10,"size":2},{"type":"text","content":"SKU: BOX-12","x":10,"y":35,"size":2}]}

Credit cost: 3 credits per call

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/label/compile" \  -H "Content-Type: application/json" \  -d '{    "width": 0,    "elements": [      {        "type": "text"      }    ],    "language": "tsc"  }'
"SIZE 40 mm, 30 mm\nGAP 3 mm, 0\nSPEED 4\nDENSITY 8\nDIRECTION 1\nCLS\nTEXT 10,10,\"2\",0,1,1,\"ACME Corp\"\nTEXT 10,35,\"1\",0,1,1,\"SKU: PRD-00123\"\nBAR 5,55,305,1\nBOX 5,5,315,235,2\nPRINT 1"
{  "error": "Bad Request"}
{  "error": "Internal Error"}