This commit is contained in:
seb
2026-09-27 22:01:47 +02:00
parent 68b793c9ba
commit d2aa9ff8b1
11 changed files with 1553 additions and 1 deletions

View File

@@ -0,0 +1,45 @@
# `GET /labeltemplate/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Get label template by ID
Retrieves a single label template for the authenticated user's selected company. The `thumb` field is always included inline as a base64-encoded 50×50 1-bit PNG string (`null` if not yet rendered).
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | Label template ID |
## Response `200`
Label template details
```json
{
"labeltemplate": {
"id": 1,
"company_id": 1,
"name": "…",
"width": 448,
"height": 200,
"dpi": 203,
"type": "zpl",
"content": {},
"thumb": "…"
}
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | Invalid ID or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 404 | Label template not found — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._