Mega API
This API is used to deliver data responses for multiple products. It can deliver JSON containing the data from the APIs below:
Credit History Aggregated
Authentication
Prerequisites
In order to obtain an API Token you first need to have client_id and client secret from the previous step.
Token Request Flow
To authenticate and obtain an OAuth token, follow the standard OAuth token request flow.
POST API URL
https://sandbox-app.lenderlink.ph/oauth/token
Grant Type
Use this grant type when the client is a server and does not require user authentication.
"grant_type": "client_credentials"
Requesting the Access Token
To request the Access Token, submit a POST request to the API URL, including the following body parameters in JSON format:
{
"grant_type": "client_credentials",
"client_id": "your client id",
"client_secret": "your client secret"
}
Handling the Token Response
Upon successful validation, the authorization server will respond with an access token:
{
"token_type": "Bearer",
"expires_in": 86400,
"access_token": "eyJ0eXAiOiJKasd10sJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5YTc4MzVm..."
}
Token Lifespan
Access tokens have a limited lifespan of 86400 seconds. Once the token expires, you can obtain a new one.
Request Data
Introduction
This endpoint facilitates the generation of a borrower's full data available by their phone number.
Note:
To utilize this endpoint, an access token is required. The procedure for obtaining one is detailed in the preceding section.
Request Data Flow
GET API URL
https://sandbox-app.lenderlink.ph/api/v1/person/mega-report
Authorization
Use the generated token as Bearer access token and include it into the request.
Token
eyJ0eXAiOiJKasd10sJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5YTc4MzVm...
Query Params
requestId
String
Yes
Unique identification code generated by the client
firstName
String
Yes
First Name
lastName
String
Yes
Last Name
dateOfBirth
Date
Yes
Date of Birth - YYYY-MM-DD
cellphoneNumber
String
Yes
Borrower's phone number, the format is 63XXXXXXXXXX.
String
No
Borrower's email address
idNumber
String
No
Borrower's ID document number. ID, Driver license, etc
productsIds
String
Yes
The list of products that you are requesting data from. "FR", "PT", "TS", "SB", "CHA"
1. No match:
{
"requestId": "X123-AB45",
"cellphoneNumber": "63XXXXXXXXXX",
"matchFlag": "No hit",
"data": []
}
2. Match - data for all loans found in partners databases (full response) is returned
You can use this interactive tool https://dimohh.github.io/json/ to check what will the be te exact JSON you will receive if you include or exclude productIds.
{
"requestId": "X123-AB45",
"productIds": [
"FR",
"PT",
"TS",
"SB",
"CHA"
],
"response": {
"FR": {
"data": [
{
"recordID": "123456789",
"kycSurname": "Doe",
"kycFirstName": "John",
"kycMiddleName": "Smith",
"kycDateOfBirth": "1990-01-01",
"kycIdNumber": "ABC123456",
"kycIdType": 4,
"kycMobileNumber": "63XXXXXXXXXX",
"kycEmailAddress": "[email protected]",
"kycAddress": "123 Main St, Anytown, USA",
"loanInfoLoanType": 1,
"loanInfoApplicationDate": "2022-01-01",
"loanInfoOpenDate": "2022-01-01",
"loanInfoLoanTerm": 5,
"loanInfoOpenBalance": 10000,
"loanInfoOutstandingBalance": 8000,
"loanInfoNextDueDate": "2024-05-01",
"loanInfoLastPaymentAmount": 200,
"loanInfoLastPaymentDate": "2024-04-01",
"loanInfoStatusCode": "Active",
"loanInfoInstallmentAmount": 500,
"loanInfoOverdueAmount": 100,
"loanInfoRepaymentFrequency": 1,
"loanInfoRepaymentHistory": "00000",
"loanInfoCloseDate": "2023-12-28",
"contributorId": "12d3ae45-678d-9ae1-2345-6e789e3xx000"
}
],
"summary": {
"numApp": 1,
"numAcc": 1,
"wasDpd30Ever": 1,
"wasDpd90Ever": 0,
"wasDpd30Last3Months": 0,
"wasDpd90Last3Months": 0,
"wasDpd30LastYear": 0,
"wasDpd90LastYear": 0
}
},
"PT": {
"transactionCount": 33,
"minAmount": 94,
"maxAmount": 10150,
"aveAmount": 2668.43,
"sumAmount": 88058.04000000001,
"stdDev": 2737.87,
"refDates": []
},
"TS": {
"transactionId": "f2279c3df6eb4368a8ec31c0ca561c8a",
"code": "0000",
"result": "ok",
"scores": {
"G": [
[
"score",
337
],
[
"band",
1
]
]
}
},
"SB": {
"msisdn": "63XXXXXXXXXX",
"numApp": 1,
"numAcc": 1,
"wasDpd30Ever": 1,
"wasDpd90Ever": 0,
"wasDpd30Last3Months": 0,
"wasDpd90Last3Months": 0,
"wasDpd30LastYear": 0,
"wasDpd90LastYear": 0
},
"CHA": {
"document": null,
"phone": {
"wasAgr": 1,
"dpd30Ntb": 0,
"dpd90Ntb": 0,
"mmDocByPhone": null,
"mmAccByPhone": null,
"mmBdByPhone": null,
"sumApps1m": 0,
"sumApps3d": 0,
"uniqueAddDob": 1,
"uniqueAddAccount": 1,
"uniqueAddDoc": 1,
"diffDaysFapp": 2158,
"diffDaysLapp": 2060,
"hasApp": 1,
"wasDpd10LastYear": null,
"wasDpd10Last3Months": null,
"uniqueAddDocType": null,
"uniqueAddDobYear": 1,
"uniqueAddBank": null,
"uniqueAddEmail": 1,
"uniqueAddGuarantor": 1,
"uniqueAddType": 1,
"uniqueAddChannel": null,
"wasDpd10Ever": 1,
"suspiciousFlag": 0,
"indexCredibility": 4,
"getLoanLast3Month": 0,
"getLoanLastMonth": 0,
"getLoanLastYear": 0,
"uniqueAddAcquisitionChannels": 1,
"uniqueAddDocTypes": 1,
"uniqueAddWallet": 0,
"wasDpd10LastMonth": null,
"wasDpd30Ever": 1,
"wasDpd30Last3Months": null,
"wasDpd30LastMonth": null,
"wasDpd30LastYear": null,
"wasDpd90Ever": 0,
"wasDpd90Last3Months": null,
"wasDpd90LastMonth": null,
"wasDpd90LastYear": null
},
"email": null,
"phoneAsWallet": null,
"phoneAsGuarantor": null
}
}
}
Last updated