> ## Documentation Index
> Fetch the complete documentation index at: https://thrackle.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# getPolicy

> **getPolicy**(`config`, `rulesEnginePolicyContract`, `rulesEngineRulesContract`, `rulesEngineComponentContract`, `rulesEngineForeignCallContract`, `policyId`): `Promise`\<`string`>

Retrieves the full policy, including rules, trackers, and foreign calls, as a JSON string.

## Parameters

| Parameter                                | Type                                  | Description                                                                |
| ---------------------------------------- | ------------------------------------- | -------------------------------------------------------------------------- |
| `config`                                 | `Config`                              | The configuration object containing network and wallet information.        |
| `rulesEnginePolicyContract`              | `object`                              | The contract instance for interacting with the Rules Engine Policy.        |
| `rulesEnginePolicyContract.abi`          | (`object` \| `object`)\[]             | -                                                                          |
| `rulesEnginePolicyContract.address`      | \`0x\$\{string}\`                     | -                                                                          |
| `rulesEngineRulesContract`               | `object`                              | The contract instance for interacting with the Rules Engine Rules.         |
| `rulesEngineRulesContract.abi`           | (`object` \| `object` \| `object`)\[] | -                                                                          |
| `rulesEngineRulesContract.address`       | \`0x\$\{string}\`                     | -                                                                          |
| `rulesEngineComponentContract`           | `object`                              | The contract instance for interacting with the Rules Engine Component.     |
| `rulesEngineComponentContract.abi`       | (`object` \| `object` \| `object`)\[] | -                                                                          |
| `rulesEngineComponentContract.address`   | \`0x\$\{string}\`                     | -                                                                          |
| `rulesEngineForeignCallContract`         | `object`                              | The contract instance for interacting with the Rules Engine Foreign Calls. |
| `rulesEngineForeignCallContract.abi`     | (`object` \| `object` \| `object`)\[] | -                                                                          |
| `rulesEngineForeignCallContract.address` | \`0x\$\{string}\`                     | -                                                                          |
| `policyId`                               | `number`                              | The ID of the policy to retrieve.                                          |

## Returns

`Promise`\<`string`>

A JSON string representing the full policy.

## Defined in

[src/modules/policy.ts:447](https://github.com/forte-service-company-ltd/forte-rules-engine-sdk/blob/5aad4d7c3c8cc91280e4449c17ac8ea31219fbed/src/modules/policy.ts#L447)
