---
schema_version: "1"
id: f95c16d91bb9f743a574da851070bc9acd445370aebf9b1fb25c00f09d9f8f76
title: Generate Census Information from Policies for Contract (POST)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/connect_resources_generate_census_from_contract.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/connect_resources_generate_census_from_contract.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d59ce0cf8513f8112ce69093409b047b55b2bb7984072c022cbd9e614d18bc54
description: Generate a group census along with member and optional plan configuration from the active policies on an existing group benefits contract. You can optionally filter based on contract group plans, contacts, or person accounts. This API runs asynchronously and returns a request ID that you can use to track the job or retry a failed run.
---
# Generate Census Information from Policies for Contract (POST)

Generate a group census along with member and optional plan configuration from the active policies on an existing group benefits contract. You can optionally filter based on contract group plans, contacts, or person accounts. This API runs asynchronously and returns a request ID that you can use to track the job or retry a failed run.

## Resource

{contractId} is a placeholder.

/connect/insurance/contracts/{contractId}/actions/generate-census

## Resource Example

Replace {yourInstance} with the My Domain name of your Salesforce org.

https://{yourInstance}.salesforce.com/services/data/v68.0/connect/insurance/contracts/800xx0000004C92AAE/actions/generate-census

## Available Version

68.0

## HTTP Methods

POST

## Path Parameter for POST

| Parameter Name | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| contractId | String | ID of the insurance contract whose policies are used to generate the group census. | Required | 68.0 |

## Request Body for POST

### JSON Example

{
  "shouldGenerateCSV": true,
  "shouldIncludeMemberPlans": true,
  "filter": {
    "contractGroupPlanIds": {
      "values": \[
        "0rgVW00000001tlYAA"
      \]
    },
    "objectName": "Contact",
    "recordIds": {
      "values": \[
        "003VW00000BcBIfYAN"
      \]
    }
  }
}

### Properties

| Name | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| censusName | String | Name of the group census to create. | Optional | 68.0 |
| censusType | String | Type of group census to generate, such as Enrollment or Quote. | Required | 68.0 |
| filter | [Insurance Census Filter Input](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/connect_requests_insurance_census_filter_input.htm "Input representation of the filter criteria that select which policy records to include when generating a group census from a contract.") | Filter criteria that indicate which policy records to include when generating the group census. You can filter by root contract group plan IDs, Person Accounts, and Contacts. | Optional | 68.0 |
| policyEffectiveDate | String | Date used to determine the policy version for generating the group census, in YYYY-MM-DD format. The specified date must fall between the policy version's effectiveFromDate and effectiveToDate. | Optional | 68.0 |
| requestId | String | ID of the asynchronous request from a previous run. | Required when you regenerate a group census that failed in the previous run. | 68.0 |
| shouldGenerateCSV | Boolean | Indicates whether to create a CSV file with all the census details (true) or not (false). | Optional | 68.0 |
| shouldIncludeMemberPlans | Boolean | Indicates whether to include insurance plan details for each member in the generated group census (true) or not (false). | Optional | 68.0 |

## Response Body for POST

[Insurance Generate Census Response](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/connect_responses_insurance_generate_census.htm "Output representation of the details when you generate a group census from the policies on an existing group benefits contract.")