Files
dashback/docs/api/routes/warehouse/order.md
2026-09-30 19:29:13 +02:00

48 lines
835 B
Markdown

# `PUT /warehouse/order`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Reorder warehouses
Reorders warehouses for the selected company.
`warehouseIds` must include all existing warehouse IDs exactly once.
## Body (JSON)
| Field | Required | Type | Description |
|-------|----------|------|-------------|
| `warehouseIds` | yes | integer[] | |
```json
{
"warehouseIds": [
1
]
}
```
## Response `200`
Applied warehouse order
```json
{
"warehouseIds": [
1
]
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | Invalid warehouse order or 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`._