Save Group Census Members Data Action

Create or update the group census member records for primary members, update the IDs of the dependent members, and create or update groups census member records for the dependent members.

This action is available in API version 65.0 and later.

Supported REST HTTP Methods 

URI: /services/data/vXX.X/actions/standard/saveGroupCensusMembersData

Where XX.X is the latest API version.

Formats: JSON

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

Inputs 

InputTypeDescription
asyncBulkRequestItemIdstringID of the async bulk request item to use as reference for creating insurance async bulk record details records.
groupCensusIdstringID of the parent group census record that’s associated with the group census member records.
groupCensusMemberssobjectCollection of group census member records to be save. Maximum limit size is 2000.
operationstringRequired if asyncBulkRequestItemId isn’t specified. Operation to perform on the group census member records. Valid values are Add and Update.
shouldLogErrorsbooleanIndicates whether errors that occur while saving group census member plans must be recorded in a content document ( true ) or not ( false ). The default values is false .

Outputs 

OutputTypeDescription
errorsDataApex-definedCollection of error records for synchronous Add Members and Update Members services. Maximum limit is 2000.
savedGroupCensusMemberssobjectCollection of group census member records that are created or updated during the execution of the action. It contains both primary and dependent members that are successfully processed. Maximum limit is 2000.

Example 

Sample Request

1{
2  "inputs": [
3    {
4      "asyncBulkRequestItemId": "15Uxx0000004CfoEAE",
5      "groupCensusId": "0rfxx0000000005AAA",
6      "groupCensusMembers": [
7        {
8          "Name": "IronMan",
9          "FirstName": "Iron",
10          "Lastname": "Man",
11          "Gender": "Male",
12          "GroupClassId": "0rExx0000000001EAA",
13          "GroupClassName": "Executive",
14          "GroupCensusId": "0rfxx0000000005AAA",
15          "Email": "test1@gtest.com",
16          "AssociationWithPrimaryMbr": "Self",
17          "MemberKey": "c01c21aecc57e259f2faeb9484149c8e"
18        }
19      ]
20    }
21  ]
22}

Sample Response

1{
2  "actionName": "saveGroupCensusMembersData",
3  "savedGroupCensusMembers": [
4    {
5      "attributes": {
6        "type": "GroupCensusMember"
7      },
8      "Email": "test2@gtest.com",
9      "AssociationWithPrimaryMbr": "Spouse",
10      "FirstName": "Pepper",
11      "MemberKey": "ad8b415683d7e6b6cc8d5a975c8cf75b",
12      "Lastname": "Potts",
13      "Gender": "Female",
14      "GroupCensusId": "0rfxx0000000005AAA",
15      "Name": "PepperPotts"
16    }
17  ]
18}