Align store calls with selected-company scoping and add entity numbers.
Drop companyId from company-scoped store wrappers and routes, add GET /entity/next-number plus optional number on entity create/update, and document dashdbschema API.md lookup in sibling-repos.
This commit is contained in:
@@ -5,6 +5,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
Create entity
|
||||
|
||||
Creates an entity in a company customer group and writes `entityhistory` (`Erstellt`).
|
||||
Optional `number`: omit to allocate the next customer number (`type` entity).
|
||||
|
||||
|
||||
## Body (JSON)
|
||||
@@ -13,7 +14,8 @@ Creates an entity in a company customer group and writes `entityhistory` (`Erste
|
||||
{
|
||||
"customergroupId": 1,
|
||||
"name": "Müller",
|
||||
"firstName": "Anna"
|
||||
"firstName": "Anna",
|
||||
"number": "10042"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -28,6 +30,7 @@ Created entity
|
||||
"customergroupId": 1,
|
||||
"firstName": "…",
|
||||
"name": "…",
|
||||
"number": "…",
|
||||
"createdAt": "2026-08-10T00:00:00.000Z",
|
||||
"updatedAt": "2026-08-10T00:00:00.000Z"
|
||||
}
|
||||
@@ -38,10 +41,11 @@ Created entity
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Name required or no company selected — `{"error":"…"}` |
|
||||
| 400 | Name/number required or no company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Not authorized — `{"error":"…"}` |
|
||||
| 404 | Company or customer group not found — `{"error":"…"}` |
|
||||
| 409 | Number already in use — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user