# Fetch one plan's detail (GET Session/{id}/Plans/{planId})

Operation ID: `connectors.connectureSessionPlanById`

Fetch one plan's detail (GET Session/{id}/Plans/{planId}). An existing ``token`` is reused when provided, else one is fetched.

## Public method

`sessionPlanById`

Signature: `connectors.connecture.createClient(config).sessionPlanById(body)`

Return type: `Promise<ConnectureSessionPlanByIdResult>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`POST /connectors/connecture/session-plan-by-id`

## Path parameters

None.

## Query parameters

None.

## Body parameters

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

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

## Request example

```json
{
  "basic_token": "example-access-token",
  "client_key": "example-api-key",
  "client_secret": "example-client-secret",
  "fips": "example-fips",
  "mode": "sandbox",
  "plan_id": "12345",
  "session_id": "12345",
  "token": "example-access-token",
  "zip_code": "02116"
}
```

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`ConnectureSessionPlan`](../models/ConnectureSessionPlan.md) | application/json | Successful response |

## Success response examples

### 200

```json
{
  "allow_cost_sharing_reduction": true,
  "annual_calculated_plan_premium": 1,
  "annual_plan_premium": 1,
  "application_fee": 1,
  "benefit_amount": "example-benefit-amount",
  "benefit_highlights": [],
  "brand_name": "Example Name",
  "calculated_medical_premium": 1,
  "carrier_id": "12345",
  "carrier_name": "Example Name",
  "catastrophic_limit": 1,
  "client_plan_id": "12345",
  "co_insurance": 1,
  "combined_deductible_combined": 1,
  "combined_deductible_in_network": 1,
  "combined_deductible_out_of_network": 1,
  "commissionable": true,
  "contract_id": "12345",
  "contribution_type": 1,
  "cpid": "example-cpid",
  "csr_level": 1,
  "days_covered": "example-days-covered",
  "documents": [],
  "drug_deductible": 1,
  "drug_premium": 1,
  "drug_rating": 1,
  "effective_end_date": "example-effective-end-date",
  "effective_start_date": "example-effective-start-date",
  "estimated_annual_drug_cost": 1,
  "estimated_annual_drug_cost_partial_year": 1,
  "estimated_annual_mail_order_drug_cost_partial_year": 1,
  "estimated_annual_medical_cost": 1,
  "estimated_annual_medical_cost_benefit_breakdown": [],
  "estimated_annual_medical_cost_partial_year": 1,
  "extended_plan_details": [],
  "external_id": "12345",
  "external_plan_id": "12345",
  "external_segment_id": "12345",
  "external_source_description": "example-external-source-description",
  "external_source_id": 1,
  "extra_data": [],
  "fees": [],
  "formulary_external_id": "12345",
  "formulary_tiers": [],
  "formulary_version": "example-formulary-version",
  "has_drug_coverage": true,
  "has_mail_drug_benefits": true,
  "has_preferred_mail_pharmacy_network": true,
  "has_preferred_pharmacy_network": true,
  "has_preferred_retail_pharmacy_network": true,
  "hra": {},
  "id": "12345",
  "initial_coverage_limit": 1,
  "is_available_nationwide": true,
  "is_defined_standard_benefit_plan": true,
  "is_hsa_qualified_plan": true,
  "is_plan_network_available": true,
  "is_select_plan": true,
  "logo_url": "https://example.com/resource",
  "mail_order_annual_cost": 1,
  "marketing_name": "Example Name",
  "maximum_out_of_pocket_cost": 1,
  "maximum_out_of_pocket_out_of_network_cost": 1,
  "medical_deductible": 1,
  "medical_premium": 1,
  "medical_rating": 1,
  "metal_id": 1,
  "metal_name": "Example Name",
  "model_drug_program": true,
  "modified_date": "example-modified-date",
  "non_licensed_plan": true,
  "organization_name": "Example Name",
  "pharmacy_costs": [],
  "phone_member": "+15555550123",
  "phone_member_tty": "+15555550123",
  "phone_non_member": "+15555550123",
  "phone_non_member_tty": "+15555550123",
  "plan_data_fields": [],
  "plan_drug_coverage": [],
  "plan_id": "12345",
  "plan_name": "Example Name",
  "plan_rating": 1,
  "plan_sub_type": "example-plan-sub-type",
  "plan_tiers": [],
  "plan_type": 1,
  "plan_type_abbreviation": "example-plan-type-abbreviation",
  "plan_type_description": "example-plan-type-description",
  "plan_year": "example-plan-year",
  "preference_match": 1,
  "product_name": "Example Name",
  "provider_url": "https://example.com/resource",
  "providers": [],
  "rate_factors": [],
  "rating_area": "example-rating-area",
  "riders": [],
  "segment_id": "12345",
  "snp_description": "example-snp-description",
  "snp_type": 1
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `400` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Connector validation rejected the payload, or a required field was missing or of the wrong type. |
| `401` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The HealthCloud bearer token is missing or invalid, or the vendor rejected the supplied connector credentials. |
| `500` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The connector failed unexpectedly. |
| `502` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The vendor returned an application or transport-level failure. |
| `504` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The vendor did not respond within the connector timeout. |

## Error examples

### 400 — Invalid request

```json
{
  "error": "Invalid request"
}
```

### 401 — Authorization required

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

### 500 — Internal error

```json
{
  "error": "Internal error"
}
```

### 502 — Upstream vendor error

```json
{
  "error": "Upstream vendor error"
}
```

### 504 — Upstream timeout

```json
{
  "error": "Upstream timeout"
}
```

## NodeJS / TypeScript implementation

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

```ts
const body = {
  "basic_token": "example-access-token",
  "client_key": "example-api-key",
  "client_secret": "example-client-secret",
  "fips": "example-fips",
  "mode": "sandbox",
  "plan_id": "12345",
  "session_id": "12345",
  "token": "example-access-token",
  "zip_code": "02116"
};

const result = await connectors.connecture.createClient(config).sessionPlanById(body);
```

## cURL

```bash
curl -X POST \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"basic_token":"example-access-token","client_key":"example-api-key","client_secret":"example-client-secret","fips":"example-fips","mode":"sandbox","plan_id":"12345","session_id":"12345","token":"example-access-token","zip_code":"02116"}' \
  'https://dev-api-connectors.health.cloud/connectors/connecture/session-plan-by-id'
```

## 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.
