Get Available Financial Accounts for Subprofile
The GET /api/subProfiles/availableFinancialAccounts endpoint retrieves a comprehensive list of financial accounts associated with the authenticated user or a specified authorized user (subprofile). Each account record includes account type, balance details, status, ledger data, and direct deposit information. This endpoint is designed to support display and management of financial assets within banking applications.
Endpoint
GET /api/subProfiles/availableFinancialAccounts
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint to populate a list of financial accounts visible to or assigned to a subprofile (authorized user) in a business customer context. This is useful when building account-selection flows for authorized users, verifying which accounts a subprofile can access, or displaying account balances and statuses in a dashboard view.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| subUserId | integer (int32) | No | The internal ID of the subprofile (authorized user) whose available financial accounts should be retrieved. If omitted, accounts for the authenticated user are returned. |
Response
200 OK
Returns an array of financial account model objects.
Top-level array item fields (financialaccountmodel):
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the financial account. |
| name | string | Display name of the financial account. |
| created | string (date-time) | Timestamp when the account was created. |
| directDeposit | object | Direct deposit details for the account (see below). |
| accountStatus | string | Current status of the account (e.g., ACTIVE, SUSPENDED). |
| cashInProcess | object | Amount currently being processed (value + currencyCode). |
| ledgers | array | List of ledgers attached to the account (see ledger fields below). |
| cardProduct | object | Card product associated with the account. |
| partnerName | string | Name of the partner associated with this account. |
| isLockAccount | boolean | Indicates whether the account is locked. |
| isProductFundingAccount | boolean | Indicates whether this account is used as a product funding account. |
directDeposit object fields:
| Field | Type | Description |
|---|---|---|
| id | string | Direct deposit record identifier. |
| restrictedDetails.typename | string | Type name of the direct deposit. |
| restrictedDetails.number | string | Account number used for direct deposit. |
| restrictedDetails.routingNumber | string | Routing number used for direct deposit. |
ledger object fields:
| Field | Type | Description |
|---|---|---|
| id | string | Ledger identifier. |
| name | string | Ledger display name. |
| creditBalance | object | Credit balance amount (value + currencyCode). |
| debitBalance | object | Debit balance amount (value + currencyCode). |
| normalBalance | string | Normal balance direction (DEBIT or CREDIT). |
| asOf | string (date-time) | Timestamp of the balance snapshot. |
| ledgerEntries | object | Paginated list of ledger entries (pageInfo + edges). |
amount object fields (used in cashInProcess, creditBalance, debitBalance):
| Field | Type | Description |
|---|---|---|
| value | integer (int64) | Monetary amount in the smallest currency unit (e.g., cents). |
| currencyCode | string | ISO 4217 currency code (e.g., USD). |
[
{
"id": "fa_abc123def456",
"name": "Business Checking",
"created": "2024-03-15T10:30:00Z",
"directDeposit": {
"id": "dd_xyz789",
"restrictedDetails": {
"typename": "DIRECT_DEPOSIT",
"number": "XXXXXXXXXX",
"routingNumber": "021000021"
}
},
"accountStatus": "ACTIVE",
"cashInProcess": {
"value": 5000,
"currencyCode": "USD"
},
"ledgers": [
{
"id": "ledger_001",
"name": "Available Balance",
"creditBalance": {
"value": 150000,
"currencyCode": "USD"
},
"debitBalance": {
"value": 0,
"currencyCode": "USD"
},
"normalBalance": "CREDIT",
"asOf": "2024-06-08T12:00:00Z",
"ledgerEntries": {
"pageInfo": {
"startCursor": "cursor_start",
"endCursor": "cursor_end",
"hasNextPage": false,
"hasPreviousPage": false
},
"edges": []
}
}
],
"cardProduct": {
"typename": "CardProduct",
"id": "cp_111aaa",
"name": "Business Visa",
"usage": "CONSUMER",
"vertical": "BUSINESS",
"commercial": true
},
"partnerName": "Netevia",
"isLockAccount": false,
"isProductFundingAccount": false
}
]Error Codes
| Code | When it happens |
|---|---|
| 400 | The subUserId query parameter is malformed or contains an invalid value. |
| 401 | Token missing, expired, or invalid. |
| 403 | Insufficient permissions to view financial accounts for the specified subprofile. |
| 404 | The specified subprofile or its associated financial accounts were not found. |
| 500 | Internal server error. |
Common Mistakes
- Passing a
subUserIdthat belongs to a subprofile on a different business account will result in a 403 or 404 error. - Financial accounts returned may include locked accounts (
isLockAccount: true); always checkaccountStatusandisLockAccountbefore allowing a subprofile to perform transactions. - Balance amounts are returned in the smallest currency unit (e.g., cents). A
valueof150000withcurrencyCode: "USD"equals $1,500.00. - This endpoint is only applicable to business customers with subprofiles. Personal customers do not have subprofile authorized users.
Related Endpoints
GET /api/subProfiles— Retrieve all subprofiles (authorized users) for the authenticated business customer.POST /api/subProfiles— Create a new subprofile (authorized user) for a business customer.GET /api/financialAccounts— Retrieve all financial accounts for the authenticated user.PATCH /api/subProfiles/{subProfileId}— Update access level or account assignments for a subprofile.
Example
curl -X GET "https://api.banking.netevia.dev/api/subProfiles/availableFinancialAccounts?subUserId=4821" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"