47 lines
846 B
Markdown
47 lines
846 B
Markdown
# `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 | |
|
|
|
|
```json
|
|
{
|
|
"agentprinterId": 1,
|
|
"type": "zpl",
|
|
"data": "…"
|
|
}
|
|
```
|
|
|
|
## Response `201`
|
|
|
|
Printer job created
|
|
|
|
```json
|
|
{
|
|
"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`._
|