Skip to main content

Documentation · API v1

API documentation

Everything you need to generate ZPL labels with a single API call.

The API is also described in OpenAPI 3.1, for generating a client or importing it into a tool such as Postman: openapi.json.

Quick Start

Generate your first label. Replace YOUR_API_KEY with the key from your dashboard.

curl -X POST https://api.zeepler.com/v1/zeeplify \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "size": "4x2"
    },
    "data": {
      "product": "Widget Pro",
      "sku": "WDG-001"
    },
    "templates": [
      {
        "type": "Text",
        "dataPath": "product",
        "coords": [
          50,
          30
        ],
        "font": "0,40"
      },
      {
        "type": "BarCode",
        "dataPath": "sku",
        "coords": [
          50,
          100
        ],
        "style": "code128"
      }
    ]
  }'

Authentication

Every request carries your API key in the x-api-key header. Generate one in your dashboard; it starts with zpl_. A missing, unknown or disabled key is answered with 401. Send it to the host of the region your account was created in: api.zeepler.com for the United States, or api.ca.zeepler.com for Canada. A key is unknown in the other region, so it gets a 401 there.

http
POST /v1/zeeplify
Host: api.zeepler.com
x-api-key: zpl_your_api_key
Content-Type: application/json

Checking a key

GET /v1/me checks a key without generating a label, so it costs nothing. It answers your plan, the labels used this month, and your monthly cap, which is null when there is none. A bad key gets the same 401 as above, and it counts toward the same rate limit.

http
GET /v1/me
Host: api.zeepler.com
x-api-key: zpl_your_api_key
json
{
  "plan": "free",            // "free", "card" or "invoice"
  "labelsThisMonth": 3,
  "cap": 40                  // null when uncapped
}

Request Body

The request body contains your label data and templates.

configobjectrequired

Label configuration

json
{
  "size": "4x2"  // "3x1" or "4x2"
  // "lang" is optional and only takes "zpl", which is the default
}
dataobjectrequired

Your label data (any key-value pairs)

json
{
  "product": "Widget Pro",
  "sku": "WDG-001",
  "price": "$29.99"
}
templatesarrayrequired

Array of elements to render on the label

Template Types

Each template defines an element on your label. Use dataPath to reference values from your data object.

Text

json
{
  "type": "Text",
  "dataPath": "product",     // Key from your data object
  "coords": [50, 30],        // [x, y] position in dots
  "font": "0,40",            // Optional: font name, height, width
  "maxLength": 22            // Optional: truncate; text does not wrap
}

BarCode

json
{
  "type": "BarCode",
  "dataPath": "sku",
  "coords": [50, 80],
  "style": "code128"         // Optional: code128 (default), code93, ean13
                             // ean13 takes 12 or 13 digits
}

QRCode

json
{
  "type": "QRCode",
  "dataPath": "url",
  "coords": [200, 30],
  "magnification": 5         // Required: size, 1-10
}

Response

On success the API returns ZPL as text/plain, ready to send to a Zebra printer at 203 dpi. This is the exact response to the quick start above.

zpl
^XA^MCY^XZ
    ^XA
    ^SZ2
    ^MMT
    ^MNY
    ^LL406
    ^PW812
    ^LH0,0
^CF0,40^FO50,30^FDWidget Pro^FS
^BY2,2,59^FO50,100^BCN,,N,N,N,A^FDWDG-001^FS
^XZ

When any value has an accented or other non-ASCII character, the label also carries ^CI28, which tells the printer the text is UTF-8. It needs Zebra firmware x.14 or later. Before it ends, the label sets the printer back to ^CI0, the factory default. If your printer is set to a different code page, set it again in your next label.

Status Codes

200Success - ZPL returned
400Invalid body - every problem is listed with its field
401Missing, unknown or disabled API key
402Free monthly labels used - an account without a card can generate 40 a month; add a card in the dashboard
429Too many requests - wait the seconds in the Retry-After header - or monthly spending limit reached
500Our fault, not yours - retry

Label Sizes

Coordinate system uses dots (203 DPI). Origin (0,0) is top-left.

3" x 1"

609 x 203 dots

Good for: Product labels, asset tags

4" x 2"

812 x 406 dots

Good for: Shipping labels, detailed info

Complete Example

A shipping label with product name, SKU barcode and QR code.

json
1{
2 "config": {
3 "size": "4x2"
4 },
5 "data": {
6 "product": "Widget Pro",
7 "sku": "WDG-001",
8 "url": "https://example.com/track/12345"
9 },
10 "templates": [
11 {
12 "type": "Text",
13 "dataPath": "product",
14 "coords": [
15 50,
16 30
17 ],
18 "font": "0,40"
19 },
20 {
21 "type": "BarCode",
22 "dataPath": "sku",
23 "coords": [
24 50,
25 100
26 ],
27 "style": "code128"
28 },
29 {
30 "type": "QRCode",
31 "dataPath": "url",
32 "coords": [
33 560,
34 30
35 ],
36 "magnification": 6
37 }
38 ]
39}

And what the API returns for it:

zpl
^XA^MCY^XZ
    ^XA
    ^SZ2
    ^MMT
    ^MNY
    ^LL406
    ^PW812
    ^LH0,0
^CF0,40^FO50,30^FDWidget Pro^FS
^BY2,2,59^FO50,100^BCN,,N,N,N,A^FDWDG-001^FS
^BY2,2,0^FO560,30^BQN,2,6^FDQA,https://example.com/track/12345^FS
^XZ

Integration guides

Worked labels for public-sector workflows, each with the request, the ZPL it returns, and what to check before going live.

Starter app

zeepler-web-starter is an open-source (MIT) web app to fork as the start of your own integration. It checks your key with GET /v1/me, builds a label from a form, and shows the ZPL it gets back, ready to copy. One file defines the label and one file talks to the API, so changing either is a small edit.

Your key stays in your browser and goes only to the zeepler API. Read the Security section of its README before you deploy a copy for other people.

ZPL how-to

Answers to common ZPL questions, in plain ZPL first and then as a zeepler request.

  • QR code size in ZPL

    How ^BQ magnification sets the size of a QR code, and how to work out the size in dots.

  • Printing ^, ~ and _ in ZPL

    Why a caret or tilde in your data cuts the field short, and how ^FH prints them.

  • Font size in ZPL

    Setting text height with ^A and ^CF, converting points to dots, and why ^CF carries over.

  • Send ZPL to a Zebra printer from C#

    Send ZPL from .NET to a network printer on port 9100, or to a USB printer through the Windows spooler, without the driver redrawing it.

Need Help?

Having trouble? Email us - the first reply comes within 2 business days.