# Check insurance eligibility

Operation ID: `patient.checkEligibility`

Check real-time insurance eligibility via the Stedi clearinghouse for the given payer/subscriber. The response body is Stedi's raw eligibility payload and its shape varies by payer, so it is intentionally documented as a dynamic JSON object rather than a fixed schema. Requires a Bearer JWT (any authenticated pool type).

## Public method

`checkInsuranceEligibility`

Signature: `patient.checkInsuranceEligibility(request)`

Return type: `Promise<InsuranceEligibilityResponse>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`POST /insurance/eligibility`

## Path parameters

None.

## Query parameters

None.

## Body parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `body` | [`CheckEligibilityRequest`](../models/CheckEligibilityRequest.md) | Yes |  |  |  | No |  |

Request model: [`CheckEligibilityRequest`](../models/CheckEligibilityRequest.md)

## Request example

```json
{
  "date_of_birth": "1990-05-15",
  "first_name": "Jordan",
  "last_name": "Example",
  "member_id": "MEM-example-001",
  "npi": "1234567890",
  "payer_id": "60054",
  "provider_name": "HealthCloud Test Clinic"
}
```

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`patient.JsonValue`](../models/patient.JsonValue.md) | application/json | Eligibility payload is relayed from the configured upstream payer adapter without a HealthCloud-normalized response shape. |

## Success response examples

### 200

```json
{}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Bad request — required fields missing, or Stedi rejected the request |
| `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
| `503` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Insurance eligibility checking is not configured for this deployment |

## Error examples

### 400 — Required eligibility fields are missing

```json
{
  "error": "'payer_id'"
}
```

### 401 — Missing or invalid access token

```json
{
  "error": "Authorization required"
}
```

### 503 — No Stedi API key is configured

```json
{
  "error": "Insurance eligibility check not configured"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
```

```ts
const request = {
  "date_of_birth": "1990-05-15",
  "first_name": "Jordan",
  "last_name": "Example",
  "member_id": "MEM-example-001",
  "npi": "1234567890",
  "payer_id": "60054",
  "provider_name": "HealthCloud Test Clinic"
};

const result = await patient.checkInsuranceEligibility(request);
```

## cURL

```bash
curl -X POST \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"date_of_birth":"1990-05-15","first_name":"Jordan","last_name":"Example","member_id":"MEM-example-001","npi":"1234567890","payer_id":"60054","provider_name":"HealthCloud Test Clinic"}' \
  'https://dev-api-patient.health.cloud/insurance/eligibility'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
