Recommendation

The recommendation service uses Machine Learning models in order to predict the probability of a person to buy certain insurance products. It’s important that at the end of each recommendation, you evaluate the results in order to help training the models and improving his predictions.

Product Recommendation

POST /v1/recommendations/product-type

Body Parameters

The request has the following parameters in body:

ParameterDescription
inputThe recommendation value inputRequired
input.product_typeThe product typeRequired
input.policy_holder_ageThe policy holder ageRequired
input.policy_holder_childrenThe policy holder children quantityRequired
input.policy_holder_genderThe policy holder genderRequired
input.policy_holder_marital_statusThe policy holder marital statusRequired
input.policy_holder_salaryThe policy holder salary in centsRequired
input.locationThe locationRequired
The product type can be:
TypeName
1Auto
4Home
5Life
12Travel
The policy holder gender can be:
One Of
male, female
The policy holder marital status can be:
One Of
single, married
The location can be:
One Of
south, southeast, midwest, northeast
{
  "input": {
    "product_type": 0,
    "policy_holder_age": 0,
    "policy_holder_children": 0,
    "policy_holder_gender": "string",
    "policy_holder_marital_status": "string",
    "policy_holder_salary": 0,
    "location": "string"
  }
}
Response

The above request returns JSON structured like this:

ParameterDescription
idThe ID of the product recommendation
evaluate_tokenThe token used to evaluate the recommendation
output.percentageThe probability of having wanting to buy products like this
{
  "evaluate_token": "string",
  "output": {
    "percentage": 0.0
  }
}

Evaluate Product Recommendation

POST /v1/recommendations/product-type/{id}/evaluate

URL Parameters
ParameterDescription
idThe ID of product recommendation
tokenThe ID of product recommendationIn Query
Body Parameters

The request has the following parameters in body:

ParameterDescription
evaluationThe evaluation indicating the target for the recommendationRequired
{
  "evaluation": true
}