Accounts and Transactions
In this guide, we will walk through how to retrieve accounts and transactions data.
This is useful when you need to retrieve common financial data for a particular user.
Prerequisites
To be successful, you will first need to authenticate and have a valid Access Token. Take a look at the Authentication Quickstart (Command Line) for a walkthrough of how to authenticate.
After authenticating, you will also need to use the token to access the User ID (this is the sub key) -- more documentation about tokens can be found in the Authentication Framework documentation. Worth noting that the Identity Token is separate from the Access Token.
Requests
GET /users/{user_id}/accounts
curl https://{API_ENVIRONMENT}/a/consumer/api/{API_VERSION}/users/{user_id}/accounts \
-H "Authorization: Bearer {access_token}"
API_ENVIRONMENT
: Your Banno environment base URLAPI_VERSION
: API Version (ie.v0
)user_id
: The User ID of the user you would like to access data for-
access_token
: Your access tokenResponse
The
accounts
endpoint will return an array of accounts for the specific user, as well as an array of any inactive accounts. Each account, among other things, will return anid
that can be used in the next request to get transaction data for that account (we will use theid
parameter as theaccount_id
in subsequent requests). There will also be afetchedDate
parameter for each account to note when the last fetch was performed.{ "accounts": [{ "id": "5436560d-33d9-4c18-b524-e27890cd6127", "fetchedDate": "2021-01-14T12:13:07.922Z" ... }], "inactivatedAccountIds": [] }
GET /users/{user_id}/accounts/{account_id}/transactions
curl https://{API_ENVIRONMENT}/a/consumer/api/{API_VERSION}/users/{user_id}/accounts/{account_id}/transactions \
-H "Authorization: Bearer {access_token}"
API_ENVIRONMENT
: Your Banno environment base URLAPI_VERSION
: API Version (ie.v0
)user_id
: The User ID of the user you would like to access data foraccount_id
: The account ID from the previous request-
access_token
: Your access tokenResponse
The
transactions
endpoint will return an array of transactions for the specific account. There will also be alastUpdated
parameter for each transaction to note when the last fetch was performed.{ "transactions": [{ "id": "0e3b1d801eec41701ee2428a840499b5033d50fd", "amount": "-15.00", "lastUpdated": "2020-09-16T00:08:06.303Z", ... }], "inactivatedTransactionIds": [] }
Next Steps
Take a look at specific documentation in the API Reference.
If having real-time data is important to your application, see the Data Refresh guide for how to refresh the data before retrieving.