49 lines
937 B
Markdown
49 lines
937 B
Markdown
# `POST /printerjob/cancel-all`
|
|
|
|
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
|
|
|
Cancel all pending and processing printer jobs
|
|
|
|
Cancels all queued or in-flight print jobs for the selected company, optionally filtered by agentprinterId.
|
|
Notifies connected agents in real time.
|
|
|
|
|
|
## Body (JSON)
|
|
|
|
| Field | Required | Type | Description |
|
|
|-------|----------|------|-------------|
|
|
| `agentprinterId` | no | integer | |
|
|
|
|
```json
|
|
{
|
|
"agentprinterId": 1
|
|
}
|
|
```
|
|
|
|
## Response `200`
|
|
|
|
All matching jobs cancelled
|
|
|
|
```json
|
|
{
|
|
"success": true,
|
|
"cancelledCount": 1,
|
|
"jobs": [
|
|
{
|
|
"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`._
|