Bulk-print marketplace labels to a thermal printer
eBay, Etsy, or Amazon labels you already downloaded can be sent as a batch of PDF jobs to one thermal printer.
For Sellers batch-printing marketplace labels
Overview
Marketplaces give you label files after you buy postage. PrintBase does not buy the postage and does not log into the marketplace. Your tool that already downloaded the PDFs can POST each file to the 4 by 6 printer.
Send one job per label with an idempotency key of the marketplace order id. A batch button that retries should not mint new keys or you will print the stack twice.
Size is 4 by 6. A PDF that is US Letter will be scaled by the driver into an unscannable 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
// One marketplace 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
Rate
A hundred labels are a hundred jobs. The free plan is 100 a month, so a real batch needs a paid plan.
Order of peeling
Jobs are queued. Do not assume a global sort across other users' jobs. Submit in the order you want for a single printer.
Questions
Does this connect to Amazon or Etsy?
No. You supply the PDF. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.
One PDF with all labels?
Possible if the printer cuts each page. Many thermal drivers do not. Separate jobs are easier to reprint.
ZPL from the marketplace?
If you truly received ZPL, send raw. Most small-seller files are PDF.
Wrong printer in a multi-user shop?
Bind the batch to the bench code, not to a default. 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.