You are here:
InsProductJSONService:getAttributes
Use this service to get the attributes nodes of the ProductJSON.
Method: getAttributes
How It Works
-
The service uses the
inputKeyto identify a standard product JSON with one root product as the input JSON. -
Filters the attributes based on these remote options:
instanceKeyproductCodeattributeCode
-
Returns an attribute node that's filtered according to the settings in
step 2:
-
If
flatten = true, the service returns a map of attributes in the form (attributeCode, attributeDetails). -
If
flatten = false, the service returns a list of attributes in the form (attributeDetails). -
If
flatten = trueandvalueOnly = true, the service returns attributes in the form (attributeCode, userValues).
-
If
Remote Options
Option |
Description |
|---|---|
|
The key the service uses to get the The default value is
|
|
The root product code or any child spec product code. The service extracts attributes directly associated with
the |
|
Returns the attribute that matches the |
|
Extracts attributes directly associated with the product that has
this |
|
Returns attributes as a map in the form of ( |
|
When used with |
Input JSON
This service takes a typical product JSON it identifies using the
instanceKey, with one root product as its input.
To learn how product JSONs are structured, see Product JSON Structure Model.
Output JSON
The output JSON returns an attribute node of the product JSON found using the
inputKey = configureProduct option, looking for attributes with
instanceKey = Jack Kirkland and attributeCode =
lifeCoverageAmt. Because both flatten = true and
valueOnly = true, the service returns the attributes in
attributeCode:userValues format.
{
"Jack Kirkland": {
"InsLife": {
"lifeCoveageAmt": "500000"
}
},
"error": "OK"
}The next example uses the same inputKey as the previous example.
But it has no filters set, so the service returns all attributes under each
productCode and instanceKey.
{
"CFACTCLONED": {
"termLimit": 123
},
"Maria Kirkland": {
"ABR": {
"Limit-Agg": null,
"Limit-PerOcc": "50",
"ATTRIBUTE-074": 1200000
},
"ADDCOV": {
"covBenefit": "2"
},
"WOP": {
"claimWait": "90"
},
"InsLife": {
"lifeCoveageAmt": "500000",
"persSalutation": null,
"persPhone": null,
"persEmail": null,
"persCountry": null,
"persCity": null,
"persState": null,
"persPostalCode": null,
"persStreet": null,
"persAddress": null,
"persGender": "Female",
"persIncome": null,
"persBMI": null,
"persHeight": null,
"persLastName": null,
"persMiddleName": null,
"persFirstName": null,
"persWeight": null,
"persSmoke": "N",
"persName": null,
"persBirthdate": "1970-09-09"
}
},
"Jack Kirkland": {
"ABR": {
"Limit-Agg": null,
"Limit-PerOcc": "50",
"ATTRIBUTE-074": 1200000
},
"ADDCOV": {
"covBenefit": "2"
},
"WOP": {
"claimWait": "90"
},
"InsLife": {
"lifeCoveageAmt": "500000",
"persSalutation": null,
"persPhone": null,
"persEmail": null,
"persCountry": null,
"persCity": null,
"persState": null,
"persPostalCode": null,
"persStreet": null,
"persAddress": null,
"persGender": "Male",
"persIncome": null,
"persBMI": null,
"persHeight": null,
"persLastName": null,
"persMiddleName": null,
"persFirstName": null,
"persWeight": null,
"persSmoke": "N",
"persName": null,
"persBirthdate": "1965-09-09"
}
},
"WL-Base": {
"covType": "10",
"ProductCode": "WL",
"termPayment": "check",
"PART": "Participating",
"termDivMeth": "reinvest",
"payFrequency": "month",
"featCashDividends": true,
"featLevelPremium": true,
"featGuaranteedBenefit": true,
"featPolicyLoan": true,
"featAccumCVLI": true
},
"error": "OK"
}
