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

# Bolto iframe census review

> Embed Prescience census review, preliminary quoting, and hosted onboarding handoff inside Bolto.

Bolto can keep employers inside its benefits UI while Prescience handles census
confirmation, preliminary pricing, spouse/dependent collection, and onboarding.

## Flow

1. Bolto creates the employer group and syncs census from Check.
2. Bolto mints an embed session server-side.
3. Bolto renders the returned iframe URL in its marketplace UI.
4. The employer reviews the roster, excludes employees if needed, previews a
   preliminary estimate, and clicks **Finalize in Prescience**.
5. Prescience provisions hosted employer onboarding and emails employees for
   missing demographics and dependents.
6. Bolto continues daily reconciliation with `GET /members` and `GET /account`.

## Mint an embed session

```bash theme={null}
curl -X POST https://www.getprescience.com/api/partner/v1/groups/grp_8c2f41d09a3e/embed-sessions \
  -H "Authorization: Bearer $PRESCIENCE_API_KEY"
```

```json Response (201) theme={null}
{
  "token": "f4b7...",
  "url": "https://www.getprescience.com/embed/partners/bolto/groups/grp_8c2f41d09a3e?token=f4b7...",
  "expiresAt": "2026-07-28T23:10:00.000Z"
}
```

Render `url` in an iframe. Sessions expire after 30 minutes.

<Warning>
  Never put the partner API key in browser code. Only the short-lived embed token
  belongs in the iframe URL or request header.
</Warning>

## Embed token API

All embed endpoints accept the session token via:

```http theme={null}
x-prescience-embed-token: <token>
```

| Endpoint                                               | Purpose                       |
| ------------------------------------------------------ | ----------------------------- |
| `GET /api/partner/embed/v1/groups/{groupId}`           | Bootstrap group + census      |
| `PUT /api/partner/embed/v1/groups/{groupId}/census`    | Confirm edits and exclusions  |
| `POST /api/partner/embed/v1/groups/{groupId}/estimate` | Create preliminary quote      |
| `POST /api/partner/embed/v1/groups/{groupId}/finalize` | Enroll with hosted onboarding |

## Excluding employees

The iframe lets employers deselect employees from the quoting census without
deleting them from Bolto's source data. Persist this with:

```json theme={null}
{ "memberId": "mem_...", "excludedFromQuote": true }
```

Excluded employees stay in the stored census but are omitted from quoting and
enrollment readiness checks.

## Finalize handoff

`POST /finalize` creates the quote (if needed), enrolls the group with
`onboardingMode: "hosted"`, and returns:

```json theme={null}
{
  "redirectUrl": "https://www.getprescience.com/signin",
  "enrollment": { "...": "..." }
}
```

Redirect the top-level browser window to `redirectUrl` so the employer can
complete onboarding in Prescience. Prescience then emails employees directly to
collect spouse and dependent details.

## Framing configuration

Embed pages send a CSP `frame-ancestors` directive for Bolto origins. Override
allowed ancestors with:

```bash theme={null}
PARTNER_EMBED_FRAME_ANCESTORS=https://app.bolto.com,https://staging.bolto.com
```

Per-partner overrides can also be stored on the partner record as
`embedAllowedOrigins` from **internal.getprescience.com → Partners**.

## Internal admin setup

Prescience ops uses the **Partners** tab in the internal admin portal to:

1. Create the Bolto partner (`slug: bolto`)
2. Configure iframe embed origins for Bolto staging and production hosts
3. Enable production keys when go-live is approved
4. Invite Bolto engineers by email to the Partner API key portal

Invited engineers sign in at [internal.getprescience.com](https://internal.getprescience.com)
and mint their own sandbox (`psk_test_...`) and production (`psk_live_...`) keys.
They cannot access other internal operations screens.

## Related guides

* [Check-powered platforms](/guides/check-powered-platforms)
* [Census sync](/guides/census-sync)
* [Enrollment](/guides/enrollment)
