Print name badges at event check-in
Check-in creates a badge PDF sized to the badge stock and posts it to the printer at the desk. The kiosk does not hold the API key.
For Event check-in desks
Overview
A check-in kiosk looks up the guest and your server renders a badge at the stock size, often a Brother or DYMO die, sometimes a sheet of cards. POST the PDF to the desk printer_code. The kiosk browser only sends the guest id.
Print when the guest is marked arrived, not when the search box changes. A double tap uses the guest id as the idempotency key.
If the desk has no staff PC, you still need a computer or a supported Linux box running the agent next to the printer.
Create the job with POST /v1/print-jobs, an Authorization: Bearer header, printer_code, content_type pdf or raw, and exactly one of content or content_url. The free plan is 100 jobs a month on one computer.
Integration steps
- 01
Decide the printer before the click
Map the station, store, or line to a printer_code from GET /v1/printers. Do not ask the operator to pick a dialog.
- 02
Create the document in your system
PDF for driver printers, raw ZPL or ESC/POS when the device speaks that language.
- 03
POST when the business event happens
Pack, pay, check-in, or scan. Not on every autosave. Use the business id as Idempotency-Key.
- 04
Show the job result where the work is
queued is not done. Surface AGENT_OFFLINE and PRINT_ERROR to the person at the bench.
Node.js
// Badge PDF at check-in
const res = await fetch('https://api.printbase.cloud/v1/print-jobs', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': idempotencyKey,
},
body: JSON.stringify({
printer_code: Number(process.env.PRINTER_CODE),
content_type: 'pdf',
content: pdf.toString('base64'),
copies: 1,
}),
});
if (!res.ok) throw new Error(`PrintBase ${res.status}: ${await res.text()}`);
const job = await res.json();
// { id: "job_abc", status: "queued" }
Details for this setup
Stock size
A badge PDF at the wrong size wastes a die. Measure once. The agent prints only what you send; it does not fetch the document from the platform for you.
Offline check-in
If the network drops, the agent cannot receive jobs. Plan a local fallback if the event cannot stop. This API is online.
Questions
Can the kiosk print with window.print?
That opens a dialog and uses the kiosk user's printer choice. This flow does not.
Walk-up guests?
Create the record, then print. There is no print without data.
Two desks? in this setup
Two codes. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.
Reprint a smudged badge?
New key, or the same key will not print again. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.
Free plan: 100 jobs a month on one computer, no card.