Developer

Image Description
Incubalabs Technologies Inc

Customer Conversion Prediction Image Description

Details

The idea of this API is to predict user conversion given preliminary parameters. A decision tree model is used and finally some result predictions are made. 
  • Image Description
    Verified

Use Cases

This API can be used to predict a user's conversion, taking into account several user characteristics

0 Comments


Endpoints (2)

Title:
Endpoint #1 Model Details

Description:
Details about the score and other metrics

Base URL:
https://www.dataendpoint.co/machine-learning-apis/customer-conversion-prediction/get-api
Requests:
# GET /current-details/<token>
Token:
every API have unique token. You'll get one once you activate the endpoint

Example responses
Press button to test this endpoint response

 


Code Examples:

const axios = require('axios');
axios({
"method": "GET",
"url": https://www.dataendpoint.co/machine-learning-apis/customer-conversion-prediction/get-api/current-details/<token>
"headers": {
"content-type": "application/json"
}
}).then((response) => {
// handle sucess
console.log(response)
}).catch((error) => {
// handle error
console.log(error)
})
import requests
url = https://www.dataendpoint.co/machine-learning-apis/customer-conversion-prediction/get-api/current-details/<token>
headers = {
"content-type": "application/json"
}
response = requests.request("GET", url, headers=headers)
print (response.text)
require 'httparty'
url = https://www.dataendpoint.co/machine-learning-apis/customer-conversion-prediction/get-api/current-details/<token>
response = HTTParty.get(url,
headers: { "Content-Type" => "application/json" })
puts response.parsed_response
<?php
$curl = curl_init();
$url = https://www.dataendpoint.co/machine-learning-apis/customer-conversion-prediction/get-api/current-details/<token>
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Expected Response


Title:
Endpoint #2 Predict Conversion

Description:
Endpoint to predict customers' conversion

Base URL:
https://www.dataendpoint.co/machine-learning-apis/customer-conversion-prediction/post-api
Requests:
# POST /predict/<token>
Token:
every API have unique token. You'll get one once you activate the endpoint

Body params:

Body param name Body param type Example Requirement Params Has Constraint Params Constraint Value Description
age NUMBER 62 [Required] [no constraint]
balance NUMBER 3000 [Required] [no constraint]
campaign BOOLEAN true [Required] [no constraint]
previous BOOLEAN true [Required] [no constraint]
housing BOOLEAN true [Required] [no constraint]
job_admin. BOOLEAN false [Required] [no constraint]
job_blue-collar BOOLEAN false [Required] [no constraint]
job_housemaid BOOLEAN false [Required] [no constraint]
job_management BOOLEAN false [Required] [no constraint]
job_retired BOOLEAN false [Required] [no constraint]
job_self-employed BOOLEAN true [Required] [no constraint]
job_services BOOLEAN false [Required] [no constraint]
job_student BOOLEAN false [Required] [no constraint]
job_technician BOOLEAN false [Required] [no constraint]
job_unemployed BOOLEAN false [Required] [no constraint]
job_unknown BOOLEAN false [Required] [no constraint]
marital_divorced BOOLEAN true [Required] [no constraint]
marital_married BOOLEAN false [Required] [no constraint]
marital_single BOOLEAN false [Required] [no constraint]
job_entrepreneur BOOLEAN false [Required] [no constraint]


Code Examples:

const axios = require('axios');
axios({
"method": "POST",
"url": https://www.dataendpoint.co/machine-learning-apis/customer-conversion-prediction/post-api/predict/<token>
"data": { "age": 62 , "balance": 3000 , "campaign": true , "previous": true , "housing": true , "job_admin.": false , "job_blue-collar": false , "job_housemaid": false , "job_management": false , "job_retired": false , "job_self-employed": true , "job_services": false , "job_student": false , "job_technician": false , "job_unemployed": false , "job_unknown": false , "marital_divorced": true , "marital_married": false , "marital_single": false , "job_entrepreneur": false }
"headers": {
"content-type": "application/json"
}
}).then((response) => {
// handle sucess
console.log(response)
}).catch((error) => {
// handle error
console.log(error)
})
import requests
url = https://www.dataendpoint.co/machine-learning-apis/customer-conversion-prediction/post-api/predict/<token>
data = { "age": 62 , "balance": 3000 , "campaign": true , "previous": true , "housing": true , "job_admin.": false , "job_blue-collar": false , "job_housemaid": false , "job_management": false , "job_retired": false , "job_self-employed": true , "job_services": false , "job_student": false , "job_technician": false , "job_unemployed": false , "job_unknown": false , "marital_divorced": true , "marital_married": false , "marital_single": false , "job_entrepreneur": false }
headers = {
"content-type": "application/json"
}
response = requests.request("POST", url, data=data, headers=headers)
print (response.text)
require 'httparty'
url = https://www.dataendpoint.co/machine-learning-apis/customer-conversion-prediction/post-api/predict/<token>
data = { "age" => 62 , "balance" => 3000 , "campaign" => true , "previous" => true , "housing" => true , "job_admin." => false , "job_blue-collar" => false , "job_housemaid" => false , "job_management" => false , "job_retired" => false , "job_self-employed" => true , "job_services" => false , "job_student" => false , "job_technician" => false , "job_unemployed" => false , "job_unknown" => false , "marital_divorced" => true , "marital_married" => false , "marital_single" => false , "job_entrepreneur" => false }
response = HTTParty.post(url,
body: data.to_json,
headers: { "Content-Type" => "application/json" })
puts response.parsed_response
<?php
$curl = curl_init();
$url = https://www.dataendpoint.co/machine-learning-apis/customer-conversion-prediction/post-api/predict/<token>
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "
{ "age": 62 , "balance": 3000 , "campaign": true , "previous": true , "housing": true , "job_admin.": false , "job_blue-collar": false , "job_housemaid": false , "job_management": false , "job_retired": false , "job_self-employed": true , "job_services": false , "job_student": false , "job_technician": false , "job_unemployed": false , "job_unknown": false , "marital_divorced": true , "marital_married": false , "marital_single": false , "job_entrepreneur": false }
",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Example responses
Enter next parameters to test endpoint response

Enter parameters

 

Expected Response


Related Fintech APIs

View More