Developer Programs

Learn

Docs

Accounts and Transactions

Consumer API > Guides > Accounts and Transactions

This guide walks you through retrieving 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. It’s worth noting that the Identity Token is separate from the Access Token.

Requests

GET /users/{user_id}/accounts

curl accounts
curl https://{CONSUMER_API_ENVIRONMENT}/a/consumer/api/{API_VERSION}/users/{user_id}/accounts \
    -H "Authorization: Bearer {access_token}"

Where:

  • CONSUMER_API_ENVIRONMENT is specific to your financial institution and matches with Banno Online for your institution.
    • Example: for the Garden demo institution the CONSUMER_API_ENVIRONMENT would be digital.garden-fi.com.
  • API_VERSION: API Version (ie. v0)
  • user_id: The User ID of the user you would like to access data for
  • access_token: Your access token

Response

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 an id that can be used in the next request to get transaction data for that account; we will use the id parameter as the account_id in subsequent requests.

There will also be a fetchedDate parameter for each account to note when the last fetch was performed.

accounts response
{
    "accounts": [{
        "id": "5436560d-33d9-4c18-b524-e27890cd6127",
        "fetchedDate": "2021-01-14T12:13:07.922Z",
        ...
    }],
    "inactivatedAccountIds": []
}

GET /users/{user_id}/accounts/{account_id}/transactions

curl transactions
curl https://{CONSUMER_API_ENVIRONMENT}/a/consumer/api/{API_VERSION}/users/{user_id}/accounts/{account_id}/transactions \
    -H Authorization: Bearer {access_token}

Where:

  • CONSUMER_API_ENVIRONMENT is specific to your financial institution and matches with Banno Online for your institution.
    • Example: for the Garden demo institution the CONSUMER_API_ENVIRONMENT would be digital.garden-fi.com.
  • API_VERSION: API Version (ie. v0)
  • user_id: The User ID of the user you would like to access data for
  • account_id: The account ID from the previous request
  • access_token: Your access token

Response

The transactions endpoint will return an array of transactions for the specific account.

There will also be a lastUpdated parameter for each transaction to note when the last fetch was performed.

transactions response
{
    "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.


Have a Question?
Have a how-to question? Seeing a weird error? Get help on StackOverflow.
Register for the Digital Toolkit Meetup where we answer technical Q&A from the audience.
Last updated Mon Nov 20 2023