Skip to main content
POST
/
api
/
public
/
faqs
/
aiSearch
{
  "AiResponse": {},
  "AiResponse.r": "<string>",
  "AiResponse.UsedDocumentId": 123,
  "AiResponse.UsedDocumentName": "<string>"
}

AI FAQ Search

Submits a natural language question and returns an AI-generated response based on the location’s FAQ knowledge base. If a matching document was used, its ID and name are included in the response.

Authentication

No authentication required.

Request Body

query
string
required
The natural language question to search for.

Response

AiResponse
object
required
The AI-generated response.
AiResponse.r
string
required
The generated answer text.
AiResponse.UsedDocumentId
number
ID of the FAQ document used to generate the answer, if applicable.
AiResponse.UsedDocumentName
string
Name of the FAQ document used, if applicable.

Examples

Search FAQs

POST /api/public/faqs/aiSearch
Content-Type: application/json

{
  "query": "What are the opening hours?"
}
{
  "AiResponse": {
    "r": "Our space is open Monday to Friday from 8am to 8pm, and Saturday from 9am to 5pm.",
    "UsedDocumentId": 15,
    "UsedDocumentName": "Opening Hours"
  }
}

TypeScript Integration

import endpoints from '@/api/endpoints'

const result = await httpClient.post(endpoints.faqs.aiSearch().url, {
  query: 'What are the opening hours?',
})