Retrieve account information
In this tutorial, you’ll learn how to retrieve consented accounts and their details using the J.P. Morgan Business Direct Connect API. By the end of this tutorial, you’ll know how to:
- Retrieve a lightweight list of consented accounts.
- Retrieve available account details, including balance information.
Before you begin
To use this capability, you will need to have:
- Complete onboarding and obtain client credentials.
- Complete the consent flow and obtain 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 lightweight account list:
Send a
GETrequest to the/accountsendpoint. SetresultTypetolightweight, or omit the parameter becauselightweightis the default. The response contains minimal descriptive information and anaccountIdfor each returned account.Retrieve details for a specific account:
Use the
accountIdreturned by theaccount-listrequest to send aGETrequest to/accounts/{accountId}. The response contains full details for the identified account, which may include available balance information.
Call sequence 2: Retrieve all account details at once
- Send a
GETrequest to the/accountsendpoint and setresultTypeto details. The response contains detailed information for the returned consented accounts and may include available balance information.
Retrieve additional account results
The /accounts endpoint may return paginated results.
- Use either
offsetorpageKey to navigate account results. Don’t include both parameters in the same request. - Use the pagination information and links in the response to retrieve additional results.
- Use
limitto specify the requested number of accounts per page. The maximum supported value for/accountsis500.
Request and response details
A successful response returns consented accounts with either lightweight descriptive information or detailed account information, depending on the resultType value and endpoint you use. The response may be paginated.
For details on required and optional parameters, error codes, response formats, and request and response examples, refer to the API specification.