๐Loan Request
The Loan Requests API allows you create and manage loan requests on your integration
Last updated
The Loan Requests API allows you create and manage loan requests on your integration
Last updated
create a loan request from your server
POST
https://configure-abierta-test.herokuapp.com/api/v1/loan_request
Creates a new Loan request
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
{
"status": "success",
"message": "success",
"data": {
"id": 172,
"user_id": 103,
"org_id": 62,
"product_id": 92,
"product_name": "Trial",
"product_slug": "trial",
"lender_name": "Spleet Inc",
"reference": "5dnpDwwn3dDwD14i",
"fullname": "Daniel Osineye",
"amount": 2000000,
"purpose": "House Rent",
"terms": {
"approved_amount": 0,
"rate": 0,
"tenure": 0,
"tenured_in": "",
"rate_type": "",
"grace_period": 0,
"exclude_weekends": false,
"zero_interest": false,
"estimated_repayment": 0,
"note": ""
},
"status": "saved",
"active": true,
"lender_status": "saved",
"debit_mandate_next_step": "setup",
"declined_at": "0001-01-01T00:00:00Z",
"final_approval_date": "0001-01-01T00:00:00Z",
"approved_at": "0001-01-01T00:00:00Z",
"user_status": "saved",
"user_accepted_date": "0001-01-01T00:00:00Z",
"user_declined_date": "0001-01-01T00:00:00Z",
"archived_date": "0001-01-01T00:00:00Z",
"unarchived_at": "0001-01-01T00:00:00Z",
"disbursed_at": "0001-01-01T00:00:00Z",
"submitted_at": "0001-01-01T00:00:00Z",
"deleted_at": "0001-01-01T00:00:00Z",
"created_at": "2022-01-11T01:04:46.623484Z",
"updated_at": "0001-01-01T00:00:00Z"
}
}
{
"status": "error",
"message": "Product ID is required"
}
{
"status": "no-access",
"message": "You do not have access to this user, please verify the user-id"
}
This would usually happen when you try to access a user that does not exist in your organization
curl --location --request POST 'http://localhost:6000/api/v1/user/1/loan_request?product-id=1' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 20000,
"purpose": "House Rent"
}'
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:6000/api/v1/user/1/loan_request?product-id=1"
method := "POST"
payload := strings.NewReader(`{
"amount": 20000,
"purpose": "House Rent"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'POST',
'url': 'http://localhost:6000/api/v1/user/1/loan_request?product-id=1',
'headers': {
'Authorization': 'Bearer ',
'Content-Type': 'application/json'
},
body: JSON.stringify({"amount":20000,"purpose":"House Rent"})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Get the details of a loan request created on your integration
GET
https://configure-abierta-test.herokuapp.com/loan_request
Fetches a loan request
{
"status": "success",
"message": "Loan Requests Retrieved Successfully",
"data": {
"loan_requests": [
{
"id": 1,
"user_id": 1,
"org_id": 1,
"product_id": 1,
"product_name": "EC Personal Loan",
"product_slug": "ec-personal-loan",
"lender_name": "Evolve Credit Lending Services",
"reference": "H-sDIdUl9VsfHedM",
"fullname": "Daniel Osineye",
"amount": 1000,
"purpose": "Vibes & Insha Allah",
"terms": {
"approved_amount": 0,
"rate": 2,
"tenure": 2,
"tenured_in": "",
"rate_type": "",
"grace_period": 0,
"exclude_weekends": false,
"zero_interest": false,
"estimated_repayment": 0,
"note": ""
},
"status": "pending",
"active": true,
"progress": "7",
"lender_status": "approved",
"debit_mandate_next_step": "setup",
"offer_letter": "november62022",
"declined_at": "0001-01-01T00:00:00Z",
"final_approval_date": "2021-09-28T20:58:17.614616Z",
"approved_by_id": 1,
"approved_by": "Daniel Osineye",
"approved_at": "2021-09-28T20:58:17.614616Z",
"user_status": "submitted",
"user_accepted_date": "0001-01-01T00:00:00Z",
"user_declined_date": "0001-01-01T00:00:00Z",
"archived_date": "0001-01-01T00:00:00Z",
"unarchived_at": "0001-01-01T00:00:00Z",
"disbursed_at": "0001-01-01T00:00:00Z",
"submitted_at": "2022-02-04T13:48:02.335331Z",
"deleted_at": "0001-01-01T00:00:00Z",
"created_at": "2021-09-21T09:29:44.238127Z",
"updated_at": "2022-02-04T13:48:02.335331Z"
},
{
"id": 2,
"user_id": 1,
"org_id": 1,
"product_id": 1,
"product_name": "EC Personal Loan",
"product_slug": "ec-personal-loan",
"lender_name": "Evolve Credit Lending Services",
"reference": "kVAV3D92af64T6l2",
"fullname": "Daniel Osineye",
"amount": 1000,
"purpose": "Another Vibes & Insha Allah",
"terms": {
"approved_amount": 0,
"rate": 1,
"tenure": 1,
"tenured_in": "",
"rate_type": "",
"grace_period": 0,
"exclude_weekends": false,
"zero_interest": false,
"estimated_repayment": 0,
"note": ""
},
"status": "saved",
"active": true,
"progress": "end",
"lender_status": "approved",
"mono_ids": [
"614a2dfc76d76d67b94e72eb"
],
"mono_tokenized": true,
"debit_mandate_next_step": "setup",
"offer_letter": "november62022",
"declined_at": "0001-01-01T00:00:00Z",
"final_approval_date": "2021-09-21T10:16:50.416199Z",
"approved_by_id": 1,
"approved_by": "Daniel Osineye",
"approved_at": "2021-09-21T10:16:50.416199Z",
"user_status": "submitted",
"user_accepted_date": "0001-01-01T00:00:00Z",
"user_declined_date": "0001-01-01T00:00:00Z",
"disbursed_by": "Daniel Osineye",
"disbursed": true,
"manually_disbursed": true,
"archived_date": "0001-01-01T00:00:00Z",
"unarchived_at": "0001-01-01T00:00:00Z",
"disbursed_at": "2021-09-21T10:20:52.22093Z",
"submitted_at": "2021-09-21T19:09:50.934576Z",
"deleted_at": "0001-01-01T00:00:00Z",
"created_at": "2021-09-21T09:31:28.354668Z",
"updated_at": "2021-11-06T22:13:11.987966Z"
},
{
"id": 13,
"user_id": 6,
"org_id": 1,
"product_id": 1,
"product_name": "EC Personal Loan",
"product_slug": "ec-personal-loan",
"lender_name": "Evolve Credit Lending Services",
"reference": "VhlFgw5k3hhdjN-d",
"fullname": "Collins Ogbuzuru",
"amount": 300000,
"purpose": "to buy a car for uber",
"terms": {
"approved_amount": 0,
"rate": 0,
"tenure": 0,
"tenured_in": "",
"rate_type": "",
"grace_period": 0,
"exclude_weekends": false,
"zero_interest": false,
"estimated_repayment": 0,
"note": ""
},
"status": "saved",
"active": true,
"lender_status": "saved",
"debit_mandate_next_step": "setup",
"declined_at": "0001-01-01T00:00:00Z",
"final_approval_date": "0001-01-01T00:00:00Z",
"approved_at": "0001-01-01T00:00:00Z",
"user_status": "saved",
"user_accepted_date": "0001-01-01T00:00:00Z",
"user_declined_date": "0001-01-01T00:00:00Z",
"archived_date": "0001-01-01T00:00:00Z",
"unarchived_at": "0001-01-01T00:00:00Z",
"disbursed_at": "0001-01-01T00:00:00Z",
"submitted_at": "0001-01-01T00:00:00Z",
"deleted_at": "0001-01-01T00:00:00Z",
"created_at": "2021-09-21T19:27:30.991807Z",
"updated_at": "0001-01-01T00:00:00Z"
}
],
"cursor": 13
}
}
{
"status": "error",
"message": "Direction not specified"
}
Update the information of a loan request
PUT
https://configure-abierta-test.herokuapp.com/api/v1/loan_request/{lrID}
Updates a loan request
{
"purpose":"somethhing else"
}
Delete a loan request from your server
DELETE
https://configure-abierta-test.herokuapp.com/api/v1/loan_request/{lrID}
Deletes Loan Request
POST
https://configure-abierta-test.herokuapp.com/api/v1/loan_request/{ID}/tokenize_mono
{
"status": "error",
"message": "Something went wrong. Please try again_UnblTTknzeMn"
}
POST
https://configure-abierta-test.herokuapp.com/api/v1/loan_request/{ID}/upload
Uploads a Document
{
"status": "success",
"message": "Upload Succesful",
"data": [
{
"id": 578,
"user_id": 1,
"org_id": 1,
"loan_request_id": 1,
"type": "valid-id",
"title": "Valid ID",
"reference": "GrT7RU6tX4OfZR",
"number": "AD34834909",
"document_url": "url-to-document-on-filestack-or-s3",
"has_custom_fields": false,
"custom_fields": null,
"created_at": "2022-02-17T09:15:15.605745Z"
},
{
"id": 579,
"user_id": 1,
"org_id": 1,
"loan_request_id": 1,
"type": "valid-id",
"title": "Valid ID",
"reference": "aUjWqb4ViM30kx",
"number": "AD34834909",
"document_url": "url-to-document-on-filestack-or-s3",
"has_custom_fields": false,
"custom_fields": null,
"created_at": "2022-02-17T09:15:17.155748Z"
}
],
"data1": null
}
GET
https://configure-abierta-test.herokuapp.com/api/v1/loan_request/{ID}/progress
Fetches a loan request progress
{
"status": "success",
"message": "Loan Request Retrieved Successfully",
"data": "7"
}
POST
https://configure-abierta-test.herokuapp.com/loan_request/{ID}/bank_details
Add Business Information
{
"status": "success",
"message": "Successfully added Business Information",
"data": {
"id": 57,
"user_id": 1,
"org_id": 1,
"loan_request_id": 1,
"name": "Fashistry Fashion School",
"role": "Founder/CEO",
"industry": "Fashion & Education",
"description": "We train young people to become fashion experts",
"registered": true,
"registration_number": "AS89349723",
"established_on": "2020-10-01",
"physical_location": true,
"number_of_locations": 4,
"location_status": "owned",
"average_monthly_income": 15000000,
"last_twelve_months_income": 180000000,
"primary_payments_collection_method": "cash",
"number_of_employees": 25,
"monthly_salary_cost": 2000000,
"annual_rent_cost": 200000,
"monthly_electricity_cost": 50000,
"monthly_ads_cost": 1000000,
"monthly_marketing_cost": 800000,
"has_custom_fields": false,
"custom_fields": [
{
"label": "",
"field": "",
"data_type": "",
"string_value": "",
"number_value": 0,
"boolean_value": false,
"is_money": false,
"is_custom": true,
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0001-01-01T00:00:00Z"
},
{
"label": "",
"field": "",
"data_type": "",
"string_value": "",
"number_value": 0,
"boolean_value": false,
"is_money": false,
"is_custom": true,
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0001-01-01T00:00:00Z"
},
{
"label": "",
"field": "",
"data_type": "",
"string_value": "",
"number_value": 0,
"boolean_value": false,
"is_money": false,
"is_custom": true,
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0001-01-01T00:00:00Z"
}
],
"updated_at": "0001-01-01T00:00:00Z",
"created_at": "2022-02-17T09:52:17.265119Z"
}
}
POST
https://configure-abierta-test.herokuapp.com/api/v1/loan_request/{ID}/bank_details
Adds Bank Details
{
"status": "success",
"message": "Loan Request Updated",
"data": null,
"data1": {
"id": 1,
"user_id": 1,
"org_id": 1,
"product_id": 1,
"product_name": "EC Personal Loan",
"product_slug": "ec-personal-loan",
"lender_name": "Evolve Credit Lending Services",
"reference": "H-sDIdUl9VsfHedM",
"fullname": "Daniel Osineye",
"amount": 1000,
"purpose": "Vibes & Insha Allah",
"terms": {
"approved_amount": 0,
"rate": 2,
"tenure": 2,
"tenured_in": "",
"rate_type": "",
"grace_period": 0,
"exclude_weekends": false,
"zero_interest": false,
"estimated_repayment": 0,
"note": ""
},
"status": "pending",
"active": true,
"progress": "7",
"lender_status": "approved",
"debit_mandate_next_step": "setup",
"offer_letter": "november62022",
"declined_at": "0001-01-01T00:00:00Z",
"final_approval_date": "2021-09-28T20:58:17.614616Z",
"approved_by_id": 1,
"approved_by": "Daniel Osineye",
"approved_at": "2021-09-28T20:58:17.614616Z",
"user_status": "submitted",
"user_accepted_date": "0001-01-01T00:00:00Z",
"user_declined_date": "0001-01-01T00:00:00Z",
"archived_date": "0001-01-01T00:00:00Z",
"unarchived_at": "0001-01-01T00:00:00Z",
"disbursed_at": "0001-01-01T00:00:00Z",
"submitted_at": "2022-01-29T12:20:44.44083492+01:00",
"deleted_at": "0001-01-01T00:00:00Z",
"created_at": "2021-09-21T09:29:44.238127Z",
"updated_at": "2022-01-29T12:20:44.440835061+01:00"
}
}
GET
https://configure-abierta-test.herokuapp.com
{
"status": "success",
"message": "success",
"data": [
{
"id": 17,
"user_id": 1,
"org_id": 1,
"loan_request_id": 1,
"credit_order_id": 0,
"code": "058",
"account_number": "0571449452",
"account_name": "OSINEYE DANIEL IYANUOLUWA",
"bank_name": "058",
"is_deleted": false,
"has_custom_fields": false,
"custom_fields": null,
"created_at": "2021-09-24T08:27:25.361448Z",
"updated_at": "0001-01-01T00:00:00Z"
}
]
}
PUT
https://configure-abierta-test.herokuapp.com/api/v1/loan_request/{ID}/bank_details
{
"status": "success",
"message": "Loan Request Updated",
"data": null,
"data1": {
"id": 1,
"user_id": 1,
"org_id": 1,
"product_id": 1,
"product_name": "EC Personal Loan",
"product_slug": "ec-personal-loan",
"lender_name": "Evolve Credit Lending Services",
"reference": "H-sDIdUl9VsfHedM",
"fullname": "Daniel Osineye",
"amount": 1000,
"purpose": "Vibes & Insha Allah",
"terms": {
"approved_amount": 0,
"rate": 2,
"tenure": 2,
"tenured_in": "",
"rate_type": "",
"grace_period": 0,
"exclude_weekends": false,
"zero_interest": false,
"estimated_repayment": 0,
"note": ""
},
"status": "pending",
"active": true,
"progress": "7",
"lender_status": "approved",
"debit_mandate_next_step": "setup",
"offer_letter": "november62022",
"declined_at": "0001-01-01T00:00:00Z",
"final_approval_date": "2021-09-28T20:58:17.614616Z",
"approved_by_id": 1,
"approved_by": "Daniel Osineye",
"approved_at": "2021-09-28T20:58:17.614616Z",
"user_status": "submitted",
"user_accepted_date": "0001-01-01T00:00:00Z",
"user_declined_date": "0001-01-01T00:00:00Z",
"archived_date": "0001-01-01T00:00:00Z",
"unarchived_at": "0001-01-01T00:00:00Z",
"disbursed_at": "0001-01-01T00:00:00Z",
"submitted_at": "2022-02-04T14:48:02.335330873+01:00",
"deleted_at": "0001-01-01T00:00:00Z",
"created_at": "2021-09-21T09:29:44.238127Z",
"updated_at": "2022-02-04T14:48:02.335331053+01:00"
}
}
POST
https://configure-abierta-test.herokuapp.com/api/v1/loan_request/{ID}/guarantor
Adds a guarantor to a loan request
{
"status": "success",
"message": "Your entry has been successfully recorded",
"data": [
{
"id": 66,
"user_id": 1,
"org_id": 1,
"loan_request_id": 1,
"firstname": "Sure",
"lastname": "Man",
"email": "sure.man@gmail.com",
"phone": "+2348182791196",
"relationship": "Employer",
"created_at": "2022-02-04T13:40:38.506125Z",
"updated_at": "0001-01-01T00:00:00Z"
},
{
"id": 66,
"user_id": 1,
"org_id": 1,
"loan_request_id": 1,
"firstname": "Sure",
"lastname": "Man",
"email": "sure.man@gmail.com",
"phone": "+2348182791196",
"relationship": "Employer",
"created_at": "2022-02-04T13:40:38.506125Z",
"updated_at": "0001-01-01T00:00:00Z"
}
],
"data1": null
}
GET
https://configure-abierta-test.herokuapp.com/api/v1/loan_request/{ID}/guarantor