EDGE Monitor - Starter Guide
Overview
Welcome to the developer documentation for the EDGE Monitor Product.
EDGE Monitor performs daily refreshes of connected bank accounts, providing insights based on the most recent balance and transaction data. This guide outlines how to effectively integrate and utilize EDGE Monitor.
Prerequisites
Before you begin, ensure you have:
- An API key for accessing the EDGE platform
- Integration with the EDGE platform to acquire consumers’ bank transaction data
- A subscription to the EDGE Monitor product configured
Overview of the APIs and Webhooks
The following actions are supported by the EDGE Monitor product:
API Action | Description |
---|---|
Subscribe Consumers | Subscribe consumers to the EDGE Monitor product for daily refreshes. |
Unsubscribe Consumers | Unsubscribe consumers from EDGE Monitor. |
Retrieve Subscriptions | Get the list of consumers subscribed to EDGE Monitor. |
Event Alerts | Receive webhook alert in response to EDGE Monitor event. |
Retrieve EDGE Monitor Report | Retrieve detailed balance and transaction reports. |
Detailed API Information
Use the POST method on the following endpoint to subscribe consumers to the EDGE Monitor product:
POST https://ninjafetch.com/api/v1/subscriptions
Headers:
x-api-key: [your_api_key]
Accept: application/json
Request Example:
{
"ids": ["11222", "11223"],
"action": "subscribe",
"product": "edgemonitor"
}
Fields | Input |
---|---|
ids | Valid consumer IDs that were submitted in the product requests for connecting bank accounts. Use commas to separate multiple consumer IDs when subscribing multiple consumers. |
action | subscribe |
product | edgemonitor |
By default, new consumers are automatically subscribed to the EDGE Monitor product upon establishing a connection with their bank accounts. Manual subscription via the API is also supported if the customer prefers to subscribe only those consumers who meet certain criteria. In this case, automatic subscription will be turned off.
Response Example (200)
{
"results": [
{
"id": "11222",
"status": "subscribed",
"message": "Success",
"connection_link": "",
"last_data_pull_performed_at": "timestamp",
"last_data_pull_status": "pulled",
},
{
"id": "11223",
"status": "subscribed_connection_expired",
"message": "Connection is no longer valid",
"connection_link": "https://ninjafetch.com/connect/de9a61a1edc38414755c",
"last_data_pull_performed_at": "TIMESTAMP",
"last_data_pull_status": "error"
}
]
}
Supported Subscription Statuses
Status | Message | Description |
---|---|---|
subscribed | Success | The consumer was successfully subscribed. |
subscribed_connection_expired | Connection is no longer valid | The consumer was subscribed, but the connection is no longer valid. A connection link will be provided in this case, allowing the consumer to reconnect the bank account using the link. |
consumer_not_found | Consumer does not exist | No consumer was found for the given ID. |
Supported Last Data Pull Statuses
Status | Description |
---|---|
pending | Data pull in progress |
pulled | Data pull was successful |
error | Data pull failed due to an error |
Use the POST method on the following endpoint to unsubscribe consumers from the EDGE Monitor product:
POST https://ninjafetch.com/api/v1/subscriptions
Headers:
x-api-key: [your_api_key]
Accept: application/json
Request Example:
{
"ids": ["11222","11223"],
"action": "unsubscribe",
"product": "edgemonitor"
}
Fields | Input |
---|---|
ids | Valid consumer IDs that were used to subscribe to the EDGE Monitor product. You can use commas to separate multiple consumer IDs when unsubscribing multiple consumers. |
action | unsubscribe |
product | edgemonitor |
Response Example (200)
{
"results": [
{
"id": "11222",
"status": "unsubscribed",
"message": "Subscription removed",
"removed_at": "TIMESTAMP"
},
{
"id": "11223",
"status": "consumer_not_found",
"message": "Consumer does not exist",
"removed_at": "TIMESTAMP"
}
]
}
Supported Statuses
Status | Message | Description |
---|---|---|
unsubscribed | Subscription removed | The consumer was successfully unsubscribed. |
consumer_not_found | Consumer does not exist | No consumer was found for the given ID. |
Use the GET method on the following endpoint to retrieve the list of consumers who are subscribed to the EDGE Monitor product:
GET https://ninjafetch.com/api/v1/subscriptions
Headers:
x-api-key: [your_api_key]
Accept: application/json
Request Example:
{
"status": "subscribed", *optional field
"product": "edgemonitor"
}
Supported statuses:
Status |
---|
subscribed |
unsubscribed |
subscribed_connection_expired |
The API will return the list of consumers that have subscribed to the EDGE Monitor product based on the status, if the optional status field was included in the request payload. Otherwise, the API will return the list of all subscribed consumers.
Response Example (200)
{
"product": "edgemonitor",
"results": [
{
"id": "11222",
"status": "subscribed",
"message": "Success",
"connection_link": "",
"last_data_pull_performed_at": "TIMESTAMP",
"last_data_pull_status": ""
}
]
}
Supported Subscription Statuses
Status | Message | Description |
---|---|---|
subscribed | Success | The consumer was successfully subscribed. |
subscribed_connection_expired | Connection is no longer valid | The consumer was subscribed, but the connection is no longer valid. A connection link will be provided in this case, allowing the consumer to reconnect the bank account using the link. |
consumer_not_found | Consumer does not exist | No consumer was found for the given ID. |
Supported Last Data Pull Statuses
Status | Description |
---|---|
pending | Data pull in progress |
pulled | Data pull was successful |
error | Data pull failed due to an error |
Response Example (401)
A 401 response indicates that the request payload failed validation.
{
"message": "Actual error message",
"tracking_id": "<A unique id for tracking purpose>"
}
Event Alerts
Set Up Webhooks
To receive webhooks, set up an API endpoint that is reachable by the EDGE platform. The EDGE platform supports API authentication in the header. Please provide the endpoint and authentication details to the EDGE team. If the customer wishes to whitelist the EDGE server for webhooks, the IP address is 18.191.8.81.
EDGE Monitor can send Webhook callbacks based on the following events:
Event | Description | Details |
---|---|---|
account_refresh_success | Indicates that a data refresh was successful for the consumer. | Each subscribed consumer will receive a dedicated webhooks callback. The product request ID included in the response will be used to retrieve the EDGE Monitor report. |
account_refresh_failed | Indicates that a data refresh was unsuccessful for the consumer. | A connection link will be included in the response. The customer can send the connection link to the consumer to reestablish the connection. |
account_alert | Indicates that one or more account alerts are triggered. | All alerts for the same consumer are grouped together. Customers can choose to receive all alerts or a subset of alerts. This configuration needs to be performed by the team. |
Supported account alerts:
Alert Name | Description |
---|---|
Negative balance | Account balance changes from positive to negative |
Current balance recovery | Account in the negatives reaches a current balance over $100 |
Available balance recovery | Account in the negatives reaches an available balance over $100 |
Large deposit | New deposit in the account for over $100 |
Account object details
The account_alert webhook payload contains a single field named accounts, which contains an array of accounts that triggered alerts. Every account object consists of the following:
Field | Description |
---|---|
account_name | Name of account |
account_type | Account type (checking, savings, etc.) |
account_number | Masked account number |
items | An array of triggered alerts and their metadata |
Response Examples:
account_refresh_success:
{
"consumer_id": "12345",
"event": "account_refresh_success",
"last_refreshed_at": "<timestamp>",
"product_request_id": "IBVB0D967AB40AEFF8E62B0"
}
account_refresh_failed:
{
"consumer_id": "12345",
"event": "account_refresh_failed",
"attempted_at": "<timestamp>",
"message": "Connection invalid. Use the connection link to reconnect.",
"ibv_connection_link": "<https://ninjafetch.com/connect/438da2e3b1b3211e8d4a899c2ee66a6">
}
account_alert:
{
"consumer_id": "12345",
"event": "account_alert",
"time": "<timestamp>",
"accounts": [
{
"account_name": "Checking Plus",
"account_type": "CHECKING",
"account_number": "xxxx4197",
"items": [
{
"rule_id": "79dc3e25-2572-45bf-8c0d-e26fb9c0b19f",
"alert_name": "Current balance recovery",
"result": true
},
{
"rule_id": "06232f01-ed4b-43de-8d38-9e23b55aed71",
"alert_name": "Available balance recovery",
"result": true
},
{
"rule_id": "3192fdda-9141-4f67-acb2-88c2a97c1b03",
"alert_name": "Large Deposit Alert",
"result": [
{
"is_pending": false,
"memo": "Interest Payment",
"value": "250.0",
"category": "Interest"
}
]
}
]
}
]
}
Retrieve EDGE Monitor Report
After receiving a webhook notification, use the GET method on the following endpoint to download the EDGE Monitor report:
GET <https://ninjafetch.com/api/v1/ibv/requests/><product_request_id>
Headers:
x-api-key: [your_api_key]
Accept: application/json
Fields | Input |
---|---|
product_request_id | The unique identifier of the product request associated with your subscription |
Updated about 1 month ago