Label Parse
POST
Parse printer commands into structured elements. POST source and language (tsc, zpl, epl, …).
Credit cost: 1 credit per call
fields?stringComma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).
is_async?booleanRun the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.
Default
falsesoft_fail?booleanReturn HTTP 200 even when the request fails; the error is in the error field of the body.
Default
falseapplication/json- body
source*stringRaw printer commands to parse. Also send language.
language*stringLanguage of the source commands. Example: tsc or zpl.
Default
"tsc"Value in
"tsc""zpl""epl""cpcl""dpl""sbpl""ipl"Successful response
application/json- response
dpi?integercommands?array<>elements?array<>warnings?array<unknown>widthDots?integerheightDots?integercurl -X POST 'https://api.chartquery.com/v1/label/parse' \ -H 'Content-Type: application/json' \ -d '{ "source": "string", "language": "tsc"}'Example Response
{ "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}