#What is (Website Name) Insights?

The Insight API from (Website Name) provides actionable insights regarding a customer's income, expenditures, and financial history, extracted from their bank statement.

In addition to financial data uploaded through the Account Aggregator (AA), the (Website Name) Insights API also processes data from external sources such as PDF. The generated insights have the potential to be customized in order to meet your particular needs, which may include anything from personal finance management to underwriting use cases.

In addition to analyzing bank statements, (Website Name) Insights will provide support for the analysis of diverse data sources, including GST, ITR, insurance, and more, as soon as these data types become accessible on AA.


The output formats supported by (Website Name) Insights include XML, JSON, and XLS. Dashboard-formatted output will be made available in the near future.


#What can you do with this product?

(Website Name) Insights allows you to analyze a wide range of financial statements, such as bank statements, GST returns, securities accounts, etc. Some possible use-cases include—

  • Income verification and underwriting— Analyze bank statements to verify applicant income and assess creditworthiness. Extract income sources, evaluate financial stability and streamline the loan approval process.
  • Loan monitoring — Monitor borrower's financial health and loan obligations. Track cash flow, identify irregularities and manage loan portfolios effectively. Stay proactive with real-time insights into borrower's ability to meet loan obligations and mitigate risks.
  • Personal finance management and wealth management—Enable individuals to effectively manage their personal finances. Assemble expenditure reports, classify transactions, and acquire knowledge to establish financial objectives and make well-informed choices. Access comprehensive financial data in order to provide wealth managers with individualized guidance and customized investment strategies.

#How does it work?

  1. Feed data—After receiving authorization from the customer to access their financial data, the FIP proceeds to transmit the finance data to you (FIU) through the AA gateway. This information is inputted into (Website Name) Insights for analysis. Consult AA documents for a concise explanation of FIU, FIP, and AA.

  2. Analyse financial data—The unprocessed data is subjected to a categorization model developed by (Website Name) Insights, which loads it into distinct buckets representing incomes, expenses, and more.

  3. Get reports—Post analysis, the insights are provided to you in the format of your choice.


Was this page helpful?

#Quickstart Guide

Here is a quick summary of steps to help you integrate with (Website Name)’s Insights API. Before you start, there are some key terms that will be referred to periodically in the documentation—

  • FI Data block—FI The data blocks obtained through the AA are the information provided by the FIP (Financial information provider). At this time, only bank statement datablocks are supported.
  • Template—A template is a pre-established format that dictates the organization of the produced report, as well as the selection of insights to be produced. You have complete control over which insights are included in a template, according to your specific requirements. For instance, if the intention is to produce insights pertaining solely to a customer's expenses and income, the template may solely comprise such information.

Please refer to the Account Aggregator's quickstart guide for key terms related to AA



#Step 1—Template creation

You need to send in the below information to insights@(Website Name).co, for setting up your template.

FIU ID This can be obtained from your AA integration
Notification endpoint An endpoint where (Website Name) will send you webhook notifications for events. See notifications.
Template name Choose a suitable name, which helps you easily recognise this template
Insights required A list of required Insights. See the full list here.
Output format Format in which you need the output — currently only JSON is supported

(Website Name) will create a template for you and share a templateID, which can be used in the API calls.


#Step 2—Feed data

Once you have obtained a user's financial information, you can import it as a FI Data block into (Website Name) Insights. For each newly created FI Data block, a dataId is assigned. In order to integrate with data ingestion APIs, consult API integration.


#Step 3—Generate insights

You can generate insights for each FI Data block that is created in the previous step. To generate insights, pass the templateId and dataId from the previous steps.

The reportId identifies an insight report, which will be delivered to you asynchronously via the notification URL you supply. Additionally, a generated insight can be retrieved at any time using the reportId. To integrate with the APIs used for Insight generation, consult API integration.


#Test on Postman or integrate APIs

You should familiarise yourself with setting up Postman and configuring credentials if you are just getting started with the integration. If you have already completed this step, you can integrate with the (Website Name) Insights APIs directly.


Was this page helpful?

#Test (Website Name) Insights APIs with Postman

#Download and set up Postman

Install the Postman application, should you not have done so already. In this collection, every API required to utilize (Website Name) Insights has been made available. In the upper right corner, click Run in Postman to import the (Website Name) Insight API collection into Postman.

Update environment variables

To edit environment variables in Postman, click on the Environments and go to Sandbox. .


Postman environment comes wth default test credentials, which are passed as headers for every request in the collection. Set the following variables in the environment on Postman—

  • Set clientId to the FIU app client ID received from our support team. This variable is passed as the x-client-id header.
  • Set clientSecret to the FIU app client secret received from our support team. This variable is passed as the x-client-secret header.
  • Set productInstanceId to the FIU product instance ID received from our support team. This variable is passed as the x-product-instance-id header.

