883 B
883 B
POST /printer
Protected. Requires a valid session cookie (credentials: 'include').
Create printer
Creates a new printer for the selected company.
type must be "esc/pos" (lines) or "zpl" (pages).
Body (JSON)
{
"address": "…",
"type": "esc/pos",
"model": "…",
"serial": "…",
"sort": 1,
"desc": "…"
}
Response 201
Created printer
{
"printer": {
"id": 1,
"company_id": 1,
"address": "…",
"type": "esc/pos",
"model": "…",
"serial": "…",
"sort": 1,
"desc": "…"
}
}
Errors
| Status | Description |
|---|---|
| 400 | Invalid input or missing fields — {"error":"…"} |
| 401 | Unauthorized — {"error":"…"} |
| 403 | Not authorized — {"error":"…"} |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.