Skip to main content

Integration guide · API v1

Healthcare specimen labels

A 4 × 2 inch specimen label from your laboratory or clinical system: the patient's name and date of birth, the MRN as a Code 128 barcode, and the specimen id as a QR code.

The request

Send this body to POST https://api.zeepler.com/v1/zeeplify with your API key in the x-api-key header. It is a working request, not an illustration: on every change, our tests run this same file through the API's code and compare the result with the ZPL below.

json
1{
2 "config": {
3 "size": "4x2"
4 },
5 "data": {
6 "patient": "DOE, JANE",
7 "mrn": "MRN-4471902",
8 "dob": "1961-04-02",
9 "specimen": "SPC-2026-118477"
10 },
11 "templates": [
12 {
13 "type": "Text",
14 "dataPath": "patient",
15 "coords": [30, 25],
16 "font": "0,40",
17 "maxLength": 22
18 },
19 {
20 "type": "Text",
21 "dataPath": "dob",
22 "coords": [30, 75],
23 "font": "0,28"
24 },
25 {
26 "type": "BarCode",
27 "dataPath": "mrn",
28 "coords": [30, 115],
29 "style": "code128"
30 },
31 {
32 "type": "QRCode",
33 "dataPath": "specimen",
34 "coords": [560, 25],
35 "magnification": 5
36 }
37 ]
38}

And the ZPL that comes back, ready to send to the printer:

zpl
^XA^MCY^XZ
    ^XA
    ^SZ2
    ^MMT
    ^MNY
    ^LL406
    ^PW815
    ^LH0,0
^CF0,40^FO30,25^FDDOE, JANE^FS
^CF0,28^FO30,75^FD1961-04-02^FS
^BY2,2,59^FO30,115^BCN,,N,N,N,A^FDMRN-4471902^FS
^BY2,2,0^FO560,25^BQN,2,5^FDQA,SPC-2026-118477^FS
^XZ

What each part does

  • patient prints at the largest size and carries maxLength: 22. That is deliberate: a long name is cut at a width you chose, rather than running off the label and losing the part that identifies the patient.
  • mrn is a Code 128 barcode, which carries letters, digits and dashes, so an MRN with a prefix scans as printed.
  • specimen is a QR code at magnification 5, on the right of the label, clear of the text.

Sending it

  • Call the API from your own server or integration engine, not from a web page. An API key in a browser is a key anyone can copy.
  • A successful call answers 200 with the ZPL as plain text. A request the API cannot turn into a label answers 400 with every problem listed by field, and is not billed.
  • Send the ZPL to a Zebra or other ZPL printer at 203 dpi. At 300 dpi the same label prints at two-thirds of the size.

The API reference has every field and status code.

Before you go live

  • Choose the maxLength for the name with your longest real names in front of you, and decide how staff will know a name was shortened.
  • Text does not wrap. A value longer than the space you left runs off the edge of the label, so set maxLength on any field whose length you do not control.
  • Coordinates are in dots from the top-left corner. Print one label, measure it, and adjust: there is no preview.
  • Scan every barcode and QR code on a printed label before relying on it.

Your data

zeepler runs on Amazon Web Services in the United States (us-east-1).

A label request is used to generate the label and is then discarded. zeepler does not store request bodies and does not write them to its logs.

Send only the fields the label prints. zeepler reads the fields your templates name and ignores the rest, but there is no reason to send data that will not be used.

Patient names, dates of birth and record numbers are personal health information. Decide with your privacy office whether they may be sent to a service hosted where zeepler is, before you send them.

The Security page sets out what is kept, for how long, and who can reach it.

Audit trail

For every label it generates, zeepler records the account, the time, the endpoint, how long it took and how many labels it made. It does not record what was on the label, and a refused request leaves no record here. These records are kept for 90 days, and they are what billing is calculated from.

The dashboard shows this month's totals. The individual records cannot be exported yet, so keep your own record of what was printed, when and by whom. Your system remains the system of record.

Help with an integration

Email zeepler@bates-solutions.com. You will get a reply within 2 business days. The support policy covers response times and version changes.