Print pick lists per branch
A distributor can print each branch's pick list on that branch's printer when the wave is released. No VPN to the printer is required.
For Distributors with a printer in each branch
Overview
The wave is released at headquarters. Each branch should receive its own pick list on its own printer. Your ERP groups lines by branch, renders a PDF per branch, and posts it to that branch's printer_code.
The branch agent must be online at release time. If it is not, store the failure and reprint when the branch opens. Do not send the list to headquarters' printer as a silent fallback.
A pick list is a PDF. Item labels, if you print those too, are a second job and often raw.
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
// Branch pick-list 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
No silent fallback
A missing agent is a visible error, not another branch's printer. The agent prints only what you send; it does not fetch the document from the platform for you.
Wave id in the key
Releasing the same wave twice should reuse the key. A corrected wave gets a new id.
Questions
Is there an ERP connector?
No. Export the PDF from the wave and POST it. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.
Can one PDF contain every branch?
It can, but then it prints in one place. Split the file per branch.
How many computers?
One agent per branch that prints. The free plan covers one computer. Several branches need a plan that allows them.
Status back to the ERP?
Poll the job id or use a paid webhook, then write the status on the wave.
Free plan: 100 jobs a month on one computer, no card.