Label Validate
POST
Validate printer commands. POST source (the raw commands) 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 validate. 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
infos?integervalid?booleanerrors?integerissues?array<>warnings?integercurl -X POST 'https://api.chartquery.com/v1/label/validate' \ -H 'Content-Type: application/json' \ -d '{ "source": "string", "language": "tsc"}'Example Response
{ "infos": 0, "valid": false, "errors": 1, "issues": [ { "level": "error", "command": "TEXT", "message": "CLS must appear before label elements" }, { "level": "warning", "message": "No GAP command found" } ], "warnings": 1}