Remove any new lines at the end after pasting values, to avoid errors.


Hit Save after all the changes are complete.


Next, you're now ready to feed data and generate insights by trying the following APIs provided in the Postman collection—

  • Data ingestion APIs—Create FI Data blocks and get list of created FI data blocks
  • Insight generation APIs—Create Insights reports and fetch generated reports

Was this page helpful?

#API integration

Here are the URLs you would need for calling Website Name Insights APIs—


#Data ingestion APIs

#Create FI Data block API

This API creates FI data blocks for user data that you wish to feed into (Website Name) Insights.

Request

The financial data should be sent in the body as a payload. The payload should be the same as the FIP data. The payload is validated against the ReBIT schema.

POST /v1/fiData
{
account:{
profile:{
holders:{
holder:[
{
name: 'string',
dob: '2019-08-24',
mobile:0,
nominee: 'REGISTERED',
landline: 'string',
address: 'string',
email: 'string',
pan: 'string',
ckycCompliance:true
}
],
type: 'SINGLE'
}
},
summary:{
pending:{transactionType: 'CREDIT', amount:0},
currentBalance: 'string',
currency: 'string',
exchgeRate: 'string',
balanceDateTime: '2019-08-24T14:15:22Z',
type: 'SAVINGS',
branch: 'string',
facility: 'OD',
ifscCode: 'string',
micrCode: 'string',
openingDate: '2019-08-24',
currentODLimit: 'string',
drawingLimit: 'string',
status: 'ACTIVE'
},
transactions:{
transaction:[
{
type: 'CREDIT',
mode: 'CASH',
amount:0,
currentBalance: 'string',
transactionTimestamp: '2019-08-24T14:15:22Z',
valueDate: '2019-08-24',
txnId: 'string',
narration: 'string',
reference: 'string'
}
],
startDate: '2019-08-24',
endDate: '2019-08-24'
},
type: 'deposit',
maskedAccNumber: 'string',
version:0,
linkedAccRef: 'string'
}
}

Response

A dataId is assigned for this FI data block for usage in other APIs.

{
"status":"Success",
"statusDescription":"statusDescription",
"body":{
"dataId":"4e0ba220-9575-11eb-a8b3-0242ac130003",
"fiSchema":"deposit",
"expiryDate":"2023-05-16T09:23:39.115Z"
}
}

#Get FI data blocks API

Call this API to get a list of all FI data blocks created by you.

Request
GET /v1/fiData

Response

An array of FI data blocks created by you is returned.

{
"status":"Success",
"statusDescription":"statusDescription",
"body":[
{
"dataId":"4e0ba220-9575-11eb-a8b3-0242ac130003",
"fiSchema":"deposit",
"expiryDate":"2023-05-16T10:16:53.334Z"
}
]
}

#Insight generation APIs

#Create Insight report

Use this API to generate an Insights report based on the FI data block you created earlier. The dataId identifies each FI data block. Pass the templateId obtained from template creation step, which will determine the ouput insights parameters that will be present in the report.

Request

Send the list of FI data block IDs and the template ID as the payload.

Currently, only one dataId is supported in the request body.


POST /v1/insight
{
"templateId":"4777db7e-e604-4c0c-a410-51be9d17d00b",
"dataIds":[
"cfbd63ef-ea1a-44b2-a9e8-9f834214f5c6"
]
}

Response

A reportId is returned along with the status of the Insights generation job. A notification will be posted after successful generation of insights. See notifications.

The reportId also can be used fetch the Insights report using Get Insight report API, if the report status is Success.

{
"status":"Success",
"body":{
"reportId":"4b108e83-07b6-47a4-84cd-a77d0e9e2b3d",
"status":"in-progress"
}
}

#Get Insight report

The Insights report can be retrieved by calling this API. As a URL parameter, pass the reportId returned in the response body of Create Insight report API.

Request
GET /v1/insight?reportId=4b108e83-07b6-47a4-84cd-a77d0e9e2b3d

Response

A dictionary, where insight names are keys and insights are values, is returned

