cURL
cURL examples for rendering labels
Multi-page label → PDF with all pages
curl -X POST "https://api.zpl.tools/compatibility/labelary/v1/printers/8dpmm/labels/4x6" \
-H "X-API-Key: your_api_key_here" \
-H "Accept: application/pdf" \
--data "^XA^FO50,50^FDPage 1^FS^XZ^XA^FO50,50^FDPage 2^FS^XZ" \
-o all-pages.pdfMulti-page label → PDF with first page only
curl -X POST "https://api.zpl.tools/compatibility/labelary/v1/printers/8dpmm/labels/4x6/0" \
-H "X-API-Key: your_api_key_here" \
-H "Accept: application/pdf" \
--data "^XA^FO50,50^FDPage 1^FS^XZ^XA^FO50,50^FDPage 2^FS^XZ" \
-o first-page.pdfMulti-page label → PNG with first page only
curl -X POST "https://api.zpl.tools/compatibility/labelary/v1/printers/8dpmm/labels/4x6/0" \
-H "X-API-Key: your_api_key_here" \
-H "Accept: image/png" \
--data "^XA^FO50,50^FDPage 1^FS^XZ^XA^FO50,50^FDPage 2^FS^XZ" \
-o first-page.png