Fetch printers
Fetch printers
Fetch printers when your integration needs to choose where an order should print.
Use the returned printer id in print overrides. The printnodeId field is also returned for teams that already use it in existing workflows, but new integrations should prefer id.
List printers
GET https://app.yuzu.so/api/printers
Headers
X-API-Key: YOUR_API_KEY
Query parameters
| Parameter | Type | Description |
|---|---|---|
visibility | string | Optional. all, visible, or hidden. Defaults to all. |
printnodeId | string | Optional. Return the printer with this printnodeId. |
Example request
curl --request GET 'https://app.yuzu.so/api/printers?visibility=visible' \
--header 'X-API-Key: YOUR_API_KEY'
Response
Successful requests return an array of printers for your team.
[
{
"id": "printer_id_here",
"printnodeId": "74418336",
"name": "Warehouse printer",
"nickname": "Main packing printer",
"visible": true,
"status": "online",
"computer": {
"id": "computer_id_here",
"printnodeId": "660695",
"status": "online",
"nickname": "Packing station",
"name": "Packing station"
},
"trays": ["Tray 1", "Tray 2", "Manual Feed"],
"paperSizes": [
{
"name": "A4",
"width": "210mm",
"height": "297mm"
},
{
"name": "Letter",
"width": "215.9mm",
"height": "279.4mm"
}
],
"config": {
"fitToPage": true,
"tray": "Tray 1"
},
"layoutConfigs": []
}
]
Fetch one printer
GET https://app.yuzu.so/api/printers/{printerId}
Use the printer id returned by the list endpoint. The endpoint also accepts a returned printnodeId.
curl --request GET 'https://app.yuzu.so/api/printers/printer_id_here' \
--header 'X-API-Key: YOUR_API_KEY'
Successful requests return one printer object.
Refresh printers
GET https://app.yuzu.so/api/printers/refresh
Refresh printers when your team has recently connected, renamed, hidden, or changed a printer and the list endpoint looks stale. You do not need to refresh before normal print requests.
curl --request GET 'https://app.yuzu.so/api/printers/refresh' \
--header 'X-API-Key: YOUR_API_KEY'
Successful requests return the refreshed printer list.
Using a printer in a print request
Pass the returned printer id as overrides.printer when you need to route a print to a specific printer.
{
"orderIds": ["a2cb2c3d-4e5f-6g7h-8i9j-123a45c67890"],
"overrides": {
"printer": "printer_id_here",
"tray": "Tray 1"
}
}
Status codes
| Status | Meaning |
|---|---|
200 | Printer request succeeded. |
400 | Invalid query parameter. |
401 | Missing, malformed, or invalid API key. |
403 | API key cannot access the requested team resource. |
404 | Printer not found. |
5xx | Temporary service issue. Retry with backoff. |