DEVELOPERS / TEMPLATES / UPDATED 16 NOV 2026
Design the Label Once. Send Only the Data From Code.
Design the label once, then send only the values from Python, Node.js, C# or Go. List fields, print one or many labels, preview. Calls were run.
from labelinn import LabelInn
client = LabelInn("sk_live_...")
# The design is made once in LabelInn; the code sends only the values.
job = client.print.create(
printer_id="prt_abc123",
payload_type="template",
design_id="dsg_shipping",
data={"order_id": "ORD-9876", "customer": "Maria Lopez", "barcode": "TR123456789"},
copies=2,
idempotency_key="order-ORD-9876-label",
)
print(job["id"], job["status"], job["copies"])
SHORT ANSWER
Design the label visually, then your code sends only the values.
Most label code ends up as string concatenation: ZPL coordinates in one file, font sizes in another, and a two-day change whenever the logo moves. With LabelInn the layout lives in a design that whoever owns the label edits visually. Your code calls POST /v1/print/jobs with payload_type: "template", a design_id and a data object.
- Ask the API which fields a design wants, so you never guess key names.
- The same design prints on ZPL, TSPL, TPCL and ESC/Label printers.
- Run output below is from the real SDKs against a local stand-in.
01 / WHY
Why a design beats ZPL strings
The layout lives where the label owner can edit it.
| ZPL in code | Design plus data |
|---|---|
| Layout changes need a developer and a deploy | Layout changes in the designer; your code is untouched |
| Works on ZPL printers only | Converted to ZPL, TSPL, TPCL or ESC/Label for the printer you pick |
| Fonts, images and barcodes placed by hand in coordinates | Placed visually and previewed before printing |
| Every version lives in your repo | Designs can be published as fixed snapshots |

02 / FIELDS
1. Ask the design which fields it wants
Names in the design are the keys in your data.
from labelinn import LabelInn
client = LabelInn("sk_live_...")
v = client.designs.list_variables("dsg_shipping")
for var in v["variables"]:
print(var["key"], var["element_type"])
print(v["example_payload"])Do not guess the names. Keys you send that the design does not bind are ignored without an error, which is the usual reason a label prints with blanks.
order_id text
customer text
barcode barcode
{'data': {'order_id': '<text>',
'customer': '<text>',
'barcode': '<barcode>'},
'_note': 'Pass this object as the "data" field when printing'}03 / DATA
2. Send the data
One call per label, or an array for many.
from labelinn import LabelInn
client = LabelInn("sk_live_...")
# The design is made once in LabelInn; the code sends only the values.
job = client.print.create(
printer_id="prt_abc123",
payload_type="template",
design_id="dsg_shipping",
data={"order_id": "ORD-9876", "customer": "Maria Lopez", "barcode": "TR123456789"},
copies=2,
idempotency_key="order-ORD-9876-label",
)
print(job["id"], job["status"], job["copies"])A data array prints one label per row, up to 1000 in one request, and "dry_run": true returns what would print without creating a job. POST /v1/print/batch takes up to 100 independent jobs. All of these count as one request against your rate limit.
POST /v1/print/jobs
User-Agent: labelinn-python/3.1.0
X-Idempotency-Key: order-ORD-9876-label
{"printer_id": "prt_abc123",
"payload_type": "template",
"design_id": "dsg_shipping",
"data": {"order_id": "ORD-9876",
"customer": "Maria Lopez",
"barcode": "TR123456789"},
"copies": 2}
-> job_0001 queued 204 / PREVIEW
3. Preview before you print
The preview is made in the background, so it is asynchronous.
from labelinn import LabelInn
client = LabelInn("sk_live_...")
render = client.designs.render("dsg_shipping", data={"order_id": "ORD-9876"})
print(render["render_id"], render["status"]) # queued: the preview is made in the background
# poll client.designs.render_status(render["render_id"]) until it is completedrnd_0001 queuedPOST /v1/designs/{id}/render answers 202 with a render id; read GET /v1/designs/renders/{id} until it is completed to get the preview. It is not a synchronous image.
05 / SDKS
The same call in four SDKs
One request shape, four languages.
| Language | Install | Call |
|---|---|---|
| Python | pip install labelinn | client.print.create(printer_id=..., payload_type="template", design_id=..., data={...}) |
| Node.js | npm install labelinn | await client.print.create({ printer_id, payload_type: "template", design_id, data }) |
| C# | dotnet add package LabelInn | await client.Print.CreateAsync(new CreateJobRequest { PrinterId = ..., PayloadType = "template", DesignId = ..., Data = new { ... } }) |
| Go | go get github.com/labelinn/labelinn-go/v3 | client.Print.Create(&labelinn.CreateJobRequest{PrinterID: ..., PayloadType: "template", DesignID: ..., Data: map[string]string{...}}) |
The Python and Node.js calls were run; the C# and Go rows follow the SDK sources. Language pages with run code and traps: Python, Node.js, C#, Go.
06 / NEXT
When the data is already in a system
You may not need code at all.
If the values live in a spreadsheet, a database or another API, a workflow can read them and print. When your code should start that workflow, see triggering a workflow from code.
07 / TESTED
What was run for this page
Read this before you trust a snippet.
| Item | Run here? | Result |
|---|---|---|
| Variables, template print, render | Run with labelinn 3.1.0 from PyPI | Against a local stand-in written from the API source. Outputs above are its answers. |
| The live service, a physical printer | Not used | No request went to labelinn.com and nothing was printed. |
08 / PLANS
What is free and what needs a plan
Design and test for free; printing through the API needs Pro.
FREE
$0
- Design and print labels by hand on Zebra, TSC, Toshiba and Epson printers, with no label limit
- API sandbox: a
sk_test_key, read-only, 25 calls a day (it never prints)
STARTER
$7.99 / month
- Everything in Free
- Excel and CSV data binding, workflows, automations
- API sandbox: 250 calls a day (still read-only)
PRO
$24.90 / month
- Everything in Starter
- The production API:
sk_live_keys that print, 2,000 calls a day, 60 a minute - Webhooks, watched folder, database sources
A signed-in Free user can start a 14-day trial by hand from the dashboard banner or the app’s paywall (no card): it unlocks Excel and CSV binding, bulk barcodes and the production API. It does not start by itself at signup. Yearly billing is ten months for twelve ($79.90 Starter, $249.00 Pro). All plans and limits: pricing.
QUESTIONS / FAQ
Frequently asked questions
How do I print a label with variable data from code?
Design the label in LabelInn with named fields, then call print.create with payload_type: "template", the design id and a data object whose keys match the field names.
Can the same template print on Zebra and TSC printers?
Yes. LabelInn converts the design to each printer’s own language, such as ZPL for Zebra and TSPL for TSC.
Can I preview the label before printing?
Yes. designs.render queues a preview and returns a render id; read the render until it is completed to get the image.
How do I find out which fields a LabelInn design expects?
Call GET /v1/designs/{designId}/variables. It lists the bindable variables and an example_payload, so you never have to guess key names.
Can I print many labels with one call?
Yes. A template job whose data is an array prints one label per row, up to 1000 rows, and POST /v1/print/batch accepts up to 100 independent jobs. Both count as one request against your rate limit.
Is there a free way to try it?
A sk_test_ key and the read-only sandbox are free. A signed-in Free user can start a 14-day trial by hand from the dashboard banner or the app’s paywall (no card): it unlocks Excel and CSV binding, bulk barcodes and the production API. It does not start by itself at signup.
KEEP GOING
Related
NEXT STEP / LABELINN
Move label layout out of your code
Design the label once and let your code send only what changes. · Visual designer · Free plan, no card · Any printer language