---
schema_version: "1"
id: 5a7f6388766bd50f85f4d81d4755f91d11926397824af2042e98b6bd2a07e7d9
title: Get Census Price Comparison Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/actions_obj_get_census_price_comparison.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/actions_obj_get_census_price_comparison.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5b335d8d0e66fbd1eb5a6e2ed82d8f359e976a2a1f8e51c7dc4b9aeb41c36f79
description: Calculate price comparison impacts for group census members based on their plan enrollments. This action calculates the financial comparison of changes to a group census by comparing the previous and current costs across plans, group classes, members, and coverages, returning a breakdown of total cost, premium, tax, and fees to help evaluate the comparison of proposed changes.
---
# Get Census Price Comparison Action

Calculate price comparison impacts for group census members based on their plan enrollments. This action calculates the financial comparison of changes to a group census by comparing the previous and current costs across plans, group classes, members, and coverages, returning a breakdown of total cost, premium, tax, and fees to help evaluate the comparison of proposed changes.

This action is available in API version 68.0 and later.

## Supported REST HTTP Methods

**URI**: /services/data/vXX.X/actions/standard/getCensusPriceComparison

Where XX.X is the latest API version.

**Formats**: JSON, XML

**HTTP Methods**: POST

**Authentication**: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

## Inputs

| Input | Type | Description |
| --- | --- | --- |
| censusId | string | Required. ID of the group census record to calculate price comparisons for. |
| insurancePriceComparisonInput | Apex-defined | An Apex ConnectApi.InsurancePriceComparisonInputRepresentation record that contains the optional filters, such as member IDs, category, and fetch attribute flag to calculate price comparisons. |

## Outputs

| Output | Type | Description |
| --- | --- | --- |
| priceComparisonOutput | Apex-defined | An Apex ConnectApi.RateComparisonOutputRepresentation record that contains the hierarchical price comparison results. |

## Example

**POST**

This sample request is for the Get Census Price Comparison action.

{
  "inputs": \[
    {
      "censusId": "0rfxx000000001aEAA",
      "insurancePriceComparisonInput": {
        "category": "0ZGIO0000000gAX4AY",
        "fetchAttributes": false,
        "memberIds": {
          "values": \[
            "0rgxx000000001aEAA",
            "0rgxx000000002bEAA"
          \]
        }
      }
    }
  \]
}

This sample response is for the Get Census Price Comparison action.

\[
  {
    "actionName": "getCensusPriceComparison",
    "errors": null,
    "invocationId": null,
    "isSuccess": true,
    "outcome": null,
    "outputValues": {
      "priceComparisonOutput": {
        "categories": {
          "dental": "Dental",
          "vision": "Vision"
        },
        "comparisons": \[
          {
            "category": null,
            "current": {
              "attributes": \[\],
              "fee": 400,
              "id": "0rHxx000000001aEAA",
              "premium": 2000,
              "tax": 180,
              "total": 2580
            },
            "durationKey": "dur1",
            "id": "identifier1",
            "name": null,
            "node": "summary",
            "parent": null,
            "previous": {
              "attributes": \[\],
              "fee": 200,
              "id": "0rHxx000000002bEAA",
              "premium": 1800,
              "tax": 180,
              "total": 2180
            }
          }
        \],
        "currencyInfo": {
          "locale": "en\_US",
          "name": "USD",
          "symbol": "$"
        },
        "durations": \[
          {
            "effectiveFrom": "2026-01-01",
            "effectiveTo": "2026-12-31",
            "key": "dur1"
          }
        \],
        "errors": \[\],
        "isSuccess": true,
        "summary": {
          "endorse": 10,
          "enrollment": 0,
          "hire": 20,
          "terminate": 10
        }
      }
    },
    "sortOrder": -1,
    "version": 1
  }
\]