CoffeeOrderApp service.
list_menu
List the current coffee menu. Returns everyMenuItem available for ordering.
No input parameters required.
Response
An array of all menu items currently offered.
place_order
Create a new coffee order. The server validates the drink ID, size, milk, and temperature against the menu before persisting the order.Parameters
The name of the customer placing the order.
The drink to order. Must be a valid
DrinkId: espresso, americano, latte, cappuccino, cold-brew, or tea.Cup size. One of
small, medium, or large.Milk preference. One of
whole, oat, almond, or none. Defaults to the drink’s first available milk if omitted.Serving temperature. One of
hot, iced, or extra-hot. Defaults to the drink’s first available temperature if omitted.Number of espresso shots. Must not exceed the drink’s
maxShots. Defaults to 1 for espresso-based drinks and 0 for tea.Free-text special instructions for the barista.
Response
The newly created order with status
pending.get_order
Fetch a single order by its ID.Parameters
The order’s unique identifier. Must match the pattern
order-{N} (e.g., order-42).Response
The full order record. See
place_order → Response for the complete field list.list_orders
List orders, optionally filtered by status. Returns all orders when no filter is supplied.Parameters
Filter by order status. One of
pending, brewing, ready, picked-up, or cancelled. Omit to return all orders.Response
An array of matching orders, ordered by creation time. See
place_order → Response for per-object field details.start_brewing
Transition an order frompending to brewing. Call this when the barista begins preparing the drink.
Parameters
ID of the order to start brewing. Must currently have status
pending.Response
The updated order with
status: "brewing".Returns
InvalidOrderStatusTransitionError (409) if the order is not in pending status.mark_ready
Transition an order frombrewing to ready. Call this when the drink is prepared and waiting for pickup.
Parameters
ID of the order to mark as ready. Must currently have status
brewing.Response
The updated order with
status: "ready".Returns
InvalidOrderStatusTransitionError (409) if the order is not in brewing status.pick_up_order
Transition an order fromready to picked-up. This is a terminal status — the order lifecycle is complete.
Parameters
ID of the order being picked up. Must currently have status
ready.Response
The updated order with
status: "picked-up".Returns
InvalidOrderStatusTransitionError (409) if the order is not in ready status.cancel_order
Cancel apending or brewing order. Once cancelled, no further transitions are possible.
Parameters
ID of the order to cancel. Must currently have status
pending or brewing.Response
The updated order with
status: "cancelled".Returns
InvalidOrderStatusTransitionError (409) if the order is already ready, picked-up, or cancelled.