Bank Accounts API
The Bank Accounts API provides read-only access to bank account information, including account details, routing information, and balances. This endpoint is used to retrieve accounts that can be used for payment profiles.
Endpoints
- List Bank Accounts -
GET /api/v1/companies/{company_id}/bank_accounts - Get Bank Account -
GET /api/v1/companies/{company_id}/bank_accounts/{id}
List Bank Accounts
Retrieve all bank accounts for a company.
Endpoint
Headers
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page |
integer | No | Page number (default: 1) |
per_page |
integer | No | Items per page (default: 25) |
Example Request
curl -X GET "https://api.treasurypath.com/api/v1/companies/Z2lkOi8vd2FsbGV0LWFwcC9Db21wYW55LzE/bank_accounts" \
-H "Authorization: Bearer {jwt_token}"
Success Response (200 OK)
{
"data": [
{
"account_details": [
{
"account_number_mask": "************0000",
"account_number_type": "other",
"created_at": "2025-08-29T23:57:21.805Z",
"id": "Z2lkOi8vd2FsbGV0LWFwcC9BY2NvdW50RGV0YWlsLzE",
"updated_at": "2025-08-29T23:57:21.805Z"
}
],
"created_at": "2025-08-29T23:57:20.203Z",
"currency": "USD",
"current_balance": "0.0",
"id": "Z2lkOi8vd2FsbGV0LWFwcC9CYW5rQWNjb3VudC8y",
"last_synced_at": null,
"owner_id": "Z2lkOi8vd2FsbGV0LWFwcC9FbnRpdHkvMQ",
"owner_type": "Entity",
"party_address": null,
"payment_profiles": [
{
"created_at": "2025-08-29T23:57:21.855Z",
"currency": "USD",
"id": "Z2lkOi8vd2FsbGV0LWFwcC9QYXltZW50UHJvZmlsZS8x",
"payment_method": "ach",
"status": "active",
"updated_at": "2025-08-29T23:57:21.855Z",
"usage_type": "debit"
},
{
"created_at": "2025-08-29T23:57:21.873Z",
"currency": "USD",
"id": "Z2lkOi8vd2FsbGV0LWFwcC9QYXltZW50UHJvZmlsZS8y",
"payment_method": "ach",
"status": "draft",
"updated_at": "2025-08-29T23:57:21.873Z",
"usage_type": "credit"
}
],
"routing_details": [
{
"bank_name": null,
"created_at": "2025-08-29T23:57:21.841Z",
"id": "Z2lkOi8vd2FsbGV0LWFwcC9Sb3V0aW5nRGV0YWlsLzE",
"payment_method": "ach",
"routing_number": "011401533",
"routing_number_type": "aba",
"updated_at": "2025-08-29T23:57:21.841Z"
}
],
"updated_at": "2025-08-29T23:57:20.203Z"
}
],
"meta": {
"total_records": 21,
"total_pages": 2,
"current_page": 1,
"per_page": 20
},
"links": {
"first": "https://api.treasurypath.com/api/v1/companies/comp_1234567890abcdef/bank_accounts?page=1&per_page=20",
"prev": null,
"next": "https://api.treasurypath.com/api/v1/companies/comp_1234567890abcdef/bank_accounts?page=2&per_page=20",
"last": "https://api.treasurypath.com/api/v1/companies/comp_1234567890abcdef/bank_accounts?page=2&per_page=20"
}
}
Get Bank Account
Retrieve details for a specific bank account.
Endpoint
Headers
URL Parameters
| Parameter | Type | Description |
|---|---|---|
id |
string | Bank account ID |
Example Request
curl -X GET "https://api.treasurypath.com/api/v1/companies/comp_1234567890abcdef/bank_accounts/ba_1234567890abcdef" \
-H "Authorization: Bearer {jwt_token}"
Success Response (200 OK)
{
"data": {
"account_details": [
{
"account_number_mask": "************0000",
"account_number_type": "other",
"created_at": "2025-08-29T23:57:21.805Z",
"id": "Z2lkOi8vd2FsbGV0LWFwcC9BY2NvdW50RGV0YWlsLzE",
"updated_at": "2025-08-29T23:57:21.805Z"
}
],
"created_at": "2025-08-29T23:57:20.203Z",
"currency": "USD",
"current_balance": "0.0",
"id": "Z2lkOi8vd2FsbGV0LWFwcC9CYW5rQWNjb3VudC8y",
"last_synced_at": null,
"owner_id": "Z2lkOi8vd2FsbGV0LWFwcC9FbnRpdHkvMQ",
"owner_type": "Entity",
"party_address": null,
"payment_profiles": [
{
"created_at": "2025-08-29T23:57:21.855Z",
"currency": "USD",
"id": "Z2lkOi8vd2FsbGV0LWFwcC9QYXltZW50UHJvZmlsZS8x",
"payment_method": "ach",
"status": "active",
"updated_at": "2025-08-29T23:57:21.855Z",
"usage_type": "debit"
},
{
"created_at": "2025-08-29T23:57:21.873Z",
"currency": "USD",
"id": "Z2lkOi8vd2FsbGV0LWFwcC9QYXltZW50UHJvZmlsZS8y",
"payment_method": "ach",
"status": "draft",
"updated_at": "2025-08-29T23:57:21.873Z",
"usage_type": "credit"
}
],
"routing_details": [
{
"bank_name": null,
"created_at": "2025-08-29T23:57:21.841Z",
"id": "Z2lkOi8vd2FsbGV0LWFwcC9Sb3V0aW5nRGV0YWlsLzE",
"payment_method": "ach",
"routing_number": "011401533",
"routing_number_type": "aba",
"updated_at": "2025-08-29T23:57:21.841Z"
}
],
"updated_at": "2025-08-29T23:57:20.203Z"
}
}
Error Response (404 Not Found)
{
"errors": [
{
"field": "id",
"message": "Bank Account not found or not accessible in this workspace"
}
]
}
Response Fields
Bank Account Fields
| Field | Type | Description |
|---|---|---|
id |
string | Unique bank account identifier |
currency |
string | Currency code of the account |
current_balance |
decimal | Current balance amount |
owner_id |
string | ID of the owner (Entity or Counterparty) |
owner_type |
string | Type of owner (Entity or Counterparty) |
last_synced_at |
string | Last time account data was synced |
created_at |
string | Timestamp when the account was created |
updated_at |
string | Timestamp when the account was last updated |
Account Details
Information about the account number:
| Field | Type | Description |
|---|---|---|
id |
string | Unique identifier for the account detail |
account_number_mask |
string | Masked account number for security |
account_number_type |
string | Type of account number (other, iban) |
created_at |
string | Timestamp when the detail was created |
updated_at |
string | Timestamp when the detail was last updated |
Routing Details
Banking routing information:
| Field | Type | Description |
|---|---|---|
id |
string | Unique identifier for the routing detail |
bank_name |
string | Name of the bank |
routing_number |
string | Bank routing number |
routing_number_type |
string | Type of routing number (aba, swift, etc.) |
payment_method |
string | Supported payment method (ach, swift, etc.) |
created_at |
string | Timestamp when the routing detail was created |
updated_at |
string | Timestamp when the routing detail was last updated |
Payment Profiles
Payment profiles associated with the bank account:
| Field | Type | Description |
|---|---|---|
id |
string | Unique identifier for the payment profile |
status |
string | Status of the payment profile (active, draft) |
currency |
string | Currency code for the payment profile |
payment_method |
string | Payment method (ach, balance, etc.) |
usage_type |
string | Usage type (debit, credit, internal_account) |
created_at |
string | Timestamp when the profile was created |
updated_at |
string | Timestamp when the profile was last updated |
Routing Number Types
Supported routing number types:
- aba: US ABA routing number
- swift: SWIFT/BIC code
- bsb: Australian BSB code
- sort_code: UK sort code
- transit_number: Canadian transit number
- institution_number: Canadian institution number
- branch_code: Branch code for various countries
- bank_code: Bank code for various countries
Error Handling
Common error scenarios: - 401 Unauthorized: Invalid or missing JWT token - 403 Forbidden: Insufficient permissions - 404 Not Found: Bank account not found or not accessible - 500 Internal Server Error: Server error
Rate Limiting
Bank account API calls are subject to standard rate limiting policies.
Usage Notes
- Read-only: This API provides read-only access to bank account information
- Company scoped: All accounts are filtered by the specified company
- Masked data: Sensitive information like full account numbers are masked
- Balance accuracy: Balances reflect the most recent sync with financial institutions
- Currency conversion: USD amounts are calculated using current exchange rates