Retrieve account information
In this tutorial, you will learn how to retrieve a list of consented accounts and their details using the J.P. Morgan Business Direct Connect API. By the end, you will know how to:
- Retrieve a list of accounts.
- Retrieve account details, such as balances, for each account.
Before you begin
To use this capability, you will need to have:
- Complete onboarding and get client credentials.
- Complete the consent flow and get a valid access token.
Send a request
To retrieve a list of consented accounts and their details, you can use either of the following call sequences:
Call sequence 1: Lightweight account list, then details per account
Retrieve a list of accounts:
Send aGETrequest to the/accountsendpoint, setting theresultTypeparameter to lightweight (or omit the parameter, as it defaults to lightweight). This returns a list of accounts with their associated descriptors.Fetch account details:
For each account, send aGETrequest to the/accounts/{accountId}endpoint to retrieve detailed information, such as balances.
Call sequence 2: Retrieve all account details at once
- Send a
GETrequest to the/accountsendpoint, setting theresultTypeparameter to details. This returns a full list of accounts with associated details, such as balances.
Request and response details
A successful response will return a list of accounts and, depending on the call sequence, either account descriptors or full account details. For details on required and optional parameters, error codes, response formats, and request and response examples, refer to the API specification.