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 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 printer
Printers are set up on the computer that prints: in the desktop app open Manage Connections > API printers and add one, giving it a name like "Receipt printer". The API addresses it by id, so renaming or swapping the physical printer later is a change in the desktop app only, never in your automation.
GET /api/v1/me lists them:
Put the id in the job as target:
If your team has exactly one printer set up you can leave target out. With several, it is required. station (the computer's email) is an alternative when that computer has one printer.
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".
Three read-only endpoints hand you the ids, so nothing has to be copied out of the Shopify admin (they are what the Zapier and Make dropdowns call):
GET /api/v1/shopify/shops: your connected stores.GET /api/v1/shopify/locations?shop=: the store's locations, each withclaimed: truewhen a team computer prints for it.GET /api/v1/shopify/variants?shop=&q=&cursor=: 50 variants per page, sorted by product name;qsearches product title, SKU, barcode and numeric id, andnextCursorfetches the next page.
shop is optional with one connected store.
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 |
| 404 | TARGET_NOT_FOUND | No printer with that id (deleted, or another team's) |
| 409 | NO_PRINT_STATION | No team member is set up to print |
| 409 | STATION_NOT_CONFIGURED | That computer has no API printer yet. Add one in the desktop app |
| 422 | TARGET_REQUIRED | Several printers set up, pass target |
| 409 | NO_SHOPIFY_SHOP | No Shopify store is connected to the team |
| 422 | SHOP_REQUIRED | Several stores connected, pass shop |
| 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.
Why not just send the printer name? Printer names change (drivers, reinstalls, a new model) and differ per computer. A target is a stable id you set once; the computer owner can repoint it without touching any Zap or script.
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.