# Visa Benefits Companion showcase: guide for AI tools

This site is a showcase with fictional data. Every cardholder, card, partner, venue, price and offer is invented and is not a real Visa benefit. Nothing can be booked, reserved, held or paid.

All paths below are relative to the origin (scheme, host and port) you loaded this guide from. No credentials, API keys or cookies are needed for the read-only routes.

## Rules to follow

1. Tell the user the offers are fictional whenever you present them.
2. Never claim that anything was booked, reserved, held, paid or sent to a provider.
3. Treat `sample_profile` as a choice of fictional sample card. It is not sign-in and does not identify the user. Do not suggest the user is Mei, Priya or Alex.
4. Eligibility shows only whether the sample card type meets the offer's card rule. Party size, days, time of day, notice, age, payment and the full terms still apply. Quote them.
5. Never ask for or send card numbers, security codes or passwords.
6. Quote prices, days, notice and guest rules from the record. Do not invent missing values.

## Step by step

1. Fetch `/api/agent/options` for valid city IDs, category names and sample profiles.
2. Fetch `/api/agent/benefits?city={city}&sample_profile={id}` to list offers, 12 per page.
3. Follow `links.next` until it is `null` if you need every page.
4. Fetch `/api/agent/benefits/{id}?sample_profile={id}` for one record.
5. Send the user the readable link from `links.readable` so they can check it in a browser.

## Query parameters

| Parameter | Values | Default |
|---|---|---|
| `sample_profile` | `guest`, `mei`, `priya`, `alex` (exact, lowercase) | `guest` |
| `city` | city ID or name, for example `hanoi` or `Hanoi`; `all` for every city | all cities |
| `category` | a category name from options, for example `Live music` or `live-music` | all categories |
| `q` | search words, up to 200 characters, case-insensitive | none |
| `include_ineligible` | `true` or `false` | `false` |
| `page` | whole number from 1 | `1` |
| `limit` | whole number from 1 to 12 (JSON only) | `12` |

With `guest`, the card rule is not checked and every offer is listed with eligibility `unknown`. With a sample card, offers it does not meet are left out unless `include_ineligible=true`; `excludedIneligible` reports how many were left out.

Sample cards (all fictional):

- `mei`: Mei Lim, Meridian Bank Signature (tier Signature)
- `priya`: Priya Tan, Meridian Bank Infinite (tier Infinite)
- `alex`: Alex Chen, Meridian Bank Infinite Privilege (tier Infinite Privilege)

## Response fields

List responses contain `notice`, `sampleProfile`, `query`, `total`, `page`, `pages`, `pageSize`, `excludedIneligible`, `benefits` and `links`.

Each benefit contains `id`, `title`, `partner`, `category`, `city`, `cityId`, `country`, `neighbourhood`, `summary`, `value`, `price` (`usual`, `unit`, `currency`, `minimumSpend`), `party` (`min`, `max`), `guestPolicy`, `minimumAge`, `childrenAllowed`, `minimumNights`, `validDays`, `timeOfDay`, `notice` (`leadTimeHours`, `text`), `paymentRequirement`, `howItWouldWork`, `offerPeriod`, `availability`, `eligibility` (`state`, `label`, `reason`, `requiredCardTypes`, `basis`), `conditionNotes`, `features`, `terms`, `details`, `source` and `links`.

`eligibility.state` is `confirmed`, `ineligible` or `unknown`.

## Errors

Errors return JSON with `error` (a plain sentence) and `status`.

- `400`: unknown city, category or sample profile, or an invalid page, limit or search length. Fix the value and retry once.
- `404`: benefit not found or outside its offer period.
- `405`: the route is read-only; use GET.
- `414`: the query string is too long.

## Readable pages

The same data is available as plain HTML that needs no JavaScript:

- `/benefits?city=Hanoi&sample_profile=mei&page=1`
- `/benefits/{id}?sample_profile=mei`

## Conversation API (optional)

The site's concierge chat uses a cookie session. It is described in `/openapi.json`:

1. `POST /api/login` with `{"profileId":"mei"}` (or `guest`). Keep the `visa_showcase_v3` cookie the server returns and send it with every later request.
2. `POST /api/chat` with `{"message":"..."}`. Messages are up to 3,000 characters, one reply at a time, at most 12 per minute.

The session is a demo session, not authentication of a real person. Requests from a browser on another site are refused.

## Connecting through MCP

Some AI apps can connect to tools through MCP (Model Context Protocol). A local MCP set-up may be provided by the site operator. If the operator has switched it on, a remote MCP endpoint is at `/mcp` on this origin. Connecting always needs the user's approval inside their AI app. Not every AI app supports MCP.
