# BankAccount

> **Accessing Bank Accounts through Banking API**
> 
> This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. 
> 
> To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/banking-api#/schemas/Account)

> View the coverage for bank accounts in the <a className="external" href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts" target="_blank">Data coverage explorer</a>.

## Overview

A list of bank accounts associated with a company and a specific data connection.

Bank accounts data includes:
* The name and ID of the account in the accounting platform.
* The currency and balance of the account.
* The sort code and account number.


## Fields

| Field                                                                                                                                                                                                                                                                                                                                                                                                | Type                                                                                                                                                                                                                                                                                                                                                                                                 | Required                                                                                                                                                                                                                                                                                                                                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                          | Example                                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountName`                                                                                                                                                                                                                                                                                                                                                                                        | *string*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | Name of the bank account in the accounting platform.                                                                                                                                                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `accountNumber`                                                                                                                                                                                                                                                                                                                                                                                      | *string*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | Account number for the bank account.<br/><br/>Xero integrations<br/>Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.<br/><br/>FreeAgent integrations<br/>For Credit accounts, only the last four digits are required. For other types, the field is optional. |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `accountType`                                                                                                                                                                                                                                                                                                                                                                                        | [shared.BankAccountType](../../../sdk/models/shared/bankaccounttype.md)                                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | The type of transactions and balances on the account.  <br/>For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.  <br/>For Debit accounts, positive balances are assets, and positive transactions **increase** assets.                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `availableBalance`                                                                                                                                                                                                                                                                                                                                                                                   | *number*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example.                                                                                                                                                                                                                                    |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `balance`                                                                                                                                                                                                                                                                                                                                                                                            | *number*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | Balance of the bank account.                                                                                                                                                                                                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `currency`                                                                                                                                                                                                                                                                                                                                                                                           | *string*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.<br/><br/>## Unknown currencies<br/><br/>In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. <br/><br/>There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP                                                                                                                                                                                                                                                                                                                                                                                                  |
| `iBan`                                                                                                                                                                                                                                                                                                                                                                                               | *string*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | International bank account number of the account. Often used when making or receiving international payments.                                                                                                                                                                                                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `id`                                                                                                                                                                                                                                                                                                                                                                                                 | *string*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | Identifier for the account, unique for the company in the accounting platform.                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `institution`                                                                                                                                                                                                                                                                                                                                                                                        | *string*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | The institution of the bank account.                                                                                                                                                                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `metadata`                                                                                                                                                                                                                                                                                                                                                                                           | [shared.Metadata](../../../sdk/models/shared/metadata.md)                                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `modifiedDate`                                                                                                                                                                                                                                                                                                                                                                                       | *string*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                                                                                                                                                  | 2022-10-23 00:00:00 +0000 UTC                                                                                                                                                                                                                                                                                                                                                                        |
| `nominalCode`                                                                                                                                                                                                                                                                                                                                                                                        | *string*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | Code used to identify each nominal account for a business.                                                                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `overdraftLimit`                                                                                                                                                                                                                                                                                                                                                                                     | *number*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | Pre-arranged overdraft limit of the account.<br/><br/>The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `sortCode`                                                                                                                                                                                                                                                                                                                                                                                           | *string*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | Sort code for the bank account.<br/><br/>Xero integrations<br/>The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.                                                                                                                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                      |
| `sourceModifiedDate`                                                                                                                                                                                                                                                                                                                                                                                 | *string*                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                                                                                                                                                  | 2022-10-23 00:00:00 +0000 UTC                                                                                                                                                                                                                                                                                                                                                                        |
| `supplementalData`                                                                                                                                                                                                                                                                                                                                                                                   | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md)                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                   | Supplemental data is additional data you can include in our standard data types. <br/><br/>It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.                                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                      |