{
"status":"Success",
"body":{
"name":"Redacted Services",
"dob":"2006-06-27",
"pan":"redacted",
"ckyc_compliance":false,
"mobile":9999912345,
"bank_branch":"NARKATIAGANJ BH",
"bank_account_number":"XXXXXXXXXXX1234",
"bank_account_type":"CURRENT",
"opening_date":"2019-02-26",
"closing_balance":27929.84,
"end_of_month_balances":{
"2021":{
"9":245676.89,
"10":48650.54,
"11":145487.41,
"12":97725.67
},
"2022":{
"1":9152.09,
"2":5957.19,
"3":545.59,
"4":1282299.18,
"5":134376.04,
"6":84468.46,
"7":135585.11,
"8":3346.11,
"9":268766.7,
"10":50049.84,
"11":27929.84
}
},
"balances_on_10th":{
"2021":{
"12":55387.41
},
"2022":{
"1":2426.67,
"2":9629.59,
"3":97487.45,
"4":1641.09,
"5":52517.54,
"6":72084.28,
"7":165864.04,
"8":63465.11,
"9":11226.11,
"10":418535.81,
"11":27929.84
}
},
"average_end_of_day_balance":297715.03,
"maximum_end_of_day_balance":1818766.7,
"total_credits":153,
"total_credits_value":44810341.06,
"total_debits":473,
"total_debits_value":45178088.11,
"quarterly_salary_average":{
"2021":{
"4":15072
}
},
"cash_deposit_x_total_credit":{
"2021":{
"12":0.0095
},
"2022":{
"3":0.0018
}
}
}
}

Was this page helpful?

#List of insights

You can create templates by picking only those insights that you need. Below is a list of all available insights that (Website Name) Insights can provide—

Insight name Details
name Name of the user
dob Date of Birth of the user
email E-Mail ID of the user
pan Permanent Account Number of the user
ckyc_compliance Checks if the bank has carried out the CKYC compliance for the user
mobile Mobile number of the user
bank_names Name of the bank
bank_branch Branch of the bank
bank_account_number Bank account number of the user
bank_account_type Bank account type of the user
opening_date Date on which the bank account was opened
closing_balance Amount value of the account as of the lastest date
od_cc_limit The portion of the sanctioned limit that is available to be drawn
current_quarterly_average_eod_balance Average end of day balance for the current quarter
previous_quarterly_average_eod_balance Average end of day balance for previous quarter
end_of_month_balances Balances as on the end of the month
balances_on_10th Balances as on the 10th of the month
balances_on_20th Balances as on the 20th of the month
end_of_day_balances End of day balances for everyday of the month
average_end_of_day_balance Average of the end of day balances
maximum_end_of_day_balance Maximum of the end of day balances
total_credits Total number of credits to the user's accounts
total_credits_value Total amount credited to the user's account
total_debits Total number of debits to the user's account
total_debits_value Total amount debited from the user's account
top_10_credits Top 10 credit transactions of the user
top_10_debits Top 10 debit transactions of the user
quarterly_salary_average The 3 month average salary of the user
semi_yearly_salary_average The 6 month average salary of the user
yearly_salary_average The 12 month average salary of the user
cash_deposit_x_total_credit The monthly cash deposit to total credit amount ratio
cash_withdrawals 10 recent cash withdrawals
inward_cheque_bounce_count Total number of inward cheque bounces
outward_cheque_bounce_count Total number of outward cheque bounces
cheque_bounces Summary of cheque bounces
expenses_monthly_summary Detailed classification of the user's monthly expenses
inflows_monthly_summary Detailed classificaiton of the user's monthly incomes

Was this page helpful?

#Notifications

Notifications are webhooks from (Website Name) that provide the data you requested.

During template creation, you shared the Notification endpoint, which is the base_url configured to receive notifications.


#Insights generated notification

This notification is used to communicate the generated insights which was requested by you in Create Insight Report API. .

Notification payload

(Website Name) will post this payload to your notification endpoint when Insights report is successfully generated.

{
"type":"INSIGHT_STATUS_UPDATE",
"timestamp":2018-12-06T11:39:57.153Z,
"jobId":"d4f40bd9-a22f-4408-a622-4e8a1e4fbda6",
"success":true,
"data":{
"status":"READY",
"insights":{
// ... insight_name : insight_value
}
},
"error":{}
}

Was this page helpful?

Website Name Insights


Base URL

https://di-uat.(Website Name).co

Description

Using (Website Name)'s Insights API, you can get actionable insights about a customer's income, expenses, and financial history.

Get transaction details

https://di-uat.(Website Name).co/v1/transaction

Call this API with the data ids and filters to get transaction wise categorization details.If you want the transactions for a single category or a subcategory you can pass category or subcategory parameters. If you want to paginate the results, you can pass skip and offset parameters. If you want to get transactions for a specific date range, you can pass from and to parameters.


Request

Query parameters

dataId

array [undefined]

refId

array [string]

linkedAccRef

array [string]

to

string

from

string

category

array [undefined]

subcategory

array [undefined]

