Print From Your Own Software With the Print Jobs API
Got a script, a form tool, or your own app that should print something on the office printer? Send it to us over HTTP. One request, and the job prints on one of your AutoPrintEmail computers like any emailed attachment.
Table of Contents
- Create an API key
- Send a text job
- Send a PDF
- Choose the computer and printer
- Avoid double prints
- Check a job
- Shopify label batches
- Errors
- Frequently asked questions
Create an API key
Only team admins can create keys.
- Open Team > Integrations > API & automation.
- Name the key after whatever will use it, like "Order form".
- Click Create key and copy it straight away. We show it once and can't show it again.
If a key leaks, revoke it on the same page. It stops working immediately. Create a new one and swap it in.
Send a text job
You get back 202 and a job id:
202 means queued, not printed. The computer picks the job up within about 30 seconds.
Send a PDF
Use one of these instead of text:
pdfUrl: a publichttpslink to a PDF. We download it when you send the request. Redirects, IP addresses and local hostnames are refused.pdfBase64: the PDF itself, base64 encoded.
PDFs up to 10 MB. Text up to 100,000 characters. Send exactly one of text, pdfUrl or pdfBase64.
Choose the computer and printer
station: the email of the team member whose computer should print. If your team has only one printing computer you can leave it out. With several, it's required.printer: the printer's name as that computer knows it. Leave it out for the computer's default printer.
GET /api/v1/me returns the stations your key can reach:
Avoid double prints
Add a reference (your order id, say). Send the same reference again and we return the original job with "duplicate": true instead of printing twice. Handy when your tool retries. A failed job does not count, so after fixing the cause you can send the same reference again. References are remembered for 7 days after the job prints.
Check a job
status is one of pending, ready, printing, printed, failed.
Shopify label batches
If your store is connected, send "type": "label_batch" with a locationId and items: a list of { "variantId", "quantity" }. Labels print on the printer claimed for that location, using your store's transfer label template (the one you edit under Templates). Up to 200 variants and 2,000 labels per request. With more than one connected store, add "shop": "<store>.myshopify.com".
Errors
Errors come back as { "error": { "code": "..." } }.
| Status | Code | Meaning |
|---|---|---|
| 400 | EXACTLY_ONE_CONTENT_FIELD | Send one of text, pdfUrl, pdfBase64 |
| 400 | INVALID_PDF_URL, NOT_A_PDF, PDF_TOO_LARGE | The PDF can't be used |
| 401 | INVALID_API_KEY | Missing, wrong, or revoked key |
| 402 | SUBSCRIPTION_INACTIVE | Trial ended or plan lapsed |
| 404 | STATION_NOT_FOUND | No printing computer with that email |
| 409 | NO_PRINT_STATION | No team member is set up to print |
| 422 | STATION_REQUIRED | Several computers, pass station |
| 422 | LOCATION_NOT_CLAIMED | No computer prints for that Shopify location yet |
| 422 | PDF_FETCH_FAILED | We could not download pdfUrl (it must answer 200 directly, no redirect) |
Frequently asked questions
Does the computer need to be on? Yes. Jobs wait until the desktop app is running and signed in. A job's download link is valid for 24 hours, so a computer that is off for longer than that will report the job as failed; send it again.
Can I use this from a browser page? No. Keys are secrets. Call the API from a server or an automation tool, never from public page code.