# Guide: brokers and agents

Start from the client's doctors. List the plans that list each doctor, keep the plans every doctor shares, and quote those first.

Source: https://inplan.io/docs/guides/brokers · Updated 2026-10-30

## 1. List the plans for each doctor

Call `GET /v1/providers/{npi}/plans` for each doctor. Filter by `market`, `state` and `year` to match the client.

curl:

```bash
curl https://api.inplan.io/v1/providers/1184617268/plans \
  -H "Authorization: Bearer $INPLAN_KEY" \
  -G -d market=aca -d state=OH -d year=2026
```

JavaScript:

```javascript
const url = new URL("https://api.inplan.io/v1/providers/1184617268/plans");
url.search = new URLSearchParams({ market: "aca", state: "OH", year: "2026" });

const res = await fetch(url, {
  headers: { Authorization: `Bearer ${process.env.INPLAN_KEY}` },
});
const body = await res.json();
const planIds = new Set(body.data.plans.map((p) => p.plan_id));
```

Python:

```python
import os, requests

res = requests.get(
    "https://api.inplan.io/v1/providers/1184617268/plans",
    params={"market": "aca", "state": "OH", "year": "2026"},
    headers={"Authorization": f"Bearer {os.environ['INPLAN_KEY']}"},
    timeout=10,
)
body = res.json()
plan_ids = {p["plan_id"] for p in body["data"]["plans"]}
```

## 2. Keep the plans they share

Intersect the `plan_id` sets of all the doctors. The plans left list every doctor. For each plan, `plan_name`, `metal_level`, `plan_type` and `network_tiers` help you compare.

Response (200 OK · plans, shortened):

```json
{
  "data": {
    "plans": [
      {
        "plan_id": "29276OH0970001",
        "plan_year": 2026,
        "plan_name": "Anthem Bronze Pathway 10600 ($0 Virtual PCP + $0 Select Drugs)",
        "metal_level": "Bronze",
        "plan_type": "HMO",
        "network_tiers": [
          "PARTICIPATING"
        ]
      },
      {
        "plan_id": "29276OH0970002",
        "plan_year": 2026,
        "plan_name": "Anthem Heart Healthy Bronze Pathway 6000 ($0 Virtual PCP + $0 Select Drugs)",
        "metal_level": "Expanded Bronze",
        "plan_type": "HMO",
        "network_tiers": [
          "PARTICIPATING"
        ]
      }
    ]
  }
}
```

## 3. Medicare Advantage clients

Use `market=ma`. Each Medicare Advantage plan carries `service_area_states` and `provider_state_in_service_area`, so you can drop plans that the client cannot buy where they live.

## 4. Confirm the quote

Before you send the quote, run `GET /v1/check` (or one batch) for the chosen plan and every doctor, and show the date from `evidence`.