skip

integer

limit

integer

Default:

100

Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Response

Body

status

string

Default:

Success

statusDescription

string

body

object

Required

Language

curl

Node

Python

Go

Request sample


curl --request GET \
--url 'https://di-uat.(website name).co/v1/transaction?dataId=SOME_ARRAY_VALUE&refId=SOME_ARRAY_VALUE&linkedAccRef=SOME_ARRAY_VALUE&to=SOME_STRING_VALUE&from=SOME_STRING_VALUE&category=SOME_ARRAY_VALUE&subcategory=SOME_ARRAY_VALUE&skip=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE'\
--header 'x-client-id: SOME_STRING_VALUE'\
--header 'x-client-secret: SOME_STRING_VALUE'\
--header 'x-product-instance-id: SOME_STRING_VALUE'
200 Successful Response

Response sample


{
"status":"Success",
"statusDescription":"statusDescription",
"body":{
"totalCount":0,
"dataIdStatus":[
{
"dataId":"dataId",
"status":"status"
}
],
"transactions":[
{
"fiuId":"4e0ba220-9575-11eb-a8b3-0242ac130003",
"dataId":"4e0ba220-9575-11eb-a8b3-0242ac130003",
"refId":"refId",
"linkedAccRef":"linkedAccRef",
"narration":"narration",
"amount":"amount",
"currentBalance":"currentBalance",
"txnMode":"txnMode",
"reference":"reference",
"txnId":"txnId",
"txnType":"txnType",
"txnValueDate":"2023-11-21",
"txnTimestamp":"2023-11-21T09:02:04.059Z",
"categoryL1":"categoryL1",
"categoryL2":"categoryL2"
}
]
}
}

Get FI Datablocks

https://di-uat.(Website Name).co/v1/fiData

Call this API to get a list of FI Datablocks created by the FIU


Request

Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Response

Body

status

string

Default:

Success

statusDescription

string

body

array

Required

Language

curl

Node

Python

Go

Request sample


curl --request GET \
--url https://di-uat.(website name).co/v1/fiData \
--header 'x-client-id: SOME_STRING_VALUE'\
--header 'x-client-secret: SOME_STRING_VALUE'\
--header 'x-product-instance-id: SOME_STRING_VALUE'
200 Successful Response

Response sample


{
"status":"Success",
"statusDescription":"statusDescription",
"body":[
{
"dataId":"4e0ba220-9575-11eb-a8b3-0242ac130003",
"refId":"refId",
"fiSchema":"fiSchema",
"expiryDate":"2023-11-21T09:02:26.439Z"
}
]
}

Create FIData block (FIU Webhook)

https://di-uat.(Website Name).co/v1/fiData

Call this API with the data received from FIP's notification as payload, to create an FI DataBlock. Note: This data can be auto-fetched from FIP with FIU's consent in the future.


Request

Query parameters

refId

string

Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Body

account

object

Required

Response

Body

status

string

Default:

Success

statusDescription

string

body

object

Required

Language

curl

Node

Python

Go

Request sample


curl --request POST \
--url 'https://di-uat.(website name).co/v1/fiData?refId=SOME_STRING_VALUE'\
--header 'content-type: application/json'\
--header 'x-client-id: SOME_STRING_VALUE'\
--header 'x-client-secret: SOME_STRING_VALUE'\
--header 'x-product-instance-id: SOME_STRING_VALUE'\
--data '{
"account": {
"profile": {
"holders": {
"holder": [
{
"name": "string",
"dob": "2019-08-24",
"mobile": 0,
"nominee": "REGISTERED",
"landline": "string",
"address": "string",
"email": "string",
"pan": "string",
"ckycCompliance": true
}
],
"type": "SINGLE"
}
},
"summary": {
"pending": {
"transactionType": "CREDIT",
"amount": 0
},
"currentBalance": "string",
"currency": "string",
"exchgeRate": "string",
"balanceDateTime": "2019-08-24T14:15:22Z",
"type": "SAVINGS",
"branch": "string",
"facility": "OD",
"ifscCode": "string",
"micrCode": "string",
"openingDate": "2019-08-24",
"currentODLimit": "string",
"drawingLimit": "string",
"status": "ACTIVE"
},
"transactions": {
"transaction": [
{
"type": "CREDIT",
"mode": "CASH",
"amount": 0,
"currentBalance": "string",
"transactionTimestamp": "2019-08-24T14:15:22Z",
"valueDate": "2019-08-24",
"txnId": "string",
"narration": "string",
"reference": "string"
}
],
"startDate": "2019-08-24",
"endDate": "2019-08-24"
},
"type": "deposit",
"maskedAccNumber": "string",
"version": 0,
"linkedAccRef": "string"
}
}'
201 Successful Response

