Skip to content

GET /jobs/{jobId}

Returns the current state of a print job. The state is queried live from CUPS on each request.

Use this endpoint to poll for completion after submitting a job with wait: false via POST /print/{target}.

Endpoint:

GET /api/v1/jobs/{jobId}
ParameterTypeDescription
jobIdstringThe job ID returned by POST /print/{target} (e.g. pj_a8f3e1b2).
{
"status": "success",
"statusCode": 200,
"result": {
"module": "/jobs/pj_a8f3e1b2",
"message": "Job retrieved.",
"content": {
"jobId": "pj_a8f3e1b2",
"printer": "tcp_192-168-86-250_9100",
"target": "tag_LABELS",
"title": "Shipping Label #1234",
"source": "my-erp",
"contentType": "raw_base64",
"size": 1024,
"state": "completed",
"error": null,
"createdAt": "2026-03-28T14:30:00.000Z",
"completedAt": "2026-03-28T14:30:08.500Z",
"cupsJobId": "ProxyBox_Labels-42"
}
}
}
FieldTypeDescription
jobIdstringProxyBox job ID.
printerstringPrinter path that received the job.
targetstringOriginal target from the request.
titlestringJob title.
sourcestring | nullSubmitting application or user.
contentTypestringContent type used (e.g. pdf_base64, raw_url).
sizenumberDocument size in bytes.
statestringCurrent state (see below).
errorstring | nullError message if failed.
createdAtstringISO 8601 timestamp.
completedAtstring | nullISO 8601 timestamp, or null if still active.
cupsJobIdstring | nullCUPS internal job ID. For debugging only.
StateDescription
queuedSubmitted to CUPS, waiting to print.
printingCUPS is actively sending data to the printer.
completedFinished successfully.
failedCUPS error or pre-flight check failed.

Returned when the job ID doesn’t exist or has expired from memory (jobs are kept for 1 hour).

{
"status": "error",
"statusCode": 404,
"result": {
"module": "/jobs/pj_00000000",
"message": "Job not found",
"content": {
"message": "No job with ID: pj_00000000"
}
}
}
// Submit a non-waiting print job
const printRes = await fetch('https://pbx-ABCD.pbxz.io/api/v1/print/tag_LABELS', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-API-Key': 'YOUR_KEY' },
body: JSON.stringify({
content: 'XlhBXkZPNTAuNTBeQTBOLDUwLDUwXkZESGVsbG8gV29ybGReRlNeWFo=',
contentType: 'raw_base64',
wait: false
})
});
const { result } = await printRes.json();
const jobId = result.content.jobId;
// Poll until complete
let state = 'queued';
while (state === 'queued' || state === 'printing') {
await new Promise(r => setTimeout(r, 2000));
const jobRes = await fetch(`https://pbx-ABCD.pbxz.io/api/v1/jobs/${jobId}`, {
headers: { 'X-API-Key': 'YOUR_KEY' }
});
const job = await jobRes.json();
state = job.result.content.state;
}
console.log(`Job ${jobId}: ${state}`);