Expose PUT /customergroup/order for exact-set sort updates, keep create/update name-only, and mark POS/Lieferanten as non-editable in list responses.
41 lines
849 B
Markdown
41 lines
849 B
Markdown
# `GET /customergroup`
|
|
|
|
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
|
|
|
List customer groups
|
|
|
|
Lists customer groups for the selected company, ordered by `sort`.
|
|
Each item includes `editable`: `false` for implicit `POS` / `Lieferanten`
|
|
(name locked), `true` otherwise. Reorder via `PUT /customergroup/order`.
|
|
|
|
|
|
## Response `200`
|
|
|
|
Customer group list
|
|
|
|
```json
|
|
{
|
|
"customergroups": [
|
|
{
|
|
"id": 1,
|
|
"name": "…",
|
|
"sort": 1,
|
|
"editable": true
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
## Errors
|
|
|
|
| Status | Description |
|
|
|--------|-------------|
|
|
| 400 | No company selected — `{"error":"…"}` |
|
|
| 401 | Unauthorized — `{"error":"…"}` |
|
|
| 403 | Not authorized — `{"error":"…"}` |
|
|
| 404 | Company not found — `{"error":"…"}` |
|
|
|
|
---
|
|
|
|
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|