# Labels API

## Area

This file documents template, preset, preview, asset and print related routes for labels.

## Routes

| Method | Path | Purpose | UI usage |
| --- | --- | --- | --- |
| PUT | `/api/labels/template` | update the global label template | Label Designer |
| GET | `/api/labels/presets` | load presets | Label Tool, Label Designer |
| POST | `/api/labels/presets` | create a new preset | Label Tool, Label Designer |
| PUT | `/api/labels/presets/{preset_key}` | update an existing preset | Label Designer |
| DELETE | `/api/labels/presets/{preset_key}` | delete a preset | Label Designer |
| POST | `/api/labels/presets/default` | set the default preset | Label Tool |
| POST | `/api/labels/preview` | render a preview | Label Tool, Label Designer |
| POST | `/api/labels/assets` | upload an asset | Label Designer |
| DELETE | `/api/labels/assets/{asset_id}` | delete an asset | Label Designer |
| GET | `/api/labels/print-settings` | load the saved print profile | Label Tool |
| PUT | `/api/labels/print-settings` | save print profile, output mode and device target | Label Tool |
| GET | `/api/labels/printer-assistant` | load printer, port and format options | Label Tool |
| POST | `/api/labels/batch-print` | prepare an A4 or label printer batch job | Label Tool |

## Documentation note

For the detailed docs, explain:

- which preset or template is in focus
- which fields are stored
- which payload is expected for preview or asset upload
- how A4 jobs and label printer jobs differ
- how print profiles, ports, baud rate and auto-dispatch are persisted
