Printago API
POST /v1/printers/next-match

Get printers' next queue matches

For each printer, get the pending job the queue would give it if it were marked ready now. Ignores readiness only: tags, loaded materials, filament profiles and bed size are checked exactly as the queue checks them, in queue order. Each printer is answered on its own, so two printers can be told the same job. It's a prediction, not a reservation: another ready printer can take the job first, and automatic plate merging can combine it with other jobs. When a printer's Staggered Start group is full, its match is still returned and `staggeredStart` says what's holding it.

Requires: printer.viewqueue.view

Request Body

IDs of the printers to check

BulkActionRequest
idsrequired
string[]

Example Request

application/json
{
  "ids": [
    "string"
  ]
}

Response Schema

PrinterNextMatch[]
Array of PrinterNextMatch, each with:
blockersrequired
"in-maintenance" | "offline" | "disabled" | "needs-configuration"[]
Conditions besides readiness that also keep the printer from matching.
pendingJobCountrequired
number
How many pending jobs were considered.
printerIdrequired
string
pattern: ^[a-z0-9]{24}$
printJobIdrequirednullable
string
The pending job the queue would give this printer if it were marked ready now, or `null` when no pending job matches. It's a prediction: another printer can take the job first, and automatic plate merging can combine it with other jobs.
pattern: ^[a-z0-9]{24}$
reasonrequirednullable
"no-pending-jobs" | "no-loaded-slots" | "no-compatible-job"
Why nothing matched, when `printJobId` is `null`.
no-pending-jobsno-loaded-slotsno-compatible-job
staggeredStartrequirednullable
object
Set when the printer's Staggered Start group has no free starts right now. The match above is computed as if it had one; until a start frees up, the printer won't take it.
activerequired
number
groupIdrequired
string
pattern: ^[a-z0-9]{24}$
groupNamerequired
string
limitrequired
number

Example Response

201 OK — application/json
[
  {
    "printerId": "string",
    "printJobId": "string",
    "reason": "no-pending-jobs",
    "pendingJobCount": 1,
    "staggeredStart": {
      "groupId": "string",
      "groupName": "string",
      "active": 1,
      "limit": 1
    },
    "blockers": [
      "in-maintenance"
    ]
  }
]