Files
dashback/docs/api/routes/printerjob.post.md
2026-10-31 21:02:53 +01:00

939 B

POST /printerjob

Protected. Requires a valid session cookie (credentials: 'include').

Create print job

Creates a new print job for an agent printer. Notifies the agent in real time.

Body (JSON)

Field Required Type Description
agentprinterId yes integer
type no string
data yes string
{
  "agentprinterId": 1,
  "type": "zpl",
  "data": "…"
}

Signals

On success, emits SSE signal: printerjob (see GET /events).

Response 201

Printer job created

{
  "printerjob": {
    "id": 1,
    "agentprinterId": 1,
    "printeragentId": 1,
    "type": "zpl",
    "state": "pending",
    "data": "…",
    "createdAt": "2026-08-10T00:00:00.000Z",
    "completedAt": "2026-08-10T00:00:00.000Z"
  }
}

Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.