You are here:
InsPolicyService:prepareToRenewPolicy
Use this service to calculate the amount required for renewing an existing policy. This service returns renewal premium, taxes, and fees, or the renewal policy JSON without creating a policy.
Method: prepareToRenewPolicy
How it Works
-
The service accepts the
policyIdof the policy to be renewed. -
The service checks for the effective date and expiration date of the renewed policy. If not provided, the service computes these dates using the following logic:
-
Effective date = Expiration date of original policy + 1 day
-
Expiration date = Effective date of new policy + Term of the new policy
-
-
Reprices the policy product using
aggByKeyandincludeInputKeyoptions. -
Uses
getPolicyJsonto determine whether only renewal amount components must return or full policy JSON is sent in the response.
Inputs
Remote Options
Remote Option |
Description |
|---|---|
|
Required
The service sends this option as an input to the calculation procedure, which uses it to complete the calculation with aggregation. For example, an auto insurance policy has multiple drivers attached to each insured vehicle. The insured vehicle has a separate instanceKey for each instance in the policy. The The service uses this option to reprice the policy. |
|
Optional
Set to true to calculates taxes and fees on the renewed policy. |
|
Required A string of comma-separated key-value pairs that the service passes into and out of the calculation procedure. These key-value pairs are included in the output product object within the The service uses this option to reprice the policy. |
|
Optional A boolean flag to determine whether only renewal amount components must return in response or full policy JSON must return. |
|
Determines the rating procedure for repricing the policy. If not provided, pricing is done based on the effective date of the modified policy. Note You can't pass a specific time for ratingField as the field type is Date. So, the rating date timestamp defaults to 12:00 am. |
|
Optional The effective date of the renewed policy. If not provided, the value is computed using the following logic: Expiration date of existing policy + 1 day |
|
Optional The expiration date of the renewed policy. If not provided, the value is set using the following logic: Effective date of new policy + Term of the new policy |
|
Optional The term of the policy. It help calculates |
|
True or False The default value is true. When the value is set as true, the service uses the local timezone in which the policy is created. When the value is set as false, the services uses GMT as the timezone. |
Input JSON
Here's an example of the input JSON:
{
"policyId": "0YT5w000000Y8MNGA0",
"userInputs": [
{
"DRIVER.instanceKey": "Bob Jones",
"DRIVER.LN": "Jones",
"DRIVER.GENDER": "Male",
"DRIVER.FN": "Bobby",
"DRIVER.AGE": 30,
"AUTO.instanceKey": "2018 Audi A3",
"AUTO.autoYear": 2018,
"AUTO.autoModel": "A4",
"perAccident": 500
}
]
} 
