Supported formats
Every conversion uses one endpoint:
POST https://api.labelzoom.com/api/v2/convert/{source}/to/{target}The {source} must match the request’s Content-Type, and {target} must be allowed by its Accept header. Send the label code or file bytes as the request body; the response body is the converted result.
Source formats
Section titled “Source formats”Convert from any of these:
| Format | Content-Type |
Description |
|---|---|---|
zpl |
text/plain |
Zebra Programming Language |
epl |
text/plain |
Eltron Programming Language |
tspl |
text/plain |
TSC printer language (TSPL/TSPL2) |
dpl |
text/plain |
Datamax Printer Language |
pdf |
application/pdf |
PDF document |
png |
image/png |
PNG image |
jpg / jpeg |
image/jpeg |
JPEG image |
gif |
image/gif |
GIF image |
bmp |
image/bmp |
Bitmap image |
xml |
application/xml |
LabelZoom XML (LBXML) |
json |
application/json |
LabelZoom JSON |
url |
text/plain |
A URL that points to any format above — see Converting from a URL |
epl, tspl, and dpl are source-only — you can convert from them, but not to them. They are newer additions and may not yet appear in the Swagger enum, but the endpoints are live.
Target formats
Section titled “Target formats”Convert to any of these:
| Format | Content-Type (and Accept) |
|---|---|
pdf |
application/pdf |
png |
image/png |
jpg / jpeg |
image/jpeg |
gif |
image/gif |
bmp |
image/bmp |
zpl |
text/plain |
xml |
application/xml |
json |
application/json |
Matching content types
Section titled “Matching content types”The API is not built for HTML forms — it reads the raw request body, so the headers must line up:
- The
Content-Typemust match the source format in the table above, or the request fails with400. - Image and PDF sources also accept
text/plainwhen the body is base64-encoded — useful when your client can’t send raw bytes. - If you send an
Acceptheader, it must allow the target’s media type (or*/*), or the request fails with400. OmitAcceptto skip that check.
application/x-www-form-urlencoded and multipart/form-data are not supported.
Converting from a URL
Section titled “Converting from a URL”Instead of uploading a file, POST its URL as the body with source url:
curl -X POST "https://api.labelzoom.com/api/v2/convert/url/to/png" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: text/plain" \ -d "https://example.com/label.zpl" \ --output label.pngLabelZoom fetches the document, infers its format from the remote server’s Content-Type, and converts it. The remote response must carry a supported content type.
Base64 request bodies
Section titled “Base64 request bodies”Any image or PDF source also accepts a base64 body sent as Content-Type: text/plain — handy when your client can’t send raw bytes:
base64 -w0 label.pdf | curl -X POST \ "https://api.labelzoom.com/api/v2/convert/pdf/to/zpl" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: text/plain" \ --data-binary @-Free vs paid conversion paths
Section titled “Free vs paid conversion paths”Some paths are available on the free tier (with a watermark); others require a paid plan:
| Path | Availability |
|---|---|
Image or PDF → zpl (e.g. pdf/to/zpl, png/to/zpl) |
Free (watermarked) |
zpl / epl / tspl / dpl → PDF or image |
Free (watermarked) |
Image/PDF ↔ image/PDF (e.g. pdf/to/png, png/to/pdf, pdf/to/gif) |
Paid |
Any → json |
Paid |
Output dialect (e.g. MOCA — see Conversion parameters) |
Paid |
A blocked path returns 403; see Errors.
Multi-label jobs
Section titled “Multi-label jobs”A single request can carry multiple labels — several ^XA…^XZ blocks, a multi-page PDF, or a data array with more than one entry:
- PDF and ZPL outputs include every label (as pages / concatenated ZPL).
- Image (
png,bmp,gif,jpeg) and XML outputs return only the first label. - On the free tier, only the first label renders normally; the rest are replaced with a watermark label. Multi-page output is a paid feature.
See also
Section titled “See also”- Conversion parameters — tune DPI, rotation, color, data filling, and more
- Rate limits and plans — tiers, size limits, and SLAs
- Errors — status codes and retry guidance