Files
dashback/docs/api/routes/entity/next-number.md
seb e6c24654dd 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.
2026-08-07 06:22:13 +02:00

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`._