This section documents the station management endpoints of the MiseOS API, which allow for retrieving, creating, updating, and deleting kitchen stations.
Stations represent kitchen sections (Hot Kitchen, Cold Kitchen, Pastry, etc.). Users and dishes can be assigned to stations to organize kitchen responsibilities and workflow.
Stations Endpoints#
| Method | URL | Auth |
|---|---|---|
GET | /stations | HEAD_CHEF, SOUS_CHEF |
GET | /stations/{id} | HEAD_CHEF, SOUS_CHEF |
GET | /stations/name/{name} | HEAD_CHEF, SOUS_CHEF |
POST | /stations | HEAD_CHEF |
PUT | /stations/{id} | HEAD_CHEF |
DELETE | /stations/{id} | HEAD_CHEF |
Station response object#
The station object has the following structure:
{
"id": 1,
"stationName": "Cold Kitchen",
"description": "Salads and starters"
}GET /stations#
Returns all stations.
Example Request#
curl -H "Authorization: Bearer <token>" \
https://miseos.corral.dk/api/v1/stationsResponse 200 — array of station objects.
[
{
"id": 1,
"stationName": "Hot Kitchen",
"description": "Main courses and hot dishes"
},
{
"id": 2,
"stationName": "Cold Kitchen",
"description": "Salads and starters"
}
]GET /stations/{id}#
Returns a station by ID.
Example Request#
curl -H "Authorization: Bearer <token>" \
https://miseos.corral.dk/api/v1/stations/1Response 200 — station object.
Errors
| Status | Cause |
|---|---|
404 | Station not found |
GET /stations/name/{name}#
Returns a station by exact name match.
The name comparison is case-insensitive.
Example Request#
curl -H "Authorization: Bearer <token>" \
https://miseos.corral.dk/api/v1/stations/name/Cold%20KitchenResponse 200 — station object.
Errors
| Status | Cause |
|---|---|
404 | Station not found |
POST /stations#
Creates a new station. Station names must be unique.
Request body
{
"stationName": "Grill",
"description": "Steaks and BBQ"
}Response 201 — created station object.
Errors
| Status | Cause |
|---|---|
400 | Invalid input — missing or empty stationName |
409 | Station name already exists |
PUT /stations/{id}#
Updates a station’s name and description. Station names must be unique.
Request body — same shape as create.
Response 200 — updated station object.
Errors
| Status | Cause |
|---|---|
400 | Invalid input — missing or empty stationName |
404 | Station not found |
409 | Station name already exists |
DELETE /stations/{id}#
Deletes a station. Deletion is blocked if the station has assigned users or dishes.
Response 204 — no content.
Errors
| Status | Cause |
|---|---|
409 | Station has assigned users or dishes |