Files
dashback/docs/api/routes/warehouse/list.md
2026-09-27 21:01:20 +02:00

36 lines
615 B
Markdown

# `GET /warehouse`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List warehouses
Lists warehouses for the selected company, ordered by sort and name.
## Response `200`
List of warehouses
```json
{
"warehouses": [
{
"id": 1,
"name": "…",
"sort": 1
}
]
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | No company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._