---
schema_version: "1"
id: 3f9b321400c311f70cb9fe308f2e08baad16f4da1d0f072faf4448a9505339e0
title: Generate Group Census From Insurance Contract Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/actions_obj_generate_census.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/actions_obj_generate_census.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5d6fc26118c3b1a24f09b888bdc1931b169c5ae2a98e457f391ebabb70fef218
description: Asynchronously generate a group census containing member and plan configuration from the active insurance policies associated with an insurance contract.
---
# Generate Group Census From Insurance Contract Action

Asynchronously generate a group census containing member and plan configuration from the active insurance policies associated with an insurance contract.

This action is available in API version 68.0 and later.

## Supported REST HTTP Methods

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

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 |
| --- | --- | --- |
| contractId | string | Required. ID of the insurance contract whose details to use to generate group census. |
| insGenerateCensusInputRep | Apex-defined | Required. An Apex ConnectApi.InsuranceGenerateCensusInputRepresentation record that contains the policy details to generate the group census. |

## Outputs

| Output | Type | Description |
| --- | --- | --- |
| insGenerateCensusRep | Apex-defined | An Apex ConnectApi.InsuranceGenerateCensusRepresentation record that contains the request ID for the asynchronous process and the ID of the group census record that’s created. |

## Example

**POST**

This sample request is for the Generate Group Census From Insurance Contract action.

{
  "inputs": \[
    {
      "contractId": "800xx0000004C92AAE",
      "insGenerateCensusInputRep": {
        "censusName": "Acme Enrollment Census 2026",
        "censusType": "Enrollment",
        "policyEffectiveDate": "2026-01-01",
        "shouldGenerateCsv": true,
        "shouldIncludeMemberPlans": true,
        "filter": {
          "contractGroupPlanIds": \[
            "0gpxx0000000001AAA"
          \],
          "objectName": "Contact",
          "recordIds": \[
            "003xx000004WhKhAAK"
          \]
        }
      }
    }
  \]
}

This sample response is for the Generate Group Census From Insurance Contract action.

\[
  {
    "actionName": "generateCensus",
    "errors": null,
    "invocationId": null,
    "isSuccess": true,
    "outcome": null,
    "outputValues": {
      "insGenerateCensusRep": {
        "message": "Census generation started successfully",
        "groupCensusId": "0rfxx0000004C92AAA",
        "requestId": "08Pxx0000000001EAA"
      }
    },
    "sortOrder": -1,
    "version": 1
  }
\]