> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Plan Suggestions

# 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

```json theme={null}
{
  "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`

## Related Endpoints

* `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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.