Chartquery

Label Parse

POST
/v1/label/parse

Parse printer commands into structured elements. POST source and language (tsc, zpl, epl, …).

Credit cost: 1 credit 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/parse" \  -H "Content-Type: application/json" \  -d '{    "source": "string",    "language": "tsc"  }'
{  "dpi": 203,  "commands": [    {      "cmd": "SIZE",      "unit": "mm",      "widthMM": 40,      "heightMM": 30    },    {      "cmd": "CLS"    },    {      "x": 10,      "y": 10,      "cmd": "TEXT",      "font": "2",      "xMul": 1,      "yMul": 1,      "content": "Hello",      "rotation": 0    },    {      "cmd": "PRINT",      "sets": 1    }  ],  "elements": [    {      "x": 10,      "y": 10,      "font": "2",      "size": 1,      "type": "text",      "content": "Hello",      "rotation": 0    }  ],  "warnings": [],  "widthDots": 320,  "heightDots": 240}
{  "error": "Bad Request"}
{  "error": "Internal Error"}