52 lines
927 B
Markdown
52 lines
927 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
|
|
]
|
|
}
|
|
```
|
|
|
|
## Signals
|
|
|
|
On success, emits SSE signal: `warehouse` (see [`GET /events`](../events.md)).
|
|
|
|
## 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`._
|