Response sample


{
"status":"Success",
"statusDescription":"statusDescription",
"body":{
"dataId":"4e0ba220-9575-11eb-a8b3-0242ac130003",
"refId":"refId",
"fiSchema":"fiSchema",
"expiryDate":"2023-11-21T09:02:45.889Z"
}
}

Get Insights

https://di-uat.(Website Name).co/v1/insight

Call this API with the report-id to get the created Insights


Request

Query parameters

reportId

string

Required


Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Response

Body

200 Successful Response

Language

curl

Node

Python

Go

Request sample


curl --request GET \
--url 'https://di-uat.(website name).co/v1/insight?reportId=SOME_STRING_VALUE'\
--header 'x-client-id: SOME_STRING_VALUE'\
--header 'x-client-secret: SOME_STRING_VALUE'\
--header 'x-product-instance-id: SOME_STRING_VALUE'
200 Successful Response

Response sample


{
"status":"Success",
"statusDescription":"statusDescription",
"body":{
"reportId":"4e0ba220-9575-11eb-a8b3-0242ac130003",
"status":"status"
}
}

Create Insights

https://di-uat.(Website Name).co/v1/insight

In order to initiate a report generation job, provide this API with a list of data-ids and the template-id obtained from (Website Name). FI Datablocks are associated with a variety of bank accounts.The generated Report will be disseminated to the endpoint configured by the FIU via notification.The report-id returned by this API can be utilized to retrieve the generated report.


Request

Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Body

templateId

string

Required

dataIds

string[]

refIds

string[]

linkedAccRefs

string[]

Response

Body

status

string

Default:

Success

statusDescription

string

body

object

Required

Language

curl

Node

Python

Go

Request sample


curl --request POST \
--url https://di-uat.(website name).co/v1/insight \
--header 'content-type: application/json'\
--header 'x-client-id: SOME_STRING_VALUE'\
--header 'x-client-secret: SOME_STRING_VALUE'\
--header 'x-product-instance-id: SOME_STRING_VALUE'\
--data '{
"templateId": "string",
"dataIds": [
"string"
],
"refIds": [
"string"
],
"linkedAccRefs": [
"string"
]
}'
202 Successful Response

Response sample


{
"status":"Success",
"statusDescription":"statusDescription",
"body":{
"reportId":"4e0ba220-9575-11eb-a8b3-0242ac130003",
"status":"status"
}
}

Create Insights

https://di-uat.(Website Name).co/v1/insight/pdf

In order to initiate a report generation job, provide this API with a list of data-ids and the template-id obtained from (Website Name). FI Datablocks are associated with a variety of bank accounts.The generated Report will be disseminated to the endpoint configured by the FIU via notification.The report-id returned by this API can be utilized to retrieve the generated report.


Request

Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Body

templateId

string

Required

applicantName

string

Required

applicantType

string

Default:

retail

bankCode

string

bankName

string

password

string

dataFile

string<binary>

Required

Upload the pdf-file to process

Response

Body

status

string

Default:

Success

statusDescription

string

body

object

Required

Language

curl

Node

Python

Go

Request sample


curl --request POST \
--url https://di-uat.(website name).co/v1/insight/pdf \
--header 'content-type: multipart/form-data'\
--header 'x-client-id: SOME_STRING_VALUE'\
--header 'x-client-secret: SOME_STRING_VALUE'\
--header 'x-product-instance-id: SOME_STRING_VALUE'\
--form templateId=string \
--form applicantName=string \
--form applicantType=retail \
--form bankCode=\
--form bankName=\
--form password=\
--form dataFile=string
202 Successful Response

Response sample


{
"status":"Success",
"statusDescription":"statusDescription",
"body":{
"reportId":"4e0ba220-9575-11eb-a8b3-0242ac130003",
"status":"status"
}
}

Get Supported Banks for PDF Parsing

https://di-uat.(Website Name).co/v1/pdf/supported_banks

Call this API to get a list of Supported Banks for PDF Parsing.


Request

Header parameters

x-client-id

string

Required

x-client-secret

string

Required


Response

Body

status

string

Default:

Success

statusDescription

string

body

string[]

Required

Language

curl

Node

Python

Go

Request sample


curl --request GET \
--url https://di-uat.(website name).co/v1/pdf/supported_banks \
--header 'x-client-id: SOME_STRING_VALUE'\
--header 'x-client-secret: SOME_STRING_VALUE'
200 Successful Response

Response sample


{
"status":"Success",
"statusDescription":"statusDescription",
"body":[
"body"
]
}
undefinedundefined