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:
@@ -4,7 +4,9 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Update entity
|
||||
|
||||
Patches `name` and/or `firstName`. Writes `entityhistory` when values change.
|
||||
Patches fields that are present (`name`, `firstName`, `number`).
|
||||
`number` is only changed when the key is present (no auto-allocate).
|
||||
Writes `entityhistory` when values change.
|
||||
|
||||
|
||||
## Path parameters
|
||||
@@ -18,7 +20,8 @@ Patches `name` and/or `firstName`. Writes `entityhistory` when values change.
|
||||
```json
|
||||
{
|
||||
"name": "Müller",
|
||||
"firstName": "Anna"
|
||||
"firstName": "Anna",
|
||||
"number": "10042"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -33,6 +36,7 @@ Updated entity
|
||||
"customergroupId": 1,
|
||||
"firstName": "…",
|
||||
"name": "…",
|
||||
"number": "…",
|
||||
"createdAt": "2026-08-10T00:00:00.000Z",
|
||||
"updatedAt": "2026-08-10T00:00:00.000Z"
|
||||
}
|
||||
@@ -43,10 +47,11 @@ Updated entity
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Name required, invalid id, or no company selected — `{"error":"…"}` |
|
||||
| 400 | Name/number required, invalid id, or no company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Not authorized — `{"error":"…"}` |
|
||||
| 404 | Entity or company not found — `{"error":"…"}` |
|
||||
| 409 | Number already in use — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user