Skip to main content
J.P. Morgan Business Direct Connect

Retrieve account transactions

In this tutorial, you’ll learn how to use the J.P. Morgan Business Direct Connect API to retrieve transactions for a specific consented account. By the end of this tutorial, you’ll know how to:

  • Retrieve a lightweight list of consented accounts.
  • Retrieve transactions for a specific account and date range.
  • Retrieve additional pages of transaction results.

Before you begin

To use this capability, you'll need to:

  • Complete onboarding and obtain client credentials.
  • Complete the consent flow and obtain a valid access token.

Send a request

To retrieve transactions for consented accounts, follow these steps:

  • Retrieve a lightweight account list 

    Send a GET request to the /accounts endpoint. Set resultType to lightweight, or omit the parameter because lightweight is the default. The response contains minimal descriptive information and an accountId for each returned account.

  • Retrieve transactions for an account

    Use the accountId returned by the account-list request to send a GET request to /accounts/{accountId}/transactions. Replace {accountId} with the identifier for the account you want to query.

Fetch transactions for a given date range

Specify the date range using one of the following parameter pairs. You can use only one pair at a time.

To specify a date range, use one of the following parameter pairs.
Parameter pair Format Example Notes
startTime + endTime ISO 8601 timestamp 2024-01-01T00:00:00Z Supports date and time values.
startDate + endDate yyyy-MM-dd 2024-01-01 Available starting in FDX v6.5.

Rules and behavior

  • You must provide a start value (startTime or startDate).
  • If you omit the corresponding end value (endTime or endDate), the API defaults it to the previous day.
  • The start value must be less than or equal to the end value.
    • Otherwise, the API returns Invalid Date Range (code 703, HTTP 400).
  • The startDate/endDate and startTime/endTime parameter pairs are mutually exclusive.
    • If you specify both pairs in the same request, the API returns Invalid Input (code 401, HTTP 400) with the message: 
Note

Cannot specify both startDate/endDate and startTime/endTime parameters.

  • If the date range includes future dates, the response may be empty because future posted transactions don't exist.

Handle pagination

When a response contains multiple pages of results, use the pagination information in the response to retrieve additional records and understand the size of the result set.

Pagination fields

J.P. Business Direct Connect agination fields
Field What it's used for
links.next.href Use this URL to retrieve the next page of results.
links.next.action Shows the HTTP method to use when retrieving the next page. In most cases, this value is GET.
links.next.rel Identifies the relationship of the link. For example, next indicates the next page of results.
links.next.types Shows the expected response content type, such as application/fdx+json.
pageMetadata.totalElements Shows the total number of records available across all pages.

Additional information

  • The page object contains pagination details, including the total number of available records.
  • You don't need to use pageMetadata.nextOffSet, pageMetadata.prevOffSet, or links.prev.href. These fields aren't supported.

Retrieve additional transaction results

Transaction responses are paginated and return a maximum of 100 transactions per page, regardless of the limit value.

To retrieve the next page:

  1. Check the response for links.next.
  2. Use the URL in links.next.href to request the next set of transactions.
  3. Use the HTTP method identified by links.next.action.

The next-page link may also include:

  • links.next.rel, which identifies the link’s relationship to the current response.
  • links.next.types, which identifies the supported response content type.

Don’t use offset or pageKey to paginate transaction results. The transactions endpoint supports forward navigation through response links and doesn’t support a previous-page link.

Request and response details

A successful response returns a paginated list of transactions for the specified account and date range. For details on required and optional parameters, error codes, response formats, and request and response examples, refer to the API specification.

Is this page helpful?