> For the complete documentation index, see [llms.txt](https://ideonapi.gitbook.io/quote-and-select/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ideonapi.gitbook.io/quote-and-select/quote-individuals/shop-by-doc.md).

# Shop by Doc

Both the [IFP Medical](/quote-and-select/quote-individuals/aca-medical.md) and [Medicare Advantage](/quote-and-select/quote-individuals/medicare-advantage.md) quoting workflows support evaluation of provider participation within a single API call. This process is commonly referred to as "Shop by Doc", short for shopping for coverage with doctor participation in the plan's network as a core component. While the quote and provider participation is evaluated in a single endpoint, the provider(s) the end user would like to evaluate must be first identified. This results in a two-step process for building a Shop by Doc experience with Ideon's APIs:

1. [Search for a Specific Provider](/quote-and-select/provider-network-directory-search/search-for-a-specific-provider.md) - use the "Provider Search" endpoint to identify one or more of the end user's healthcare provider's NPIs and, optionally, addresses.
2. [Quote Applicants with Provider Data](#quote-applicants-with-provider-data) - quote the end user in the IFP Medical or Medicare Advantage markets with the selected providers, returning available plans and their benefits, premiums, and provider participation data.

## Search for a Specific Provider

See the [Search for a Specific Provider section](/quote-and-select/provider-network-directory-search/search-for-a-specific-provider.md) for a detailed summary. The output of this step is one or more selected provider NPIs and, optionally, specific addresses they practice at.&#x20;

## Quote Applicants with Provider Data

### Quoting an Individual with Provider Participation

The NPIs and optional address IDs for one or more provider(s) can be passed in the request body of the Medical Plan Search endpoint ([API docs](https://docs.ideonapi.com/#tag/Medical-ACA/operation/findMajorMedicalPlans)) or Medicare Advantage Plan Search endpoint ([API docs](https://docs.ideonapi.com/#tag/Medicare-Advantage/operation/findMedicareAdvantagePlans)) to evaluate provider- and address-level participation for each of the quoted plans. The NPIs and optional address IDs should be included in the `providers` array in the request body. Each unique `npi` and optional `address_id` combination (corresponding to the provider NPI) should be included in its own object in the array.

If an NPI is included in an object in the `providers` array with no corresponding address ID, then the provider will be evaluated for participation in each plan's network at *any* address they practice at. All in-network addresses for the provider will be returned for each plan.

If an NPI and address ID are included in an object in the `providers` array, then the provider will be evaluated for participation in each plan's network at the given address, and only that address.

Neither NPIs nor address IDs passed in the `providers` array are validated. If values passed for `npi` and/or `address_id` are invalid or not found, the quote will succeed and participation will be evaluated as out-of-network. We recommend including a maximum of 50 NPIs or NPI/Address ID combinations in each given quote request.

### Provider Participation in the Response

If the `providers` array is included in the request body, then a `providers` array will also be included in the response schema for each plan object in the `plans` array with data on the provider's participation in the plans network. The `providers` array includes objects for each of the requested providers; each object contains three fields.

* **Provider NPI** (`npi`) - the NPI of the provider for which participation is being evaluated.
* **Network Participation Evaluation** (`in_network`) - a boolean indicating whether or not the provider participates in the plan's network. If no `address_id` was passed for the provider in the request, this will be *true* if the provider participates in the plan's network at any address. If an `address_id` was passed for the provider in the request, this will be *true* if the provider participates in the plan's network at the specific address passed.&#x20;
* **In-Network Addresses** (`addresses`) - an array of the addresses at which the provider practices and participates in the plan's network. If no `address_id` was passed for the provider in the request, this will contain all addresses the provider practices at and participates in the plan's network. If an `address_id` was passed for the provider in the request, this will be filtered to only contain the specific address passed. If no addresses satisfy the above criteria, then the `addresses` array will be empty.

{% code title="Sample Response for a Plan Object with an Out-of-Network Provider" %}

```json
{
    "id": "12345NY0000001",
    "name": "Blue Shield Inspire (HMO)",
    "premium": 500.0,
    "providers": [
        {
            "npi": 1538670880,
            "in_network": false,
            "addresses": []
        }
    ],
    "...": "additional fields included"
}
```

{% endcode %}

{% code title="Sample Response for a Plan Object with an In-Network Provider" %}

```json
{
    "id": "12345NY0000001",
    "name": "Blue Shield Inspire (HMO)",
    "premium": 500.0,
    "providers": [
        {
            "npi": 1538670880,
            "in_network": true,
            "addresses": [
                {
                    "city": "Glendale",
                    "latitude": "33.65406",
                    "longitude": "-112.19773",
                    "state": "AZ",
                    "street_line_1": "6320 W Union Hills Dr",
                    "street_line_2": "Ste 200 Bldg A",
                    "zip_code": "85308",
                    "id": "2bd18d55-4bc6-3a66-aeef-fae893d5d8c0",
                    "phone_numbers": ["4806194097"],
                    "fax_numbers": [],
                    "external_id": null,
                    "pcp": false,
                    "pcp_id": null,
                    "accepting_new_patients": true
                }
            ]
        }
    ],
    "...": "additional fields included"
}
```

{% endcode %}
