Sale of applications
To send a loan application to the Ninja Lender system, you must do the following:
Log in to the system and get a token, which will be used in all subsequent requests.
Get the reference “Loan Purpose” and “Refuse Reason”, as the data from these directories is used when loading applications into the system.
Get the body of the template on the basis of which the application will be filled with requisites.
Create an application and send it in.
Example: We have a loan application where the borrower requests 10,000 for 30 days to buy household appliances, but we can’t give out a loan due to discrepancy with age restrictions.
To begin with, we find the necessary loan purpose (in the example below, this is the purpose with "id": "2")
and refuse reason (in the example below, this is the reason with "id": "4")
Next we get the body of the template
And we proceed to compile JSON to upload the application. To begin, fill in the amount, the minimum amount, the term, the cause of failure, purpose of the loan and what template we use for application
Now we need to fill in the details of the application based on the body of the template. Each requisite in the body is described by a JSON object, where the object key is the name (key) of the requisite, and a description of the requisite contained in the value.
Example of requisite from the template body:
Key
Type
Description
id
int
id of requisite
kind
int
Kind of requisite, defines data type for requisite value:
0 – string
1 – text
2 – number
3 – date
4 – boolean
5 – handbook(in the case of this kind, the system will expect, as the value requisite, one of the elements from the variants array) 6 - phone in international format 7 - valid email address
label
string
requisite name
required
boolean
is requisite required
variants
JSON.array
list of variants for handbook kind requisites
description
string
description of requisite
title
string
requisite title
We fill in the requisites according to their types
Now the JSON of application is ready and it can be uploaded to the system.
Last updated