Label Convert
POST
Convert printer commands from one language to another. POST source, from, and to. from is the source language (tsc, zpl, epl, …). to is the target (tsc, zpl, escpos, …).
Credit cost: 5 credits 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 convert. Also send from and to.
from*stringSource language.
Default
"tsc"Value in
"tsc""zpl""epl""cpcl""dpl""sbpl""ipl"to*stringTarget language.
Default
"tsc"Value in
"tsc""zpl""epl""cpcl""dpl""sbpl""escpos""starprnt""ipl"dpi?numberOverride DPI on the converted output.
speed?numberOverride print speed, 1-18.
density?numberOverride print darkness, 0-15.
copies?numberOverride copies. Minimum 1.
Successful response
application/json- response
to?stringfrom?stringoutput?stringwarnings?array<unknown>width_dots?integerheight_dots?integerelements_count?integeroutput_encoding?stringcurl -X POST 'https://api.chartquery.com/v1/label/convert' \ -H 'Content-Type: application/json' \ -d '{ "source": "string", "from": "tsc", "to": "tsc"}'Example Response
{ "to": "zpl", "from": "tsc", "output": "^XA\n^PW320\n^LL240\n^FO10,10^A0N,20,20^FDHello World^FS\n^PQ1\n^XZ", "warnings": [], "width_dots": 320, "height_dots": 240, "elements_count": 1, "output_encoding": "utf-8"}