List Bank Accounts by Customer

Use the List Bank Accounts by Customer API endpoint to retrieve a paginated list of bank accounts associated with a customer.

📘

Important

Certain Credit API endpoints are in a draft status and are subject to change without notice. Thredd may modify interfaces, behaviour, and documentation as development continues.

The List Bank Accounts by Customer endpoint enables you to retrieve all bank accounts linked to a customer's profile in the loan management system. Results are returned in descending order of creation date and support cursor-based pagination.

📘

More Information

For more information about the Bank Account endpoints, see: Bank Accounts.

Example Request

Retrieve bank accounts for a customer by making a GET request to the List Bank Accounts by Customer endpoint.

GET {{baseUrl}}/api/v1/credit/bank-account/customer/{customer_id}

Path Parameters

ParameterDescription
customer_idstring. Required. The unique identifier of the customer (Thredd Account Holder ID).

Query Parameters

ParameterDescription
pageSizeinteger. Optional. The number of results to return per page. Default is 50.
pageTokenstring. Optional. The cursor token for the next page of results. Pass the nextPageToken value returned in the previous response.

Example Response

A successful request returns a 200 HTTP status code with a paginated list of bank accounts.

{
  "results": [
    {
      "bankAccountId": "ba_123456",
      "accountTitle": "Jane's Checking",
      "accountType": "checking",
      "createdAt": "2025-01-15",
      "accountLastDigits": "6789",
      "routingNumber": "021000021",
      "bankName": "First National Bank",
      "customerName": "Jane Smith"
    }
  ],
  "nextPageToken": null
}
{
  "detail": "Customer mapping not found."
}

Response Fields

Bank Accounts Response Object

AttributeDescription
resultsarray. A list of bank accounts associated with the customer. See Bank Account Object.
nextPageTokenstring or null. The cursor token to retrieve the next page of results. Pass this value as the pageToken query parameter in the next request. null if there are no further pages.

Bank Account Object

AttributeDescription
bankAccountIdstring. The unique identifier of the bank account.
accountTitlestring. The title of the bank account.
accountTypestring. The type of bank account. Possible values: checking, savings.
createdAtstring. The date the bank account was created.
accountLastDigitsstring. The last digits of the bank account number.
routingNumberstring. The routing number of the bank account.
bankNamestring. The name of the bank.
customerNamestring. The name of the customer associated with the bank account.

Error Messages

If there is a problem with the request, the response returns one of the following errors:

  • 404 — The customer ID provided does not match an existing customer.
  • 422 — A required field or its value is missing or invalid. The response includes details of the validation failure.

Did this page help you?