Skip to main content
GET
/
api
/
public
/
ai
/
products
{
  "Response": {},
  "Response.Answer": "<string>",
  "Response.PreferredProductIds": {},
  "401 Unauthorized": {},
  "400 Bad Request": {}
}

AI Product Suggestions

Returns AI-generated suggestions for which store products (time passes, credits, etc.) best match a natural language prompt. The response includes both an explanation and a list of preferred product IDs.

Authentication

Requires an authenticated customer session.

Query Parameters

prompt
string
required
The user’s natural language question or preference description. Example: “What’s the most affordable product with weekend access?”

Response

Response
object
AI result wrapper.
Response.Answer
string
Human-readable explanation answering the prompt.
Response.PreferredProductIds
array[number]
Product IDs recommended by the assistant.

Example Response

{
  "Response": {
    "Answer": "The 10-day pass is the most cost-effective for occasional weekend use.",
    "PreferredProductIds": [201, 208, 245]
  }
}

Usage in Portal

  • Public Checkout – Products grid
    • src/views/public/checkout/products/ProductsGrid.tsx (filters product list by AI)
    • src/views/checkout/steps/components/ProductAiPrompt.tsx
  • GET /api/public/ai/tariffs – Plan suggestions by prompt
  • GET /api/public/ai/bookings – Booking intent parsing and suggestions
  • GET /api/public/ai/chats/{sessionId} – General-purpose assistant chat

Error Responses

401 Unauthorized
error
The user is not authenticated.
400 Bad Request
error
Missing or invalid prompt.