38 lines
890 B
Markdown
38 lines
890 B
Markdown
# `DELETE /carrier/{id}`
|
|
|
|
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
|
|
|
Delete carrier
|
|
|
|
Deletes a carrier for the selected company, unless referenced in shipping.
|
|
|
|
## Path parameters
|
|
|
|
| Param | Required | Type | Description |
|
|
|-------|----------|------|-------------|
|
|
| `id` | yes | integer | Carrier ID |
|
|
|
|
## Signals
|
|
|
|
On success, emits SSE signal: `carrier` (see [`GET /events`](../events.md)).
|
|
|
|
## Response `204`
|
|
|
|
Carrier deleted
|
|
|
|
_No content_
|
|
|
|
## Errors
|
|
|
|
| Status | Description |
|
|
|--------|-------------|
|
|
| 400 | Invalid ID or no company selected — `{"error":"…"}` |
|
|
| 401 | Unauthorized — `{"error":"…"}` |
|
|
| 403 | Not authorized — `{"error":"…"}` |
|
|
| 404 | Carrier not found — `{"error":"…"}` |
|
|
| 409 | Carrier in use in shipping — `{"error":"…"}` |
|
|
|
|
---
|
|
|
|
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|