Loading
Important Advisory: iOS Update Impacting CG Mobile ApplicationRead More
Insurance
InsGroupClassService:getGroupClassesByContract

InsGroupClassService:getGroupClassesByContract

​Use this service to get a list of eligible plans with the contractId that’s provided as input, and a list of eligible plans for the GroupclassId that’s provided as input.​

Class: InsGroupClassService

Method: getGroupClassesByAccount

How It Works

  1. The service takes contractId and groupClassId as input.

    Note
    Note It is mandatory to provide contractId, but groupClassId is optional.
  2. It then validates the input data to verify that the provided contractId and groupClassId are valid.

  3. If only contractId is provided, the service retrieves all eligible plans with coverages and all valid group classes along with eligible plans for each valid group class.

  4. If groupClassId is also provided along with contractId, the service retrieves all the eligible plans for the provided groupClassId.

Input Options

Input Description
contractId Id of the contract group plan
groupClassId Id of the group class

Input JSON

Here's the sample input JSON when only contractId is provided as input:

{    

      "contractId":"001B000001UGEaRIAX"

}

Output JSON

Here's the sample output JSON when only contractId is provided as input:

{

"accountId": "800RN000000jc0JYAQ",
"eligiblePlans":

[
                             {
                                 "Id":"0rgRN000000030fYTT",
                                 "Name":"Vision Standard",
                                 "Type":"Vision",
                                 "childPlans":[
                                                            {
                                                                "value": "0rgDC000000000RYAQ",
                                                                "IsOptional": false,
                                                                "name": "MandatoryCoverage"
                                                            }
                                                      ]
                           },
                           {
                              "Id":"0rgRN000000030fYTS",
                              "Name":"Medical Standard",
                              "Type":"Medical",
                              "childPlans":[
                                                        {
                                                             "value": "0rgDC000000000RYAR",
                                                             "IsOptional": false,
                                                             "name": "MandatoryCoverage"
                                                        },
                                                        {
                                                             "value": "0rgDC000000000RYAT",
                                                             "IsOptional": true,
                                                             "name": "OptionalCoverage"
                                                        }
                                                  ]
                         }
 ],
"groupClasses":

[         

        {

                    "Id":"0rERN000000004Y2PN",
                    "Name":"Employees",
                     "Code":"Employees"

        },

         {


"Id":"0rERN000000004Y2AQ",
"Name":"Executives",
"Code":"Executives",
"eligiblePlans":

 [

{
      "Id":"0rgRN000000030fYAA",
      "Name":"Dental Premium",
      "Type":"Dental",
      "childPlans":

       [

{
     "value": "0rgDC000000000RYAR",
     "IsOptional": false,
     "name": "MandatoryCoverage"
},
{
     "value": "0rgDC000000000RYAT",
     "IsOptional": true,
     "name": "OptionalCoverage"
}

     ]
}

 ] //eligible plans node

  }

] // groupclasses node

}

Input JSON

Here's the sample input JSON when both contractId and groupClassId are provided as input:

{
    "contractId":"001B000001UGEaRIAX",
    "groupClassId":"0rERN000000004Y2AQ"
}

Output JSON

Here's the sample output JSON when both contractId and groupClassIdare provided as input:

{
          "accountId": "800RN000000jc0JYAQ",
          "eligiblePlans":[
                                           {

"Id":"0rgRN000000030fYTT",
"Name":"Vision Standard",
"Type":"Vision",
"childPlans":

   [

{
"value": "0rgDC000000000RYAQ",
"IsOptional": false,
"name": "MandatoryCoverage"
}

   ]

 },
{


"Id":"0rgRN000000030fYTS",
"Name":"Medical Standard",
"Type":"Medical",
"childPlans":[


{
"value": "0rgDC000000000RYAR",
"IsOptional": false,
"name": "MandatoryCoverage"
},
{
"value": "0rgDC000000000RYAT",
"IsOptional": true,
"name": "OptionalCoverage"
}

 ]

 }

], // eligible plans node

       "groupClasses":[

{

"Id":"0rERN000000004Y2AQ",
"Name":"Executives",
"Code":"Executives",
"eligiblePlans":[


{
"Id":"0rgRN000000030fYAA",
"Name":"Dental Premium",
"Type":"Dental",
"childPlans":[
{
"value": "0rgDC000000000RYAR",
"IsOptional": false,
"name": "MandatoryCoverage"
},
{
"value": "0rgDC000000000RYAT",
"IsOptional": true,
"name": "OptionalCoverage"
}

                         ]

}

]

}

Output JSON

Here's the sample output JSON with errors:

{
   "errors" : [
                        {
                              "error":"Specify a valid ContractID",
                             "contractId":"001B000001UGEaRIAX"
                        }
   ]
}
 
Loading
Salesforce Help | Article