Files
dashback/docs/api/routes/posterminal/update.md
2026-10-29 03:29:06 +01:00

73 lines
1.5 KiB
Markdown

# `PATCH /posterminal/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Update POS terminal
Updates a POS terminal configuration (name, root category, sync settings, or pairing pin).
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | POS terminal ID |
## Body (JSON)
| Field | Required | Type | Description |
|-------|----------|------|-------------|
| `name` | no | string | |
| `rootCategoryId` | no | integer | |
| `syncRootArticles` | no | boolean | |
| `sort` | no | integer | |
| `enabled` | no | boolean | |
| `pairingpin` | no | string | |
```json
{
"name": "Kassa 1 Neu",
"rootCategoryId": 10,
"syncRootArticles": false
}
```
## Response `200`
Updated posterminal
```json
{
"posterminal": {
"id": 1,
"name": "…",
"pairingpin": "…",
"token": "…",
"pairedAt": "…",
"clientserial": "…",
"rootCategoryId": 1,
"syncRootArticles": true,
"sort": 1,
"enabled": true,
"clientversion": "…",
"lastseenAt": "…",
"updatedAt": "…",
"categoryIds": [
1
]
}
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | Invalid posterminal or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Posterminal not found — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._