Decisioning

Our decisioning APIs will guide you to make quick, easy and cost-effective decisions during your loan decision processes.

Decision Model Lookup

GET List Models

GET https://adjutor.lendsqr.com/decisioning/models

This endpoint fetches all the decision models that you have configured on the Lendsqr platform. This endpoint returns all the decision model data you have on your platform irrespective of whether they have been activated or not.

Headers

{
    "status": "success",
    "message": "Successful",
    "data": [
        {
            "id": 20,
            "product_id": null,
            "version_id": 33,
            "org_id": 1,
            "name": "Test Decision Model",
            "description": "testing",
            "decision_setting": {
                "karma": {
                    "required": true,
                    "sequence": 1,
                    "continue_on_failure": false,
                    "pre_offer": true
                },
                "ecosystem": {
                    "required": true,
                    "sequence": 2,
                    "continue_on_failure": false,
                    "pre_offer": true
                },
                "scoring": {
                    "minimum": 50,
                    "required": true,
                    "sequence": 3,
                    "continue_on_failure": false,
                    "pre_offer": true
                },
                "credit_bureau": {
                    "provider": "CRC",
                    "required": true,
                    "sequence": 4,
                    "continue_on_failure": false
                }
            },
            "offer_setting": [
                {
                    "rule": {
                        "*": [
                            1,
                            {
                                "var": [
                                    "requested_amount"
                                ]
                            }
                        ]
                    },
                    "maximum": 10000000,
                    "minimum": 1000
                }
            ],
            "status": "active",
            "created_on": "2021-07-31T08:06:27.000Z"
        }
    ]
}

Decision Model Details

GET Model

GET https://adjutor.lendsqr.com/decisioning/models/:id/settings

This endpoint fetches an individual decision model and its settings that have been configured on your platform using the decision model id.

Path Parameters

Headers

{
    "status": "success",
    "message": "Successful",
    "data": [
        {
            "id": 20,
            "product_id": null,
            "version_id": 33,
            "org_id": 1,
            "name": "Test Decision Model",
            "description": "testing",
            "decision_setting": {
                "karma": {
                    "required": true,
                    "sequence": 1,
                    "continue_on_failure": false,
                    "pre_offer": true
                },
                "ecosystem": {
                    "required": true,
                    "sequence": 2,
                    "continue_on_failure": false,
                    "pre_offer": true
                },
                "scoring": {
                    "minimum": 50,
                    "required": true,
                    "sequence": 3,
                    "continue_on_failure": false,
                    "pre_offer": true
                },
                "credit_bureau": {
                    "provider": "CRC",
                    "required": true,
                    "sequence": 4,
                    "continue_on_failure": false
                }
            },
            "offer_setting": [
                {
                    "rule": {
                        "*": [
                            1,
                            {
                                "var": [
                                    "requested_amount"
                                ]
                            }
                        ]
                    },
                    "maximum": 10000000,
                    "minimum": 1000
                }
            ],
            "status": "active",
            "created_on": "2021-07-31T08:06:27.000Z"
        }
    ]
}

Oraculi Scoring

POST Scoring

POST https://adjutor.lendsqr.com/decisioning/models/:id

This endpoint is used for scoring based on the passed parameters/data points. By default, Lendsqr provides you with a proprietary scoring model and its sample request payload which you can tweak to your specification

However, you can pass any data point you wish to; provided that you have configured the scoring model to accept this.

Query Parameters

Headers

Request Body

{
   "status":"success",
   "message":"Successful",
   "data":{
      "credit_score_items":[
         {
            "score_name":"age",
            "score_value":"21 - 30",
            "weight":"7",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         },
         {
            "score_name":"gender",
            "score_value":"Female",
            "weight":"10",
            "maximum_score":10,
            "borrower_score":10,
            "weighted_score":0.0909
         },
         {
            "score_name":"location",
            "score_value":"lagos",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":9,
            "weighted_score":0.0409
         },
         {
            "score_name":"customer_tier",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         },
         {
            "score_name":"marital_status",
            "score_value":"Single",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":6,
            "weighted_score":0.0273
         },
         {
            "score_name":"employer_category",
            "weight":"0",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         },
         {
            "score_name":"employment_status",
            "score_value":"Employed",
            "weight":"10",
            "maximum_score":10,
            "borrower_score":10,
            "weighted_score":0.0909
         },
         {
            "score_name":"type_of_residence",
            "score_value":"Rented Apartment",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":10,
            "weighted_score":0.0455
         },
         {
            "score_name":"monthly_net_income",
            "score_value":"100,000 - 199,999",
            "weight":"10",
            "maximum_score":10,
            "borrower_score":6,
            "weighted_score":0.0545
         },
         {
            "score_name":"no_of_dependent",
            "score_value":"0",
            "weight":"8",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         },
         {
            "score_name":"sector_of_employment",
            "score_value":"Other Financial",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":6,
            "weighted_score":0.0273
         },
         {
            "score_name":"educational_attainment",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         },
         {
            "score_name":"total_years_of_experience",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":4,
            "weighted_score":0.0182
         },
         {
            "score_name":"time_with_current_employer",
            "score_value":1,
            "weight":"5",
            "maximum_score":10,
            "borrower_score":2,
            "weighted_score":0.0091
         },
         {
            "score_name":"previous_paid_loans_on_pecunia",
            "weight":"25",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         }
      ],
      "total_weight":110,
      "score":40.46
   },
   "meta":{
      "balance":50000
   }
}

Last updated