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.
33 lines
666 B
Markdown
33 lines
666 B
Markdown
# `GET /entity/next-number`
|
|
|
|
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
|
|
|
Peek next customer number
|
|
|
|
Returns the next customer number that would be allocated (`type` entity)
|
|
without consuming it. Use on the customer add form.
|
|
|
|
|
|
## Response `200`
|
|
|
|
Next number
|
|
|
|
```json
|
|
{
|
|
"number": "…"
|
|
}
|
|
```
|
|
|
|
## 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`._
|