> ## 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 Booking Suggestions

# AI Booking Suggestions

Parses a natural language prompt into a structured booking intent, including time window, duration, party size, desired amenities, resource type, and notes. Use the parsed fields to prefill the bookings search UI.

## Authentication

Requires an authenticated customer session.

## Query Parameters

<ParamField query="prompt" type="string" required>
  The user's natural language booking description. Example: "A meeting room for 10 with a projector next Tuesday 3–5pm".
</ParamField>

## Response

<ResponseField name="Response" type="object">
  Structured booking intent.
</ResponseField>

<ResponseField name="Response.resource_type" type="string">
  Resource type classification, e.g. "room|Meeting Room".
</ResponseField>

<ResponseField name="Response.partySize" type="number">
  Number of attendees.
</ResponseField>

<ResponseField name="Response.durationMinutes" type="number">
  Desired booking duration in minutes.
</ResponseField>

<ResponseField name="Response.timeConstraints" type="object">
  Preferred time window.
</ResponseField>

<ResponseField name="Response.timeConstraints.kind" type="string">
  Type of time constraint (e.g., fixed, range, recurring).
</ResponseField>

<ResponseField name="Response.timeConstraints.startISO" type="string">
  ISO 8601 start datetime.
</ResponseField>

<ResponseField name="Response.timeConstraints.endISO" type="string">
  ISO 8601 end datetime.
</ResponseField>

<ResponseField name="Response.timeConstraints.recurrence" type="string">
  Recurrence rule, if applicable.
</ResponseField>

<ResponseField name="Response.location" type="string">
  Named location reference, if extracted.
</ResponseField>

<ResponseField name="Response.amenities" type="array[string]">
  Desired amenities (keys correspond to booking filters).
</ResponseField>

<ResponseField name="Response.flexibilityMinutes" type="number">
  Acceptable shift in start time, in minutes.
</ResponseField>

<ResponseField name="Response.budget" type="number">
  Optional budget indication.
</ResponseField>

<ResponseField name="Response.notes" type="string">
  Free-form notes extracted from the prompt.
</ResponseField>

## Example Response

```json theme={null}
{
  "Response": {
    "resource_type": "room|Meeting Room",
    "partySize": 10,
    "durationMinutes": 120,
    "timeConstraints": {
      "kind": "fixed",
      "startISO": "2025-10-07T15:00:00.000Z",
      "endISO": "2025-10-07T17:00:00.000Z",
      "recurrence": ""
    },
    "location": "Downtown",
    "amenities": ["VideoConferencing", "Projector"],
    "flexibilityMinutes": 30,
    "budget": 0,
    "notes": "Board presentation"
  }
}
```

## Usage in Portal

* Public Bookings – Day and duration shortcuts
  * `src/views/public/bookings/components/DayAndDurationShortCuts.tsx` (applies AI intent to querystring)

## Related Endpoints

* `GET /api/public/ai/chats/{sessionId}` – General-purpose assistant chat
* `GET /api/public/ai/tariffs` – Plan suggestions by prompt
* `GET /api/public/ai/products` – Product suggestions by prompt

## Error Responses

<ResponseField name="401 Unauthorized" type="error">
  The user is not authenticated.
</ResponseField>

<ResponseField name="400 Bad Request" type="error">
  Missing or invalid prompt.
</ResponseField>
