Skip to main content
Authenticated API

Voice AI endpoints require a valid JWT Bearer token with staff roles. Accessible via the API gateway at /v1/voice-ai/* and /v1/speech/*.

Drive-Thru

Lane-aware voice sessions with speed of service tracking for drive-thru operations.

Base Path: /api/v1/voice/drive-thru


Drive-Thru Session Phases

PhaseCodeDescription
GreetinggreetingCustomer arrived, AI greeting
Taking Ordertaking_orderActive order conversation
UpsellingupsellingAI suggesting add-ons
ConfirmingconfirmingReviewing order with customer
Total Announcementtotal_announcementAnnouncing total
Pull Forwardpull_forwardCustomer pulling to window
At Windowat_windowCustomer at payment window
PaymentpaymentProcessing payment
PickuppickupHanding off order
CompletecompleteSession finished
CancelledcancelledSession cancelled

Lane Types

TypeCodeDescription
StandardstandardSingle lane operation
ExpressexpressLimited menu, faster service
DualdualTwo-lane merged ordering

Start Drive-Thru Session

Request

POST /api/v1/voice/drive-thru/sessions
Authorization: Bearer {access_token}
Content-Type: application/json
{
"location_id": "loc-xyz789",
"lane_id": "lane-1",
"lane_number": 1,
"lane_type": "standard",
"language": "en",
"car_description": "Blue sedan"
}

Response

{
"session_id": "dt-sess-abc123",
"voice_session_id": "voice-sess-xyz789",
"lane_id": "lane-1",
"lane_number": 1,
"lane_type": "standard",
"phase": "greeting",
"arrival_time": "2026-01-23T14:30:00Z",
"speaker_start_time": "2026-01-23T14:30:00Z",
"greeting": {
"text": "Good afternoon! Welcome to Acme Burgers. Ready to order?",
"audio_url": "https://audio.olympuscloud.ai/tts/dt-greeting.mp3"
}
}

Transition to Window

Request

POST /api/v1/voice/drive-thru/sessions/{session_id}/window
Authorization: Bearer {access_token}

Response

{
"session_id": "dt-sess-abc123",
"phase": "at_window",
"window_arrival_time": "2026-01-23T14:32:15Z",
"metrics": {
"order_time_seconds": 135.0
}
}

Complete Payment

Request

POST /api/v1/voice/drive-thru/sessions/{session_id}/payment
Authorization: Bearer {access_token}

Complete Pickup

Request

POST /api/v1/voice/drive-thru/sessions/{session_id}/complete
Authorization: Bearer {access_token}

Response

{
"session_id": "dt-sess-abc123",
"phase": "complete",
"order_id": "order-12345",
"order_total": 24.99,
"metrics": {
"greet_time_seconds": 5.0,
"order_time_seconds": 135.0,
"payment_time_seconds": 45.0,
"food_time_seconds": 60.0,
"total_time_seconds": 245.0,
"target_time_seconds": 180.0,
"exceeded_target": true
}
}

Escalate to Human

Request

POST /api/v1/voice/drive-thru/sessions/{session_id}/escalate
Authorization: Bearer {access_token}
Content-Type: application/json
{
"reason": "Customer requested human assistance"
}

Get Speed of Service Metrics

Request

GET /api/v1/voice/drive-thru/metrics?location_id=loc-xyz789
Authorization: Bearer {access_token}

Response

{
"location_id": "loc-xyz789",
"average_total_time": 165.5,
"average_order_time": 95.2,
"average_payment_time": 35.8,
"average_food_time": 55.3,
"exceeded_target_count": 12,
"total_completed": 156,
"target_time_seconds": 180.0
}