curl --request POST \
--url https://caretly.dev/render \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/plain' \
--data '^XA
^PW800
^LL1000
^FX --- Outer border ---
^FO10,10^GB780,980,4^FS
^FX --- Header ---
^FO10,10^GB780,80,4^FS
^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS
^FO600,35^A0N,30,30^FDPRIORITY^FS
^FX --- Addresses ---
^FO10,90^GB780,160,4^FS
^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS
^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS
^FO30,180^A0N,30,30^FDSHIP TO:^FS
^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS
^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS
^FX --- Barcode ---
^FO10,250^GB780,200,4^FS
^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS
^FX --- QR code ---
^FO10,450^GB780,300,4^FS
^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS
^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS
^FX --- Footer ---
^FO30,770^A0N,30,30^FDREF: PO-998877^FS
^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS
^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS
^FO500,870^A0N,20,20^FDGenerated by AS^FS
^XZ
'import requests
url = "https://caretly.dev/render"
payload = "^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "text/plain"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/plain'},
body: '^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n'
};
fetch('https://caretly.dev/render', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://caretly.dev/render",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: text/plain"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://caretly.dev/render"
payload := strings.NewReader("^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "text/plain")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://caretly.dev/render")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "text/plain")
.body("^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n")
.asString();require 'uri'
require 'net/http'
url = URI("https://caretly.dev/render")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'text/plain'
request.body = "^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n"
response = http.request(request)
puts response.read_body"<string>"<string>An API key is required. Create one at https://caretly.dev/console/keys and send it as `Authorization: Bearer <key>`.Billing for this account is not active, so live keys are paused. Update it at https://caretly.dev/console/billing; test keys keep working.<string><string>Too many requests for this API key: the limit is 50 per second, with bursts of 200. Retry after 1 s.Render ZPL labels to PDF or PNG with the HTTP API
Send raw ZPL to the render endpoint and get back a vector PDF or PNG. Try it live in the playground with a ready-made example shipping label.
curl --request POST \
--url https://caretly.dev/render \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/plain' \
--data '^XA
^PW800
^LL1000
^FX --- Outer border ---
^FO10,10^GB780,980,4^FS
^FX --- Header ---
^FO10,10^GB780,80,4^FS
^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS
^FO600,35^A0N,30,30^FDPRIORITY^FS
^FX --- Addresses ---
^FO10,90^GB780,160,4^FS
^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS
^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS
^FO30,180^A0N,30,30^FDSHIP TO:^FS
^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS
^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS
^FX --- Barcode ---
^FO10,250^GB780,200,4^FS
^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS
^FX --- QR code ---
^FO10,450^GB780,300,4^FS
^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS
^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS
^FX --- Footer ---
^FO30,770^A0N,30,30^FDREF: PO-998877^FS
^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS
^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS
^FO500,870^A0N,20,20^FDGenerated by AS^FS
^XZ
'import requests
url = "https://caretly.dev/render"
payload = "^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "text/plain"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/plain'},
body: '^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n'
};
fetch('https://caretly.dev/render', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://caretly.dev/render",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: text/plain"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://caretly.dev/render"
payload := strings.NewReader("^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "text/plain")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://caretly.dev/render")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "text/plain")
.body("^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n")
.asString();require 'uri'
require 'net/http'
url = URI("https://caretly.dev/render")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'text/plain'
request.body = "^XA\n^PW800\n^LL1000\n\n^FX --- Outer border ---\n^FO10,10^GB780,980,4^FS\n\n^FX --- Header ---\n^FO10,10^GB780,80,4^FS\n^FO30,30^A0N,50,50^FDLABEL SYNTAX^FS\n^FO600,35^A0N,30,30^FDPRIORITY^FS\n\n^FX --- Addresses ---\n^FO10,90^GB780,160,4^FS\n^FO30,110^A0N,25,25^FDSENDER: Warehouse 42&43^FS\n^FO30,140^A0N,25,25^FD123 Industrial AS, Sector 10^FS\n^FO30,180^A0N,30,30^FDSHIP TO:^FS\n^FO180,180^A0N,35,35^FDALBINS - CORP HQ^FS\n^FO180,215^A0N,30,30^FD500 BUSINESS AVE, SUITE 100^FS\n\n^FX --- Barcode ---\n^FO10,250^GB780,200,4^FS\n^FO100,280^BY4,2,120^BCN,120,Y,N,N^FD123456789012^FS\n\n^FX --- QR code ---\n^FO10,450^GB780,300,4^FS\n^FO280,480^BQN,2,4^FDQA,https://labelsyntax.com/^FS\n^FO250,710^A0N,25,25^FDSCAN FOR DETAILS^FS\n\n^FX --- Footer ---\n^FO30,770^A0N,30,30^FDREF: PO-998877^FS\n^FO30,820^A0N,30,30^FDWEIGHT: 12.5 LBS^FS\n^FO30,870^A0N,30,30^FDDIMENSIONS: 10x10x10^FS\n^FO500,870^A0N,20,20^FDGenerated by AS^FS\n^XZ\n"
response = http.request(request)
puts response.read_body"<string>"<string>An API key is required. Create one at https://caretly.dev/console/keys and send it as `Authorization: Bearer <key>`.Billing for this account is not active, so live keys are paused. Update it at https://caretly.dev/console/billing; test keys keep working.<string><string>Too many requests for this API key: the limit is 50 per second, with bursts of 200. Retry after 1 s.https://caretly.dev/render. Send your ZPL as the raw request body and the response is the rendered label.
Get an API key
Every request needs an API key. Create one on the API keys page of the console. Start with a test key: it’s free, and stamps TEST on every label. Then store the key in theZPL_API_KEY environment variable:
export ZPL_API_KEY="zpl_test_..."
format to png to preview the label inline.
Example
curl -X POST "https://caretly.dev/render?format=pdf" \
-H "Authorization: Bearer $ZPL_API_KEY" \
-H "Content-Type: text/plain" \
--data-binary @label.zpl \
-o label.pdf
--data-binary instead of -d so curl keeps the newlines in your ZPL intact.Authentication
Render many labels at once
^PQ copies or a batch of ZPL files in one request, optionally gzip-compressed.Authorizations
Headers
Set when the request body is compressed. The 100 MiB limit applies to the decompressed body.
gzip, deflate Any string up to 255 characters, for example an order number. A retry with the same API key, Idempotency-Key, labels and query parameters is billed once; different labels or parameters are billed as a new request.
255Query Parameters
The output format. pdf contains every page; png is the single page chosen with page.
pdf, png For format=png: the page to render, starting at 1. Pages are counted across all files of a multipart request. Out of range returns 400.
x >= 1Printer resolution in dots per millimetre: 6 (152 dpi), 8 (203 dpi), 12 (300 dpi) or 24 (600 dpi).
6, 8, 12, 24 Return server-side timings for each stage in a Server-Timing response header.
Body
Raw ZPL, or several ZPL files as multipart form data. At most 100 MiB after decompression.
Raw ZPL. May contain several labels (^XA…^XZ).
Response
The rendered labels.
The response is of type file.