Print drink labels from online coffee orders
A drink label is a small ticket: name, modifiers, time. Send it when the order is paid, to the printer at the bar.
For Cafes printing a label per cup
Overview
Cafes lose time when a barista retypes a mobile order onto a label. The order payload already has the drink, milk, and name. Render a small PDF for a Brother or DYMO, or ESC/POS for a receipt printer used as a label, and post it to the bar printer_code.
One drink is one job if the labels differ. Identical copies can use the copies field. Do not print when the order is still a draft in the cart.
Match the PDF to the die. A 4 by 6 shipping template will not fit a cup label.
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
// Cup-label PDF
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
Name on the label
You decide the fields. The API does not have a drink schema. The agent prints only what you send; it does not fetch the document from the platform for you.
Bar printer versus kitchen
Use the bar code, not the food pass, unless you truly share the device. The agent prints only what you send; it does not fetch the document from the platform for you.
Questions
Brother or receipt printer?
Brother and DYMO want a sized PDF. A thermal receipt printer wants ESC/POS or a narrow PDF.
Modifiers cut off?
Your template is wider than the die. Fix the PDF. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.
Group order of ten drinks?
Ten jobs or one PDF with ten labels, depending on the cutter. A receipt printer will not cut between PDF pages unless the driver does.
Is there a cafe plugin?
No. 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.