Files
dashback/docs/api/routes/labeltemplate/get.md
2026-10-07 21:31:33 +02:00

1.2 KiB

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.

Path parameters

Param Required Type Description
id yes integer Label template ID

Response 200

Label template details

{
  "labeltemplate": {
    "id": 1,
    "name": "…",
    "width": 1,
    "height": 1,
    "dpi": 1,
    "type": "…",
    "content": {
      "objects": [
        {
          "id": "…",
          "type": "textbox",
          "x": 1,
          "y": 1,
          "w": 1,
          "h": 1,
          "text": "…",
          "font": "…",
          "fontSize": 1,
          "barcodeFormat": "EAN8"
        }
      ]
    },
    "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.