Embeddable IBV Report
EDGE has a feature called Embeddable Report, which enables users of the Loan Management System (LMS) to access IBV reports directly within the LMS user interface. This IBV report is hosted on the EDGE platform and can be embedded via an iframe. The Embeddable Reports feature is designed to provide a seamless and secure experience for LMS users when interacting with their customers' IBV data.
Step 1: Generate Access Token
To embed a EDGE report within the Loan Management System using an iframe, a temporary access token is required. The Loan Management System can acquire a temporary access token by calling the /auth/tokens API endpoint. It is important to note that the access token has a 30-minute expiration period. After this period, the user must refresh the page to obtain a new token and re-display the report.
Request
POST https://ninjafetch.com/api/v1/auth/tokens
Headers
Name | Description | Example | Required |
---|---|---|---|
x-api-key | A unique key issued during onboarding | 6rprzP8q6b7ulYcLsKz2 | Yes |
Body
Key | Description | Example | Required |
---|---|---|---|
product_request_id | A unique identifier of the product request. It is provided by EDGE through a webhook or API. | IBV420CE406A15E1ABF3B43 | Yes |
type | Type of token that will be generated. Must be "embedded_report_token" for embedding reports. | embedded_report_token | Yes |
Example
curl --location 'https://ninjafetch.com/api/v1/auth/tokens' \
--header 'x-api-key: 575abdebc559433afe6d1e37708342fd8456c' \
--header 'Content-Type: application/json' \
--data '{
"product_request_id": "IBVE3F79627D808246EAB09",
"type": "embedded_report_token"
}'
Response
a) Access Token Issued - HTTP 200
Name | Description | Example | Type |
---|---|---|---|
access_token | A valid access token | eyJhbGciOiJIUzI1NiJ9 | String |
expires_in | The length of time in seconds that the access token is valid for. Default is 1800 for embedded report tokens. | 1800 | String |
b) Bad Request - HTTP 400
Name | Description | Example | Type |
---|---|---|---|
message | The details of the failure | Invalid credentials | String |
fields | Provides a detailed error message for each invalid field | {...} | Object |
c) Unauthorized - HTTP 401
Name | Description | Example | Type |
---|---|---|---|
error | The details of the failure | Invalid credentials | String |
Examples for status code
{
"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRGIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36P6yJV_adQssw5c",
"expires_in"1800
}
{
"message": "Validation error",
"fields": {
"product_request_id": [
"is required for generation of embedded report token"
]
}
}
{
"error": "Invalid token"
}
Step 2: Embed report into iframe
After acquiring the token in step 1, the Loan Management System should append it to the end of the Embeddable Report URL to create a link and use it in an iframe. By rendering the IBV report within the existing user interface, users can easily access critical information.
<iframe src="https://ninjafetch.com/portal/embeddable_reports?token=YOUR_TOKEN">
Updated 6 days ago