Files
dashback/docs/api/routes/propertyname.post.md
2026-10-11 18:55:06 +02:00

54 lines
897 B
Markdown

# `POST /propertyname`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create property name
Creates a new property name for the selected company.
## Body (JSON)
| Field | Required | Type | Description |
|-------|----------|------|-------------|
| `name` | yes | string | |
| `sort` | no | integer | |
| `exclusive` | no | boolean | |
```json
{
"name": "…",
"sort": 1,
"exclusive": true
}
```
## Signals
On success, emits SSE signal: `propertyname` (see [`GET /events`](../events.md)).
## Response `201`
Created property name
```json
{
"propertyname": {
"id": 1,
"name": "…",
"sort": 1,
"exclusive": true,
"articleCount": 1
}
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | Bad request — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._