Skip to main content
Authenticated API

KDS endpoints require a valid JWT Bearer token with kitchen/chef roles. The API gateway exposes 6 KDS endpoints at /v1/commerce/kds/*.

Kitchen Display System (KDS) API

Comprehensive API for kitchen operations, including station management, ticket lifecycle, intelligent order routing, and AI-powered prep time estimation.

Base Path: /api/v1/kds

Overview

The KDS API provides:

FeatureDescription
Station ManagementCRUD operations for kitchen stations with 9 station types
Intelligent RoutingMenu item-to-station mapping with prep time rules
Ticket Lifecycle7-state ticket workflow (Held -> Pending -> InProgress -> Ready -> Bumped)
Expo ViewAggregated order status for expediter station
Course FiringCoordinate multi-course meal timing
AI Prep TimeML-based prep time prediction using station load
Allergen TrackingAllergen information flows through to tickets
Real-time EventsWebSocket events for ticket state changes

Station Types

The system supports 9 distinct station types:

StationCodeDescriptionExample Items
GrillgrillGrilled itemsBurgers, steaks, grilled chicken
FryfryFried itemsFries, wings, fried fish
PrepprepCold prep/saladsSalads, cold appetizers
ExpoexpoOrder assemblyFinal check station
BarbarBeveragesDrinks, cocktails
PizzapizzaPizza stationPizzas, flatbreads
SaladsaladSalad stationSalads, cold soups
DessertdessertDessert stationDesserts, pastries
GenericgenericCustom/otherAny unclassified items

Ticket Lifecycle

┌────────┐     ┌─────────┐     ┌────────────┐     ┌───────┐     ┌────────┐
│ HELD │────>│ PENDING │────>│ INPROGRESS │────>│ READY │────>│ BUMPED │
└────────┘ └─────────┘ └────────────┘ └───────┘ └────────┘
│ │ │ │
│ │ │ │
v v v v
┌────────────────────────────────────────────────────────────────────────┐
│ VOIDED │
└────────────────────────────────────────────────────────────────────────┘

v
┌──────────┐
│ RECALLED │
└──────────┘
StatusCodeDescription
HeldheldTicket created for future course, not displayed yet
PendingpendingTicket sent to kitchen, waiting to start
In Progressin_progressCook actively working on ticket
ReadyreadyItem(s) prepared, waiting for expo/pickup
BumpedbumpedTicket completed and cleared (terminal)
RecalledrecalledBrought back after ready (for modifications)
VoidedvoidedTicket cancelled (terminal)

State Transition Rules

From StateAllowed Transitions
heldpending, voided
pendingin_progress, held, voided
in_progressready, pending, voided
readybumped, recalled, voided
recalledin_progress, pending, voided
bumped(terminal - no transitions)
voided(terminal - no transitions)

Ticket Priority Levels

PriorityCodeValueDescription
Normalnormal0Standard order
Highhigh1VIP, rush order
Urgenturgent2Remake, complaint resolution

Allergen Tracking

Tickets automatically include allergen information from menu items and modifiers:

{
"items": [
{
"name": "Caesar Salad",
"quantity": 1,
"allergens": ["dairy", "gluten", "eggs"],
"modifiers": [
{
"name": "Extra Parmesan",
"allergens": ["dairy"]
}
]
}
]
}

Common Allergens

AllergenDescription
dairyMilk, cheese, cream
glutenWheat, barley, rye
nutsTree nuts
peanutsPeanuts
eggsEggs and egg products
soySoy and soy products
fishFish
shellfishShellfish, crustaceans
sesameSesame seeds

Allergens are fetched from the Menu Service during order routing and displayed prominently on tickets.


Display Settings

Station display settings are stored in the settings JSON field of the station object.

{
"columns": 3,
"sort_by": "time",
"show_modifiers": true,
"show_server": true,
"show_allergens": true,
"alert_sound": true,
"alert_threshold_seconds": 600,
"color_coding": {
"on_time": "#22c55e",
"warning": "#f59e0b",
"late": "#ef4444"
}
}
SettingTypeDescription
columnsintegerNumber of ticket columns (1-4)
sort_bystringSort order: time, priority
show_modifiersbooleanDisplay item modifiers
show_serverbooleanDisplay server name
show_allergensbooleanDisplay allergen banners
alert_soundbooleanPlay sound for new tickets
alert_threshold_secondsintegerTime before "late" warning
color_codingobjectHex colors for time-based styling

Error Responses

Station Not Found (404)

{
"error": {
"code": "NOT_FOUND",
"message": "Station not found"
}
}

Insufficient Permissions (401)

{
"error": {
"code": "UNAUTHORIZED",
"message": "insufficient permissions to create stations"
}
}

Invalid State Transition (400)

{
"error": {
"code": "INVALID_STATE_TRANSITION",
"message": "Cannot transition from bumped to in_progress"
}
}

Sub-Pages

  • Stations - Station management CRUD operations
  • Tickets - Ticket lifecycle operations
  • Routing - Routing rules and order routing
  • Expo - Expo view and course firing
  • Events - Real-time WebSocket events