您位於此處:
InsPolicyService:getInsuredItems
使用此服務尋找並退回保單 (資產) 中的受保項目和受保對象。
您可以在 OmniScript 和「整合程序」中使用此服務來修改和取消原則,以取得目前原則中的受保項目和受保對象。
您可以根據您的選項取得特定投保項目、投保項目的子集或全部投保項目。
方法:getInsuredItems
運作方式
-
使用
assetId或policyId尋找要搜尋的原則 (資產)。 -
尋找與保單相關聯的投保項目物件和/或持有產品關係物件 (投保對象)。如果已指定
productCode和/或instanceKey,則只會尋找具有指定代碼或金鑰的受保項目或受保者。 -
傳回包含受保項目和受保對象屬性和其例項金鑰的 JSON。
遠端選項
選項 |
描述 |
|---|---|
|
必要。 服務將取得投保項目的資產 (保單) 識別碼。 |
|
|
|
|
|
選擇性。 服務只會退回符合此代碼的受保項目或受保對象。 當您想要只能指定特定受保項目或受保對象時,請使用此選項。 |
|
選擇性。 服務只會傳回符合此金鑰的受保項目或受保者。 當您只想要指定一個項目時,請使用此選項。 |
輸出 JSON
服務會傳回 JSON,其中包含依產品代碼的受保對象陣列和受保項目。
在此範例中,僅指定一 assetId 個項目,因此會退回所有投保項目。
{
"error": "OK",
"Step1": {
"AUTO": [{
"VehicleType": "PASSENGER CAR",
"isPrimary": true,
"isParent": true,
"autoInstanceKey": "2015 Lexus LX250",
"est_annual_mileage": "1-10000",
"BodyClass": "Sedan/Saloon",
"autoYear": 2015,
"autoModel": "LX250",
"autoLicNum": "Lexus",
"autoAntiTheft": false
},
{
"VehicleType": "MULTIPURPOSE PASSENGER VEHICLE (MPV)",
"isPrimary": true,
"isParent": true,
"autoInstanceKey": "2006 Honda Odyssey",
"est_annual_mileage": "1-10000",
"BodyClass": "Minivan",
"autoYear": 2006,
"autoModel": "Odyssey",
"autoLicNum": "Honda",
"autoAntiTheft": false
},
{
"VehicleType": "PASSENGER CAR",
"isPrimary": true,
"isParent": true,
"autoInstanceKey": "2018 530 BMW",
"est_annual_mileage": "1-10000",
"BodyClass": "Sedan/Saloon",
"autoYear": 2018,
"autoModel": "BMW",
"autoLicNum": "530",
"autoAntiTheft": false
},
{
"VehicleType": "PASSENGER CAR",
"isPrimary": true,
"isParent": true,
"autoInstanceKey": "2016 Camry Toyota",
"est_annual_mileage": "1-10000",
"BodyClass": "Sedan/Saloon",
"autoYear": 2016,
"autoModel": "Toyota",
"autoLicNum": "Camry",
"autoAntiTheft": false
}
],
"DRIVER": [{
"LN": "Smith",
"LastName": "Smith",
"isPrimary": false,
"isParent": false,
"driverInstanceKey": "Joan Smith",
"GENDER": "Female",
"FN": "Joan",
"FirstName": "Joan",
"AGE": 20
},
{
"LN": "Smith",
"LastName": "Smith",
"isPrimary": false,
"isParent": false,
"driverInstanceKey": "John Smith",
"GENDER": "Male",
"FN": "John",
"FirstName": "John",
"AGE": 30
},
{
"LN": "Henderson",
"LastName": "Henderson",
"isPrimary": false,
"isParent": false,
"driverInstanceKey": "Robert Henderson",
"GENDER": "Male",
"FN": "Robert",
"FirstName": "Robert",
"AGE": 30
},
{
"LN": "Schell",
"LastName": "Schell",
"isPrimary": false,
"isParent": false,
"driverInstanceKey": "Kinsey Schell",
"GENDER": "Female",
"FN": "Kinsey",
"FirstName": "Kinsey",
"AGE": 20
}
]
}
}