u
This commit is contained in:
59
docs/api/routes/labeltemplate/testprint.md
Normal file
59
docs/api/routes/labeltemplate/testprint.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# `POST /labeltemplate/testprint`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Test print label template
|
||||
|
||||
Dispatches a test print job for a label template or unsaved canvas objects to a specified ZPL printer.
|
||||
Placeholders in text and barcodes are interpolated using a sample article or the specified article SKU.
|
||||
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `printerId` | no | integer | |
|
||||
| `agentprinterId` | no | integer | |
|
||||
| `templateId` | no | integer | |
|
||||
| `objects` | no | any[] | |
|
||||
| `width` | no | integer | |
|
||||
| `height` | no | integer | |
|
||||
| `dpi` | no | integer | |
|
||||
| `sku` | no | string | |
|
||||
| `quantity` | no | integer | |
|
||||
|
||||
```json
|
||||
{
|
||||
"printerId": 1,
|
||||
"agentprinterId": 1,
|
||||
"templateId": 1,
|
||||
"objects": [],
|
||||
"width": 1,
|
||||
"height": 1,
|
||||
"dpi": 1,
|
||||
"sku": "…",
|
||||
"quantity": 1
|
||||
}
|
||||
```
|
||||
|
||||
## Response `200`
|
||||
|
||||
Print job created
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Invalid parameters |
|
||||
| 404 | Printer or template not found |
|
||||
| 500 | Server error |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user