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

AI Plan Suggestions

Returns AI-generated suggestions for which membership plans are most suitable based on a natural language prompt. The response includes an explanation and a list of preferred plan IDs that you can use to filter or preselect plans in the UI. Terminology
  • We refer to locations (backend term: businesses) as locations in this documentation.
  • We refer to customers (backend term: coworkers) as customers in this documentation.

Authentication

Requires an authenticated customer session.

Query Parameters

prompt
string
required
The user’s natural language question or preference description. Example: “Which plan is best if I work 3 days a week and need meeting room access?”

Response

Response
object
AI result wrapper.
Response.Answer
string
Human-readable explanation answering the prompt.
Response.PreferredPlanIds
array[number]
List of plan IDs recommended by the assistant.

Example Response

{
  "Response": {
    "Answer": "Based on your requirements, our Part-Time plan with meeting room add-ons is a great fit.",
    "PreferredPlanIds": [123, 456]
  }
}

Usage in Portal

  • Checkout – Plan selection step
    • src/views/checkout/steps/TariffSignupStep.tsx (filters visible plans by AI)
    • src/views/checkout/steps/components/TariffAiPrompt.tsx
  • GET /api/public/ai/products – Product 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.