---
schema_version: "1"
id: c7be82035d860e8956b9de463b6c431c7cac784205e1d2e24cf81931ecf6e0f6
title: Cost Calculation
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/connect_responses_cost_calculation_output.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/connect_responses_cost_calculation_output.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: b3e0531423d115c85ba53369ee8eda33d4bad6c43e120a1f78fade90377b5ef5
description: Output representation details of the cost calculation.
---
# Cost Calculation

Output representation details of the cost calculation.

## JSON Example

Here's a sample success response.

{
  "isSuccess":true,
  "errors":\[\],
  "policy": {
    "id": "p111",
    "premiumAmountWithFrequency": {
      "Annually": "xxx.xx",
      "Monthly": "xxx.xxx",
      "Quarterly": "xx.xxx"
    },
    "premiumEqvAmountWithFrequency": {
      "Annually": "xx.xx",
      "Monthly": "xx.xx",
      "Quarterly": "xxx.xxx"
    },
    "feeAmountWithFrequency": {
      "Annually": "xx.xx",
      "Monthly": "xx.xx",
      "Quarterly": "xxx.xxx"
    },
    "coverages": \[
      {
        "id": "pc111",
        "premiumAmountWithFrequency": {
          "Annually": "xxx.xx",
          "Monthly": "xxx.xxx",
          "Quarterly": "xx.xxx"
        },
        "premiumEqvAmountWithFrequency": {
          "Annually": "xx.xx",
          "Monthly": "xx.xx",
          "Quarterly": "xxx.xxx"
        },
        "feeAmountWithFrequency": {
          "Annually": "xx.xx",
          "Monthly": "xx.xx",
          "Quarterly": "xxx.xxx"
        },
        "ratePlans": \[
          {
            "id": "rp11",
            "totalPremiumAmount": 350,
            "totalFeeAmount": "xyz",
            "totalPremiumEqvAmount": "xyz",
            "ratePlanLineItems": \[
              {
                "id": "rpli111",
                "premiumAmount": 100
              },
              {
                "id": "rpli112",
                "premiumAmount": 150
              }
            \]
          },
          {
            "id": "rp12",
            "totalPremiumAmount": 580,
            "ratePlanLineItems": \[
              {
                "id": "rpli121",
                "premiumAmount": 80
              },
              {
                "id": "rpli122",
                "premiumAmount": 200
              },
              {
                "id": "rpli123",
                "premiumAmount": 300
              }
            \]
          }
        \]
      }
    \]
  }
}

This request shows a sample error response.

{
    "isSuccess":true,
    "errors" : \[
        {
            "code":"INVALID\_INPUT",
            "message": "Specify a valid ratePlanId."
        }
    \]
}

| Property Name | Type | Description | Filter Group and Version | Available Version |
| --- | --- | --- | --- | --- |
| errors | [Error Response](https://developer.salesforce.com/docs/atlas.en-us.252.0.chatterapi.meta/chatterapi/connect_responses_error_response.htm "HTML (New Window)") | List of errors encountered during the processing of the API request. | Small, 63.0 | 63.0 |
| isSuccess | Boolean | Indicates whether the API request is successful ( true) or not ( false). | Small, 63.0 | 63.0 |
| policy | Map<String, Object> | Map of policy and cost calculation details from policy to ratePlanLineItems. | Small, 63.0 | 63.0 |