This is a coding assessment for Genify.ai.
This is a basic API built on top of model generated by this Kaggle notebook
- Clone the repo
- Navigate to 'src' folder
- Run 'python .\run.py'
- The endpoint should be up on http://127.0.0.1:5000
-
The API has a single POST endpoint for recommending banking products to users based on their banking and social information
-
The API POST endpoint only accepts parameters sent in the query URL
-
Each parameter in the parameters list can take one value or multiple values (for multiple input rows), separated by a comma.
-
Endpoint parameters
Parameters | Is required |
---|---|
fecha_dato | Yes |
ncodpers | Yes |
ind_empleado | No |
pais_residencia | No |
ind_empleado | No |
sexo | No |
age | No |
fecha_alta | No |
antiguedad | No |
tiprel_1mes | No |
cod_prov | No |
ind_actividad_cliente | No |
renta | No |
segmento | No |
- Possible responses
Status code | Example Response |
---|---|
201 | {"data": "{"ncodpers": ["15889"], "added_products": ["ind_cco_fin_ult1 ind_cno_fin_ult1 ind_ecue_fin_ult1 ind_nomina_ult1 ind_nom_pens_ult1 ind_recibo_ult1 ind_dela_fin_ult1"]}"} |
400 | {"message": "Error: invalid input format. The following parameters are missing: fecha_dato"} |