u
This commit is contained in:
51
docs/api/routes/carrier/order.md
Normal file
51
docs/api/routes/carrier/order.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# `PUT /carrier/order`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Reorder carriers
|
||||
|
||||
Reorders carriers for the selected company.
|
||||
`carrierIds` must include all existing carrier IDs exactly once.
|
||||
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `carrierIds` | yes | integer[] | |
|
||||
|
||||
```json
|
||||
{
|
||||
"carrierIds": [
|
||||
1
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Signals
|
||||
|
||||
On success, emits SSE signal: `carrier` (see [`GET /events`](../events.md)).
|
||||
|
||||
## Response `200`
|
||||
|
||||
Applied carrier order
|
||||
|
||||
```json
|
||||
{
|
||||
"carrierIds": [
|
||||
1
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Invalid carrier 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`._
|
||||
Reference in New Issue
Block a user