AI Chat Session
Starts or continues an AI assistant chat session scoped to the current location. Use it to ask free-form questions about plans, products, bookings, and general portal guidance. The session is identified by a client-generated sessionId and can optionally include the user’s geolocation to tailor suggestions to nearby locations.
Notes
- This endpoint is read-only and returns generated text.
- Pass the natural-language prompt as a query parameter.
- If latitude/longitude are provided, responses may be adjusted to the nearest location.
Authentication
This endpoint requires an authenticated customer session (a logged-in customer of a location).
Path Parameters
Client-generated unique session identifier (for example, a UUID) that keeps the context across requests in the same conversation.
Query Parameters
The user’s natural language question or instruction to the assistant.
Optional current latitude to personalize responses.
Optional current longitude to personalize responses.
Response
AI-generated reply text. Can include markdown.
Example Response
{
"Response": "You can book a meeting room tomorrow afternoon. Would you like me to filter 8–10 people rooms with video conferencing?"
}
Usage in Portal
This endpoint is used by the floating AI assistant available across the portal:
- Layouts
src/layouts/DefaultLayout.tsx (global assistant button)
src/layouts/FullPageLayout.tsx (global assistant button)
- Dock
src/components/Dock/DockSection.tsx (mobile dock integration)
- Chat manager
src/components/ai/AiChatManager.tsx (session handling and message flow)
GET /api/public/ai/tariffs – Plan suggestions by prompt
GET /api/public/ai/products – Product suggestions by prompt
GET /api/public/ai/bookings – Booking suggestion intent parsing
Error Responses
The user is not authenticated as a customer of a location.
Missing or invalid parameters (e.g., no prompt provided).