# Mega API

This API is used to deliver data responses for multiple products. It can deliver JSON containing the data from the APIs below:

* [Full Response Consumer API Integration guide](/product-guides/api-integration-guides/full-response-consumer-api-integration-guide.md)
* [LenderLink Lite API Integration guide](/product-guides/api-integration-guides/lenderlink-lite-api-integration-guide.md)
* [Telco Score API](/product-guides/api-integration-guides/telco-score-api.md)
* [Loan Applications Check API](/product-guides/api-integration-guides/loan-applications-check-api.md)
* [Payment Transaction Data API](/product-guides/api-integration-guides/payment-transaction-data-api.md)
* [Credit Score](/product-guides/credit-score.md)

## Authentication

Obtain a token via the [Authentication](/product-guides/api-integration-guides/authentication.md) procedure.&#x20;

## Request  Data

### Introduction

This endpoint facilitates the generation of a borrower's full data available by their phone number.

{% hint style="warning" %}
Note:

To utilize this endpoint, an access token is required. The procedure for obtaining one is detailed in the preceding section.
{% endhint %}

### **Request Data  Flow**

#### **Option 1**

POST API

```
https://sandbox-app.lenderlink.ph/api/v1/person/mega-report
```

Accepts a **raw JSON request body**.\
\
Clients must send `Content-Type: application/json`

Authorization

Use the generated token as Bearer access token and include it into the request.

| Token | `eyJ0eXAiOiJKasd10sJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5YTc4MzVm...` |
| ----- | -------------------------------------------------------------- |

#### Request body (JSON)

```json
{
  "requestId": "test-02f2-4933-88f3-a73c94e83487",
  "firstName": "John",
  "lastName": "Doe",
  "dateOfBirth": "1990-01-01",
  "idNumber": "ABC123456",
  "email": "john.doe@example.com",
  "cellphoneNumber": "63XXXXXXXXXX",
  "productIds": "FR,PT,CHA,TS"
}

```

#### Option 2

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**

<table><thead><tr><th width="258">Parameter</th><th width="125">Type</th><th width="116">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td>Yes</td><td>Unique identification code generated by the client</td></tr><tr><td>firstName</td><td>String</td><td>Yes</td><td>First Name</td></tr><tr><td>lastName</td><td>String</td><td>Yes</td><td>Last Name</td></tr><tr><td>dateOfBirth</td><td>Date</td><td>Yes</td><td>Date of Birth - YYYY-MM-DD</td></tr><tr><td>cellphoneNumber</td><td>String</td><td>Yes</td><td>Borrower's phone number, the format is 63XXXXXXXXXX.</td></tr><tr><td>email</td><td>String</td><td>No</td><td>Borrower's email address</td></tr><tr><td>idNumber</td><td>String</td><td>No</td><td>Borrower's ID document number. ID, Driver license, etc</td></tr><tr><td>productIds</td><td>String</td><td>Yes</td><td>The list of products that you are requesting data from. "FR", "PT", "TS", "LR", "CHA", "LAC"</td></tr></tbody></table>

### 1. No match:

```json

{
    "requestId": "X123-AB45",
    "productIds": [],
    "response": {}
}
                                
```

### 2. Match&#x20;

{% stepper %}
{% step %}

### You can use this interactive tool [<mark style="color:green;background-color:yellow;">https://dimohh.github.io/json/</mark>](https://dimohh.github.io/json/) to check what will the be the exact JSON you will receive if you include or exclude productIds.

{% endstep %}

{% step %}

### JSON structure

