Get Policy Data API
The FTOS_GetPolicyDataAPI
script is called with an object as data and calls the getPolicyData
function from the "policyDataAPIs" server automation script library.
An example of calling this function is given below:
var p = {
policyNo: "80000753",
validityDate: '2021-10-24'
}
ebs.callActionByNameAsync('FTOS_GetPolicyData_API', p)
.then(function(e) {
console.log(e.UIResult);
});
FTOS_GetPolicyData_API
- This endpoint is used to run the FTOS_GetPolicyData_API
server automation script.
Request data parameters:
-
policyNo: policy number (mandatory);
-
validityDate: The request date (optional).
Response:
{
"isSuccess": true,
"errorMessage": null,
"errorCode": null,
"result": {
"PolicyIssuedDate": "2021-10-05",
"PolicyBeginDate": "2021-10-06",
"PolicyEndDate": "2022-10-09",
"Coverages": [
{
"Code": "DPA",
"BeginDate": "2021-10-10",
"EndDate": "2022-10-09",
"AmountInsured": 50000.0,
"PremiumAmount": 96.0,
"Currency": "RON",
"IndemnityLimit": 50000.0,
"WaitingPeriod": 0.0,
"WaitingPeriodType": null,
"Modules": [
{
"Code": "DPA1",
"AmountInsured": 50000.0,
"Currency": "RON",
"Risks": [
{
"Name": "Personal Accident",
"ImplicitReserve": 2000.00,
"ValueLimit": 50000.00,
"Currency": "RON"
}
]
}
]
},
{
"Code": "ICPA",
"BeginDate": "2021-10-10",
"EndDate": "2022-10-09",
"AmountInsured": 25000.0,
"PremiumAmount": 528.0,
"Currency": "RON",
"IndemnityLimit": 25000.0,
"WaitingPeriod": 0.0,
"WaitingPeriodType": null,
"Modules": [
{
"Code": "ICPA1",
"AmountInsured": 25000.0,
"Currency": "RON",
"Risks": [
{
"Name": "Personal Accident",
"ImplicitReserve": 2000.00,
"ValueLimit": 25000.00,
"Currency": "RON"
}
]
}
]
},
{
"Code": "PDA",
"BeginDate": "2021-10-10",
"EndDate": "2022-10-09",
"AmountInsured": 35000.0,
"PremiumAmount": 806.4,
"Currency": "RON",
"IndemnityLimit": 35000.0,
"WaitingPeriod": null,
"WaitingPeriodType": null,
"Modules": [
{
"Code": "PDA1",
"AmountInsured": 35000.0,
"Currency": "RON",
"Risks": [
{
"Name": "Personal Accident",
"ImplicitReserve": 2000.00,
"ValueLimit": 35000.00,
"Currency": "RON"
}
]
}
]
},
{
"Code": "MEACC",
"BeginDate": "2021-10-10",
"EndDate": "2022-10-09",
"AmountInsured": 20000.0,
"PremiumAmount": 460.8,
"Currency": "RON",
"IndemnityLimit": 20000.0,
"WaitingPeriod": 0.0,
"WaitingPeriodType": null,
"Modules": [
{
"Code": "MEACC1",
"AmountInsured": 20000.0,
"Currency": "RON",
"Risks": [
{
"Name": "Personal Accident",
"ImplicitReserve": 2000.00,
"ValueLimit": 20000.00,
"Currency": "RON"
}
]
}
]
}
],
"BusinessStatus": "Version Closed"
}
}
Response description:
-
isSuccess: Marks if the request was successful or not;
-
Error code: Error code;
-
Error message: Error message;
-
Result: Null or an object returned as response for the API call.
Error messages:
Code |
Text |
Description |
---|---|---|
ERR01.01 |
ERR01.01 - Invalid/missing policy number!
|
There is no policy in the system with the requested number! |
ERR01.02 |
ERR01.02 - Invalid date format! |
The date should have the following format: 'xxxx-xx-xx' or 'xxxx/xx/xx'! |
ERR01.03 |
ERR01.03. - Invalid date! |
The policy was not valid at the requested date! |
ERR02.01 |
ERR02.01 - No coverage! |
The policy had no coverages at the requested date! |
ERR03.01 |
ERR03.01 - No modules for coverage! |
This coverage had no modules associated at the requested date! |
ERR04.01 |
ERR04.01 - No covered risks! |
This module had no covered risks at the requested date! |