Design / Financial Account Use Cases / List All Financial Accounts for a Recipient
List All Financial Accounts for a Recipient
Overview
In this use case, we’ll walk through retrieving all Financial Accounts linked to a Recipient Account. The response includes details for each Financial Account, including details for the card or bank account linked to the Financial Account.
Tip For more information about the types of accounts you’ll work with on the RocketKOR platform, see About RocketKOR Accounts.
API Operation
Steps
Send a request to the following endpoint:
GET /api/external/recipients/{recipientId}/financial-accounts
- Use the {recipientId} path parameter to specify the Recipient Account ID. All Financial Accounts belonging to this Recipient Account will be retrieved.
- Filter the results based on the Financial Account type and state.
- Use the sort query parameter to sort the results.
- Use the page and size query parameters to limit the number of results returned.
- Request body is not required.
- Include a Basic Auth Authorization header where the username is your API key ID and the password is your API key secret.
Sample Response
Returns a paginated response with an array of Financial Account objects. Details are returned for each Financial Account.
In the following example, two Financial Accounts have been retrieved for the Recipient Account: a bank account and a debit card.
{
"totalElements": 100,
"totalPages": 50,
"number": 1,
"numberOfElements": 2,
"hasNext": true,
"content": [
{
"id": "6a017f06-83a3-44b7-be6f-5e5cae4a9ed7",
"createdAt": "2021-07-08T21:10:51.610Z",
"updatedAt": "2021-07-08T21:10:51.610Z",
"name": "Checking Account",
"accountId": "4py56a34-4686-1539-c2ga-1a723g55dlq3",
"accountIdType": "RECIPIENT",
"defaultFlag": true,
"state": "ACTIVE",
"financialInstitutionId": "8th32z87-3845-9810-v7gu-1f827g98swk3",
"financialInstitutionName": "CIBC",
"ledgerIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"bankAccount": {
"id": "7wu45p35-2178-3098-x6wg-2s749k37alk2",
"token": "2av81w47-9367-1295-h4ng-1q520p28wfn1",
"type": "CHECKING",
"accountNumberTail": "4523"
}
},
{
"id": "1wl83a98-1243-6856-g3sg-2s680s13pkm3",
"createdAt": "2021-07-08T21:10:51.610Z",
"updatedAt": "2021-07-08T21:10:51.610Z",
"name": "Debit Card",
"accountId": "5ws94h37-1792-6523-r3jn-9z754i34kin5",
"accountIdType": "RECIPIENT",
"defaultFlag": false,
"state": "ACTIVE",
"financialInstitutionId": "9qw98h31-3978-2498-g2ko-8w965t32kwe6",
"financialInstitutionName": "CIBC",
"ledgerIds": [
"4hy47a98-2453-9867-u3qa-5p347q98kim4"
],
"card": {
"id": "9kj43t32-2956-2886-x7dy-6r821w39kra3",
"token": "8hb21a87-3985-9217-a6zq-5y643x47hsa7",
"type": "DEBIT",
"cardNumberTail": "6999"
}
}
]
}