Skip to main content
The health endpoint confirms the server is reachable. The menu endpoint returns the full list of drinks available for ordering, along with each drink’s customization options and base price.

GET /health

Returns a simple liveness status. Use this endpoint to confirm the server has started successfully before making other calls. No parameters required.

Response

status
string
required
Always "ok" when the server is running.

Example

curl http://localhost:3000/health
{ "status": "ok" }

GET /menu

Returns the complete list of drinks available for ordering. No parameters required.

Response

An array of MenuItem objects.
id
string
required
Unique drink identifier. One of: espresso, americano, latte, cappuccino, cold-brew, tea.
name
string
required
Human-readable display name for the drink.
kind
string
required
Drink category. One of: espresso, tea.
basePriceCents
integer
required
Base price in US cents before size multipliers or extra shot surcharges are applied.
availableMilks
string[]
required
Milk options that can be requested for this drink. Possible values: whole, oat, almond, none.
availableTemperatures
string[]
required
Temperature options available for this drink. Possible values: hot, iced, extra-hot.
maxShots
integer
required
Maximum number of espresso shots that can be added. 0 for tea.

Errors

_tagHTTP statusDescription
InternalAppError500An unexpected server error occurred

Example

curl http://localhost:3000/menu
[
  {
    "id": "espresso",
    "name": "Espresso",
    "kind": "espresso",
    "basePriceCents": 300,
    "availableMilks": ["none"],
    "availableTemperatures": ["hot"],
    "maxShots": 4
  },
  {
    "id": "americano",
    "name": "Americano",
    "kind": "espresso",
    "basePriceCents": 350,
    "availableMilks": ["none"],
    "availableTemperatures": ["hot", "iced"],
    "maxShots": 4
  },
  {
    "id": "latte",
    "name": "Latte",
    "kind": "espresso",
    "basePriceCents": 450,
    "availableMilks": ["whole", "oat", "almond", "none"],
    "availableTemperatures": ["hot", "iced", "extra-hot"],
    "maxShots": 4
  },
  {
    "id": "cappuccino",
    "name": "Cappuccino",
    "kind": "espresso",
    "basePriceCents": 425,
    "availableMilks": ["whole", "oat", "almond", "none"],
    "availableTemperatures": ["hot", "extra-hot"],
    "maxShots": 4
  },
  {
    "id": "cold-brew",
    "name": "Cold Brew",
    "kind": "espresso",
    "basePriceCents": 400,
    "availableMilks": ["whole", "oat", "almond", "none"],
    "availableTemperatures": ["iced"],
    "maxShots": 2
  },
  {
    "id": "tea",
    "name": "Tea",
    "kind": "tea",
    "basePriceCents": 325,
    "availableMilks": ["none"],
    "availableTemperatures": ["hot", "iced"],
    "maxShots": 0
  }
]

Full menu at a glance

DrinkBase priceMilksTemperaturesMax shots
Espresso$3.00nonehot4
Americano$3.50nonehot, iced4
Latte$4.50whole, oat, almond, nonehot, iced, extra-hot4
Cappuccino$4.25whole, oat, almond, nonehot, extra-hot4
Cold Brew$4.00whole, oat, almond, noneiced2
Tea$3.25nonehot, iced0
Prices shown are base prices for a small size. Medium and large sizes apply a multiplier of 1.15× and 1.30× respectively. Each extra shot beyond the first costs $0.75.

Build docs developers (and LLMs) love