Danvas
Danvas
DashboardSupportWelcome

👤 USER DOCS

User Guides

Getting Started

Getting StartedDashboard & OnboardingApp Settings

Tutorials

Tutorial: Setting Up Shift Tasks & ClosersTutorial: Managing Incidents in the InboxTutorial: Tracking Compliance & Sync StatusTutorial: Operational Workflows with the AI AssistantTutorial: Building & Deploying Custom Checklists

Daily Operations (Staff)

Shift Workspace & TasksService Day SetupDaily Line-UpStaff Service Day ReportsForms

Communication & Chat

Messages & AnnouncementsUnified Operations InboxAI Assistant

Manager & Admin Guides

Daily Line-Up SetupStaff SchedulingManaging LocationsNPS and Guest FeedbackCouponsContacts and Guest HistoryManager CloseoutsDaily Line-Up & ComplianceAnalyticsIncident ReportingWhistleblower Concerns & FeedbackAdmin Tools

⚙️ DEVELOPER DOCS

Getting Started

Getting StartedDevelopmentDeployment Guide

Architecture

Architecture OverviewExplanation: AI Integration & Tenant SecurityExplanation: Dynamic Forms Engine DesignExplanation: Compliance Ledger DesignExplanation: Live Sync & Data FreshnessData FlowArchitecture Decision Records

Core Domain

Core DomainDatabase ReferenceLocations DomainAuth & RBACScheduling DomainReports DomainIncidents DomainUnified Operations InboxLive Sync Data FreshnessToast Sync PipelineNotifications DomainCoupons and Guest NPSAudit Log & Compliance ArchitectureDesign Audit FindingsAI Chat IntegrationAnalytics & Tips Integration

Frontend

Frontend ArchitectureFormsLoading SkeletonsComponentsPWA & Offline ShellScreenshots

API Reference

API Reference

Endpoints

POS Sales APIOptimization Data APISchedule Shifts APIEmployee Export APIReports APIIncidents APIAI Chat APIPush Notifications APIWebhooks APICron API

Contributing

ContributingCode Examples

Security

Security & Compliance

Release Notes

What's New

AI Chat API

Conversational data querying with streaming responses

The AI Chat API allows users to query operational data and standard operating procedures using plain English. It returns streaming Server-Sent Events (SSE) responses through the native assistant runtime and Vercel AI Gateway.

POST
/api/assistant/chat

Authorization

bearerAuth
headerAuthorizationBearer <token>

Clerk JWT token from session

Request Body

application/json
  1. body
  1. body
  2. …
messages*array<>
threadId?string

Optional thread ID for conversation continuity

Response Body

Streaming response

response?stringtext/event-stream

SSE stream of AI responses

curl -X POST "https://example.com/api/assistant/chat" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "string"
      }
    ]
  }'
"string"

Error payloads

A failed tool or provider call never returns its own error text. Database statements, bound query values and provider credentials are stripped before the response is serialized, so an error part carries a fixed message plus a machine-readable classification:

{ "errorText": "The assistant could not complete that step. [provider_network]" }

The bracketed suffix is one of provider_auth, provider_rate_limit, provider_network, invalid_response, output_limit or unknown. Use it to decide whether retrying can help: provider_auth and output_limit will fail identically on a retry, while provider_rate_limit and provider_network will not. The suffix is a stable contract; the prose before it is not.

Related

AI Assistant User Guide

AI Integration Technical

API Overview

Incidents API

Endpoints for reporting and managing operational incidents

Push Notifications API

Web Push subscription lifecycle and sending endpoints

On this page

Error payloadsRelated