u
This commit is contained in:
@@ -17,6 +17,13 @@ Posterminal list
|
||||
"id": 1,
|
||||
"name": "…",
|
||||
"pairingpin": "…",
|
||||
"token": "…",
|
||||
"pairedAt": "…",
|
||||
"clientserial": "…",
|
||||
"rootCategoryId": 1,
|
||||
"syncRootArticles": true,
|
||||
"lastseenAt": "…",
|
||||
"updatedAt": "…",
|
||||
"categoryIds": [
|
||||
1
|
||||
]
|
||||
|
||||
67
docs/api/routes/posterminal/update.md
Normal file
67
docs/api/routes/posterminal/update.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# `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 | |
|
||||
| `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,
|
||||
"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`._
|
||||
@@ -13,6 +13,8 @@ The pairingpin is randomly generated server-side and returned in the response.
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `name` | yes | string | |
|
||||
| `rootCategoryId` | no | integer | |
|
||||
| `syncRootArticles` | no | boolean | |
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -30,6 +32,13 @@ Created posterminal with generated pairingpin
|
||||
"id": 1,
|
||||
"name": "…",
|
||||
"pairingpin": "…",
|
||||
"token": "…",
|
||||
"pairedAt": "…",
|
||||
"clientserial": "…",
|
||||
"rootCategoryId": 1,
|
||||
"syncRootArticles": true,
|
||||
"lastseenAt": "…",
|
||||
"updatedAt": "…",
|
||||
"categoryIds": [
|
||||
1
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user