---
schema_version: "1"
id: 19d6f7f3676c56a5e6a4d46bf1dfc08a2b813b533bc352b980951c0c2b987fa8
title: GetPolicy(policyId, connectDynamicParameters)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/apex_ConnectAPI_InsurancePolicyAdminFamily_GetPolicy_1.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_ConnectAPI_InsurancePolicyAdminFamily_GetPolicy_1.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 19f76fda446c710d42581611d73250506b0f07a2f59759a79c60cddbebf3a198
description: Get details of an insurance policy. Pass additional context or metadata to customize the information that's fetched.
---
# GetPolicy(policyId, connectDynamicParameters)

Get details of an insurance policy. Pass additional context or metadata to customize the information that's fetched.

## API Version

63.0

## Requires Chatter

No

## Signature

public static ConnectApi.GetPolicyOutputRepresentation GetPolicy(String policyId, Map<String,String\> connectDynamicParameters)

## Parameters

**policyId**

- Type: String
- ID of the policy for which the details are to be fetched.

**connectDynamicParameters**

- Type: [Map](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_methods_system_map.htm "HTML (New Window)")<String,String>
- Map of connect dynamic parameters to fetch the policy details.

## Return Value

Type: [ConnectApi.GetPolicyOutputRepresentation](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_connectapi_output_get_policy_output.htm "Output representation of the policy details.")

## Usage

Use this API to fetch the insurance policy details. This includes related assets, participants, and coverages. Use query parameters to request additional information.

- When the contextOnly parameter is true, the API returns a context ID along with the insurance policy details.
- When you send a request with additional fields with the operator $in, it returns a list of field-set IDs. When the operator is $eq, the request returns a single field-set ID.

For examples, see [Get Policy](https://developer.salesforce.com/docs/atlas.en-us.264.0.insurance_developer_guide.meta/insurance_developer_guide/connect_responses_get_policy_output.htm).