Files
dashback/docs/api/routes/carrier/_id.get.md
2026-10-17 05:10:25 +02:00

43 lines
856 B
Markdown

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