Skip to main content
GET
/
api
/
public
/
ai
/
chats
/
{sessionId}
{
  "Response": "<string>",
  "401 Unauthorized": {},
  "400 Bad Request": {}
}

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

sessionId
string
required
Client-generated unique session identifier (for example, a UUID) that keeps the context across requests in the same conversation.

Query Parameters

prompt
string
required
The user’s natural language question or instruction to the assistant.
latitude
number
Optional current latitude to personalize responses.
longitude
number
Optional current longitude to personalize responses.

Response

Response
string
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

401 Unauthorized
error
The user is not authenticated as a customer of a location.
400 Bad Request
error
Missing or invalid parameters (e.g., no prompt provided).