```json
{
  "requestId": "X123-AB45",
  "productIds": [
    "FR",
    "PT",
    "TS",
    "LR",
    "CHA",
    "LAC"
  ],
  "response": {
    "FR": {
      "data": [
        {
          "recordID": "123456789",
          "kycSurname": "Doe",
          "kycFirstName": "John",
          "kycMiddleName": "Smith",
          "kycDateOfBirth": "1990-01-01",
          "kycIdNumber": "ABC123456",
          "kycIdType": 4,
          "kycMobileNumber": "63XXXXXXXXXX",
          "kycEmailAddress": "john.doe@example.com",
          "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",
          "loanInfoLenderType": "fintech",
          "contributorId": "12d3ae45-678d-9ae1-2345-6e789e3xx000",
          "matchedKeys": [
            "cellphoneNumber",
            "email",
            "firstName-lastName-dateOfBirth",
            "idNumber"
            
          ],
          "matchedKeyCount": 4
        }
      ],
      "summary": {
        "numApp": 1,
        "numAcc": 1,
        "numReqSameDay": 3,
        "wasDpd30Ever": 1,
        "wasDpd90Ever": 0,
        "wasDpd30Last3Months": 0,
        "wasDpd90Last3Months": 0,
        "wasDpd30LastYear": 0,
        "wasDpd90LastYear": 0
      },
      "scores": {
        "CS": {
          "score": 540,
          "band": 9
        }
      }
    },
    "PT": {
      "transactionCount": 4,
      "minAmount": 1985,
      "maxAmount": 6656,
      "aveAmount": 3531.5,
      "sumAmount": 14126,
      "stdDev": 1839.28,
      "refDates": [
        "2025-03-19",
        "2025-04-30",
        "2025-05-10",
        "2025-05-18"
      ],
      "refDateDetails": [
        {
          "refDate": "2025-03-19",
          "count": 1,
          "total": 6656
        },
        {
          "refDate": "2025-05-18",
          "count": 1,
          "total": 2485
        },
        {
          "refDate": "2025-04-30",
          "count": 1,
          "total": 1985
        },
        {
          "refDate": "2025-05-10",
          "count": 1,
          "total": 3000
        }
      ],
      "categories": [
        "Loans"
      ],
      "procIds": [
        "GCSH"
      ],
      "within1to30Days": [],
      "within31to60Days": [],
      "beyond61Days": [
        {
          "category": "Loans",
          "transactionCount": 4,
          "minAmount": 1985,
          "maxAmount": 6656,
          "sumAmount": 14126,
          "stdDev": 1839.28
        }
      ],
      "matchKey": "cellphoneNumber"
    },
    "TS": {
      "transactionId": "f2279c3df6eb4368a8ec31c0ca561c8a",
      "code": "0000",
      "result": "ok",
      "scores": {
        "G": [
          [
            "score",
            337
          ],
          [
            "band",
            1
          ]
        ]
      }
    },
    "LR": {
      "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
    },
    "LAC": {
      "result": "ok",
      "code": "0000",
      "transactionId": "c14432247a694546bdd11abf156c2161",
      "scores": {
        "CVSCR2": {
          "cvScore": {
            "score": 501,
            "band": 3
          },
          "cvTotals": {
            "reqTotal1": 0,
            "unqEntities1": 0,
            "reqOthers1": 0,
            "reqBnpl1": 0,
            "reqPos1": 0,
            "reqDigiLoan1": 0,
            "reqDigiBank1": 0,
            "reqCashLoan1": 0,
            "reqAuto1": 0,
            "reqBank1": 0,
            "reqDigiBnpl1": 0,
            "reqTotal7": 0,
            "unqEntities7": 0,
            "reqOthers7": 0,
            "reqBnpl7": 0,
            "reqPos7": 0,
            "reqDigiLoan7": 0,
            "reqDigiBank7": 0,
            "reqCashLoan7": 0,
            "reqAuto7": 0,
            "reqBank7": 0,
            "reqDigiBnpl7": 0,
            "reqTotal14": 0,
            "unqEntities14": 0,
            "reqOthers14": 0,
            "reqBnpl14": 0,
            "reqPos14": 0,
            "reqDigiLoan14": 0,
            "reqDigiBank14": 0,
            "reqCashLoan14": 0,
            "reqAuto14": 0,
            "reqBank14": 0,
            "reqDigiBnpl14": 0,
            "reqTotal21": 0,
            "unqEntities21": 0,
            "reqOthers21": 0,
            "reqBnpl21": 0,
            "reqPos21": 0,
            "reqDigiLoan21": 0,
            "reqDigiBank21": 0,
            "reqCashLoan21": 0,
            "reqAuto21": 0,
            "reqBank21": 0,
            "reqDigiBnpl21": 0,
            "reqTotal28": 0,
            "unqEntities28": 0,
            "reqOthers28": 0,
            "reqBnpl28": 0,
            "reqPos28": 0,
            "reqDigiLoan28": 0,
            "reqDigiBank28": 0,
            "reqCashLoan28": 0,
            "reqAuto28": 0,
            "reqBank28": 0,
            "reqDigiBnpl28": 0,
            "reqTotal35": 0,
            "unqEntities35": 0,
            "reqOthers35": 0,
            "reqBnpl35": 0,
            "reqPos35": 0,
            "reqDigiLoan35": 0,
            "reqDigiBank35": 0,
            "reqCashLoan35": 0,
            "reqAuto35": 0,
            "reqBank35": 0,
            "reqDigiBnpl35": 0,
            "reqTotal45": 0,
            "unqEntities45": 0,
            "reqOthers45": 0,
            "reqBnpl45": 0,
            "reqPos45": 0,
            "reqDigiLoan45": 0,
            "reqDigiBank45": 0,
            "reqCashLoan45": 0,
            "reqAuto45": 0,
            "reqBank45": 0,
            "reqDigiBnpl45": 0,
            "reqTotal60": 0,
            "unqEntities60": 0,
            "reqOthers60": 0,
            "reqBnpl60": 0,
            "reqPos60": 0,
            "reqDigiLoan60": 0,
            "reqDigiBank60": 0,
            "reqCashLoan60": 0,
            "reqAuto60": 0,
            "reqBank60": 0,
            "reqDigiBnpl60": 0,
            "reqTotal90": 0,
            "unqEntities90": 0,
            "reqOthers90": 0,
            "reqBnpl90": 0,
            "reqPos90": 0,
            "reqDigiLoan90": 0,
            "reqDigiBank90": 0,
            "reqCashLoan90": 0,
            "reqAuto90": 0,
            "reqBank90": 0,
            "reqDigiBnpl90": 0,
            "reqTotal180": 0,
            "unqEntities180": 0,
            "reqOthers180": 0,
            "reqBnpl180": 0,
            "reqPos180": 0,
            "reqDigiLoan180": 0,
            "reqDigiBank180": 0,
            "reqCashLoan180": 0,
            "reqAuto180": 0,
            "reqBank180": 0,
            "reqDigiBnpl180": 0,
            "reqTotal360": 0,
            "unqEntities360": 0,
            "reqOthers360": 0,
            "reqBnpl360": 0,
            "reqPos360": 0,
            "reqDigiLoan360": 0,
            "reqDigiBank360": 0,
            "reqCashLoan360": 0,
            "reqAuto360": 0,
            "reqBank360": 0,
            "reqDigiBnpl360": 0,
            "reqTotal540": 0,
            "unqEntities540": 0,
            "reqOthers540": 0,
            "reqBnpl540": 0,
            "reqPos540": 0,
            "reqDigiLoan540": 0,
            "reqDigiBank540": 0,
            "reqCashLoan540": 0,
            "reqAuto540": 0,
            "reqBank540": 0,
            "reqDigiBnpl540": 0,
            "reqTotal720": 1,
            "unqEntities720": 1,
            "reqOthers720": 1,
            "reqBnpl720": 0,
            "reqPos720": 0,
            "reqDigiLoan720": 1,
            "reqDigiBank720": 0,
            "reqCashLoan720": 0,
            "reqAuto720": 0,
            "reqBank720": 0,
            "reqDigiBnpl720": 0,
            "reqTotalAll": 33,
            "unqEntitiesTotalAll": 6,
            "reqOthersTotalAll": 33
          }
        }
      }
    }
  }
}

```

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lenderlink.ph/product-guides/api-integration-guides/mega-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
