Register User as Lender API
Product Overview
This API can be used to register a user as a Lender on Faircent platform. This API requires user's credentials to be passed as request parameters. The API returns a success or a failure response. A success response gets the user registered as a Lender on Faircent platform.
This is a secure API which requires username and password for it's usage.
Request Parameters
PARAMETER KEYS | KEYS DESCRIPTION | KEYS DATA TYPE | ACCEPTED VALUES/FORMAT FOR PARAMETER KEYS |
---|---|---|---|
first_name | First name of user | Varchar | Only Alphabets |
last_name (optional) | Last name of user | Varchar | Only Alphabets |
dob (optional) | Date of birth of user | Date | DD-MM-YYYY or YYYY-MM-DD or MM-DD-YYYY |
gender (optional) | Gender of user | Varchar | ‘M’,'F' ('M'=Male, ’F’=Female) |
father_name (optional) | Father Name of user | Varchar | Only Alphabets |
pan (optional) | PAN number of user | Varchar | ABCD1111Z |
mobile | 10 digit mobile number of user | Integer | 9999999999 |
pin (optional) | Pin code of user | Integer | 111111 |
state (optional) | State of user | Varchar | Only Alphabets |
city (optional) | City of user | Varchar | Only Alphabets |
address (optional) | Complete address of user | Varchar | AlphaNumeric with special characters |
amount (optional) | Amount user wants to Invest | Integer | Numeric |
Email address of user | Varchar | abc@xyz.xxx | |
user | Username (Authentication query parameter) | Varchar | xxxuser |
password | Password (Authentication query parameter) | Varchar | xxxpassword |
Response Schema
The response output returns 3 keys viz., status, error/response, response_id whose significance is explained here:
Response Keys | Response Values |
---|---|
status | Status value can be SUCCESS/FAILED. |
response | When status is SUCCESS, a key named response is returned in the output with value same as status i.e. SUCCESS. No error key is returned in this case. |
error | When status is FAILED, an error key is returned in the output with value from the below specified error messages. No response key is returned in this case. |
response_id | It is an integer which increases by +1 every time a response is received from the API. |
Error Messages
This API returns an error parameter in the response, against which any value from the following can be returned, with a status code of 200 OK.
Error Message |
---|
First Name is invalid |
Email format is invalid |
Email Id already exist |
Pan Number is invalid |
Pan Number is already linked to another account |
Mobile Number is invalid |
Authentication Error (Invalid Username or Password) |
Responses
200 OK
A success response sample code looks like the following.
{
"status":"SUCCESS",
"response":"Success",
"response_id":"29083"
}
A failed response sample code looks like the following.
1.
{
"status":"FAILED",
"error":"First Name is invalid",
"response_id":"29084"
}
2.
{
"status":"FAILED",
"error":"Email Id already exist",
"response_id":"29085"
}
The significance of each field in the above response sample codes can be found in the Response Schema given for this API.
404 NOT FOUND
API Documentation
Request Sample
cURL
curl -X POST 'http://xxxxxx/lender_registration_api' -H 'Access-Control-Allow-Origin: *'
Response Sample
200 OK{
"status":"SUCCESS",
"response":"Success",
"response_id":"29104"
}
or
{
"status":"FAILED",
"error":"Email Id already exist",
"response_id":"29105"
}
Code Snippet
<?php
$data = array("first_name"=>"first name","last_name"=>"last name","dob"=>"date of birth","pan"=>"PAN number","mobile"=>"mobile number","pin"=>"pin code","state"=>"state","city"=>"city","address"=>"full address","amount"=>"amount to invest","email"=>"email address","gender"=>"gender","father_name"=>"father name","user"=>"username","password"=>"password");
$data = json_encode($data);
$ch = curl_init('http://xxxxxx/lender_registration_api');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array
(
'Content-Type: application/json',
'Content-Length: ' . strlen($data))
);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
Register User as Borrower & Check Eligibility API
Product Overview
This API can be used to register a Borrower and check his eligibility status to get a loan on Faircent platform. This API requires borrower's credentials to be passed as request parameters. The response informs whether the borrower is eligible to get loan on Faircent platform or not.
This is a secure API which requires username and password for it's usage.
Request Parameters
Parameter Keys | Keys Description | Keys Data Type | Accepted Values/Format for parameter keys |
---|---|---|---|
first_name | First name of borrower | Varchar | Only Alphabets |
last_name | Last name of borrower | Varchar | Only Alphabets |
dob | Date of birth of borrower | Date | DD-MM-YYYY or YYYY-MM-DD or MM-DD-YYYY (Must be >= 21 years old) |
pan | PAN number of borrower | Varchar | ABCDE1234Z |
mobile | 10 digit mobile number of borrower | Integer | 9999999999 |
pin | Pin code of borrower | Integer | 111111 |
state (optional) | State of borrower | Varchar | Only Alphabets |
city (optional) | City of borrower | Varchar | Only Alphabets |
address (optional) | Complete address of borrower | Varchar | AlphaNumeric with special characters |
loan_purpose (optional) | Loan Purpose of borrower | Varchar | Only Alphabets |
loan_amount (optional) | Loan Amount required by borrower | Integer | Numeric |
Email address of borrower | Varchar | abc@xyz.xxx | |
user | Username (Authentication query parameter) | Varchar | xxxuser |
password | Password (Authentication query parameter) | Varchar | xxxpassword |
Response Schema
The response output returns 3 keys viz., status, error/response, response_id whose significance is explained here:
Response Keys | Response Values |
---|---|
status | Status value can be SUCCESS/FAILED. |
response | When status is SUCCESS, a key named response is returned in the output. It's value can be Eligible/Not_Eligible/Cibil_Failed. No error key is returned in this case. |
error | When status is FAILED, an error key is returned in the output. It can take any value from the below specified error messages. No response key is returned in this case. |
response_id | It is an integer which increases by +1 for every response received from the API. |
Error Messages
This API returns an error parameter in the response, against which any value from the following can be returned, with a status code of 200 OK.
Error Message |
---|
First Name is invalid |
Last Name is invalid |
Date of birth is invalid |
You must be at least 21 years old. |
Email format is invalid |
Email Id already exist |
Pan Number is invalid |
Pan Number is already linked to another account |
Mobile Number is invalid |
Pincode is invalid |
Source invalid |
Responses
200 OK
A success response sample looks like the following.
1.
{
"status":"SUCCESS",
"response":"Eligible",
"response_id":"29091"
}
2.
{
"status":"SUCCESS",
"response":"Cibil_Failed",
"response_id":"29092"
}
3.
{
"status":"SUCCESS",
"response":"Not_Eligible",
"response_id":"29093"
}
A failed response sample looks like the following.
1.
{
"status":"FAILED",
"error":"First Name is invalid",
"response_id":"29094"
}
2.
{
"status":"FAILED",
"error":"You must be at least 21 years old.",
"response_id":"29095"
}
The significance of each field in the above response sample codes can be found in the Response Schema given for this API.
404 NOT FOUND
API Documentation
Request Sample
cURL
curl -X POST 'http://xxxxxx/borrower_registration_api' -H 'Access-Control-Allow-Origin: *'
Response Sample
200 OK{
"status":"SUCCESS",
"response":"Eligible",
"response_id":"29081"
}
or
{
"status":"SUCCESS",
"response":"Cibil_Failed",
"response_id":"29083"
}
Code Snippet
<?php
$data = array("first_name" => "first name", "last_name" => "last name", "dob" => "date of birth","pan"=>"Pan number","mobile"=>"mobile number","pin"=>"pin code","state"=>"state","city"=>"city","address"=>"full address","loan_purpose"=>"loan purpose","loan_amount"=>"loan amount","email"=>"email address","user"=>"username","password"=>"password");
$data_string = json_encode($data);
$ch = curl_init('http://xxxxxx/borrower_registration_api');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array
(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
List of Live Borrowers API
Product Overview
This API can be used to retrieve the listing of existing live borrowers on Faircent platform. Live borrowers on Faircent platform are the loan seekers whose documents and details have been validated by Faircent. These borrowers have been found eligible to get funded by lenders.
This is a secure API which requires username and password for it's usage.
Request Parameters
Parameter Keys | Keys Description | Keys Data Type | Accepted Values/Format for parameter keys |
---|---|---|---|
page | It is the pagination number that shows records of the specified page. | Integer | Numeric |
limit | This specifies the limit of records to be returned per page. | Integer | Numeric |
user | Username (Authentication query parameter) | Varchar | xxxuser |
password | Password (Authentication query parameter) | Varchar | xxxpassword |
Response Schema
The response output returns 6 keys viz., status, totalresult, result, per_page, page and message. The significance of each one of these is explained below.
Response Keys | Response Values |
---|---|
status | Status value can be SUCCESS/FAILED. |
totalresult | Returns the total number of records found. |
result | Returns the detail of live borrowers. |
per_page | This is same as the limit passed as the request parameter, which specifies the number of records to be returned per page. |
page | This is same as the page (pagination number) passed as the request parameter, which returns the records of the specified page number. |
message | It can take any value from the below specified messages. |
Messages
This API returns a message parameter in the response, against which any value from the following can be returned, with a status code of 200 OK.
Message |
---|
Following Result Found |
Page and limit argument should be numeric |
Source invalid |
Responses
200 OK
A success response sample looks like the following.
{
"status": "SUCCESS",
"totalresult": 2176,
"result": [
{
"rating": 0,
"lid": "1000290962",
"image_link": "http://xxxxxx/
sites/all/themes/media-responsive-theme/images/
user-img.jpg",
"name": "Ranvijay Singh",
"uid": "322707",
"loan_state": "1000",
"total_loan_requirement": "30_K",
"remaing_amount": "30_K",
"max_irate_approved": "20.00",
"min_irate_approved": "20.00",
"laon_type": "Family Event",
"laon_type_cnd": "1368",
"risk-message": "Medium",
"risk-class": "mdrisk",
"funded": 0,
"tenure": "15",
"city": "Muzaffarpur",
"min-rate": "12.00",
"max-rate": "20.00",
"time-to-go": 0,
"cibil_score": "701-750",
"cibil_text": "Good",
"view_status": "0",
"book_makrked": "0",
"disable_button": 1,
"pool": false
}
],
"per_page": "1",
"page": 1,
"message": "Following Result Found"
}
A failed response sample looks like the following.
1.
{
"message":"Source invalid",
"status":"FAILED"
}
2.
{
"message":"Page and limit argument should be numeric",
"status":"FAILED"
}
The significance of each field in the above response sample codes can be found in the Response Schema given above for this API.
404 NOT FOUND
API Documentation
Request Sample
cURL
curl -X POST 'http://xxxxxx/borrower_listing_api' -H 'Access-Control-Allow-Origin: *'
Response Sample
200 OKCode Snippet
<?php
$data = array("page"=>pagination number,"limit"=>limit of records per page,"user"=>username,"password"=>password);
$data_string = json_encode($data);
$ch = curl_init('http://xxxxxx/borrower_listing_api');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array
(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>