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

41 lines
822 B
Markdown

# `GET /warehouse/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Get warehouse by ID
Retrieves a single warehouse for the authenticated user's selected company.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | Warehouse ID |
## Response `200`
Warehouse details
```json
{
"warehouse": {
"id": 1,
"name": "…",
"sort": 1
}
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | Invalid ID or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Warehouse not found — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._