# Codat

Codat is a data sharing and AI insights platform that helps financial institutions build deeper connections with their business customers.

Codat integration replicates data using the [Codat API](https://docs.codat.io/using-the-api/overview).

See the [Schema](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#Schema) section for a list of objects available for replication.

## Preparing for authentication

To access your data, you need to authenticate the connection with your account credentials.

Information noteMake sure that the account you use has read access to the tables you want to fetch.

API keys can only be managed by Administrator or Developer users.

To retrieve your API key:

1. Log into your [Codat](https://authentication.codat.io/u/login/identifier?state=hKFo2SBaZUtqdGh0V0x6c3REejByWnRtRVVBVXFBSFBDSTliZaFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIEJkUTNYQmFrcGphMHFCUFlEVHNpTS1kR3VzVlhyMVM0o2NpZNkgWmxlMUdZMzNCN0djeFlYU3hQZWw0cEl2Q3l5eGZ3eXo) account.
2. Go to Developers &gt; API keys.
3. Copy and paste your API key into a secured file.

## Creating the connection

For more information, see [Connecting to SaaS applications](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/Landing/connecting-web-applications.htm).

1. Fill in the required connection properties.

2. Provide a name for the connection in Connection name.

3. Select Open connection metadata to define metadata for the connection when it has been created.

4. Click Create.

Connection settings

| Setting | Description |
| --- | --- |
| Data gateway | Select a Data Movement gateway if required by your use case.<br><br>Information note<br><br>This field is not available with the Qlik Talend Cloud Starter subscription, as it does not support Data Movement gateway. If you have another subscription tier and do not want to use Data Movement gateway, select None.<br><br>For information on the benefits of Data Movement gateway and use cases that require it, see [Qlik Data Gateway - Data Movement](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Gateways/replication-gateway.htm). |
| Start Date | Enter the date, in the format `MM/DD/YYYY`, from which the data must be replicated from your source to your target. |
| API Key | API key. |
| Use Codat UAT environment | Select this check box to connect your UAT environment. |

## Schema

Information note

Schemas and naming conventions can change from version to version. It is recommended to verify your version before continuing.

Depending on your destination, table and column names may not appear as they are outlined below.

### accounts

The `accounts` table contains info about the accounts in your Codat instance. In Codat, an account is a category used to record accounting transactions for a business.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | id<br><br>companyId |
| **Replication Key** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/accounts-1)<br><br>[Codat API method](https://docs.codat.io/reference/accounts#accounts_list "Opens in new tab: Codat API method") |

accounts table foreign keys

| Join accounts with | on |
| --- | --- |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>accounts.name = bank_accounts.accountName<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>accounts.id = balance_sheets.reports.assets.accountId<br>```<br><br>```<br>accounts.id = balance_sheets.reports.equity.accountId<br>```<br><br>```<br>accounts.id = balance_sheets.reports.liabilities.accountId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>accounts.id = profit_and_loss.reports.costOfSales.accountId<br>```<br><br>```<br>accounts.id = profit_and_loss.reports.expenses.accountId<br>```<br><br>```<br>accounts.id = profit_and_loss.reports.income.accountId<br>```<br><br>```<br>accounts.id = profit_and_loss.reports.otherExpenses.accountId<br>```<br><br>```<br>accounts.id = profit_and_loss.reports.otherIncome.accountId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>accounts.id = bills.lineItems.accountRef.id<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>accounts.id = items.billItem.accountRef.id<br>```<br><br>```<br>accounts.id = items.invoiceItem.accountRef.id<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>accounts.id = journal_entries.journalLines.accountRef.id<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>accounts.name = bank_statement_lines.accountName<br>``` |

accounts table schema

| **companyId**<br><br><br>STRING |
| --- |
| **currency**<br><br><br>STRING |
| **currentBalance**<br><br><br>NUMBER |
| **description**<br><br><br>STRING |
| **fullyQualifiedCategory**<br><br><br>STRING |
| **fullyQualifiedName**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **isBankAccount**<br><br><br>BOOLEAN |
| **modifiedDate**<br><br><br>STRING |
| **name**<br><br><br>STRING |
| **nominalCode**<br><br><br>STRING |
| **sourceModifiedDate**<br><br><br>STRING |
| **status**<br><br><br>STRING |
| **type**<br><br><br>STRING |

### balance\_sheets

The `balance_sheets` table contains info about the balance sheets in your Codat instance. A balance sheet is a snapshot at a point in time of a company’s accounts.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/balance-sheet-2)<br><br>[Codat API method](https://docs.codat.io/reference/financials#financials_balancesheet "Opens in new tab: Codat API method") |

balance\_sheets table foreign keys

| Join balance\_sheets with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#accounts) | ```<br>balance_sheets.reports.assets.accountId = accounts.id<br>```<br><br>```<br>balance_sheets.reports.equity.accountId = accounts.id<br>```<br><br>```<br>balance_sheets.reports.liabilities.accountId = accounts.id<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>balance_sheets.reports.assets.accountId = profit_and_loss.reports.costOfSales.accountId<br>```<br><br>```<br>balance_sheets.reports.equity.accountId = profit_and_loss.reports.costOfSales.accountId<br>```<br><br>```<br>balance_sheets.reports.liabilities.accountId = profit_and_loss.reports.costOfSales.accountId<br>```<br><br>```<br>balance_sheets.reports.assets.accountId = profit_and_loss.reports.expenses.accountId<br>```<br><br>```<br>balance_sheets.reports.equity.accountId = profit_and_loss.reports.expenses.accountId<br>```<br><br>```<br>balance_sheets.reports.liabilities.accountId = profit_and_loss.reports.expenses.accountId<br>```<br><br>```<br>balance_sheets.reports.assets.accountId = profit_and_loss.reports.income.accountId<br>```<br><br>```<br>balance_sheets.reports.equity.accountId = profit_and_loss.reports.income.accountId<br>```<br><br>```<br>balance_sheets.reports.liabilities.accountId = profit_and_loss.reports.income.accountId<br>```<br><br>```<br>balance_sheets.reports.assets.accountId = profit_and_loss.reports.otherExpenses.accountId<br>```<br><br>```<br>balance_sheets.reports.equity.accountId = profit_and_loss.reports.otherExpenses.accountId<br>```<br><br>```<br>balance_sheets.reports.liabilities.accountId = profit_and_loss.reports.otherExpenses.accountId<br>```<br><br>```<br>balance_sheets.reports.assets.accountId = profit_and_loss.reports.otherIncome.accountId<br>```<br><br>```<br>balance_sheets.reports.equity.accountId = profit_and_loss.reports.otherIncome.accountId<br>```<br><br>```<br>balance_sheets.reports.liabilities.accountId = profit_and_loss.reports.otherIncome.accountId<br>```<br><br>```<br>balance_sheets.companyId = profit_and_loss.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>balance_sheets.reports.assets.accountId = bills.lineItems.accountRef.id<br>```<br><br>```<br>balance_sheets.reports.equity.accountId = bills.lineItems.accountRef.id<br>```<br><br>```<br>balance_sheets.reports.liabilities.accountId = bills.lineItems.accountRef.id<br>```<br><br>```<br>balance_sheets.companyId = bills.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>balance_sheets.reports.assets.accountId = items.billItem.accountRef.id<br>```<br><br>```<br>balance_sheets.reports.equity.accountId = items.billItem.accountRef.id<br>```<br><br>```<br>balance_sheets.reports.liabilities.accountId = items.billItem.accountRef.id<br>```<br><br>```<br>balance_sheets.reports.assets.accountId = items.invoiceItem.accountRef.id<br>```<br><br>```<br>balance_sheets.reports.equity.accountId = items.invoiceItem.accountRef.id<br>```<br><br>```<br>balance_sheets.reports.liabilities.accountId = items.invoiceItem.accountRef.id<br>```<br><br>```<br>balance_sheets.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>balance_sheets.reports.assets.accountId = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>balance_sheets.reports.equity.accountId = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>balance_sheets.reports.liabilities.accountId = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>balance_sheets.companyId = journal_entries.companyId<br>``` |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>balance_sheets.companyId = companies.id<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>balance_sheets.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>balance_sheets.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>balance_sheets.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>balance_sheets.companyId = bill_payments.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>balance_sheets.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>balance_sheets.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>balance_sheets.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>balance_sheets.companyId = payments.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>balance_sheets.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>balance_sheets.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>balance_sheets.companyId = events.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>balance_sheets.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>balance_sheets.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>balance_sheets.companyId = bank_accounts.companyId<br>``` |

balance\_sheets table schema

| **companyId**<br><br><br>STRING |
| --- |
| **currency**<br><br><br>STRING |
| **mostRecentAvailableMonth**<br><br><br>STRING |
| **reports**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>assets: ARRAY, which is also a nested data structure.											<ul><li>accountId: STRING</li><li>name: STRING</li><li>value: NUMBER</li></ul></li><li>date: DATE-TIME</li><li>equity: ARRAY, which is also a nested data structure.											<ul><li>accountId: STRING</li><li>name: STRING</li><li>value: NUMBER</li></ul></li><li>liabilities: ARRAY, which is also a nested data structure.											<ul><li>accountId: STRING</li><li>name: STRING</li><li>value: NUMBER</li></ul></li><li>netAssets: NUMBER</li></ul> |
| **status**<br><br><br>OBJECT, STRING<br><br>This is a nested data structure. |

### bank\_account\_transactions

The bank\_account\_transactions table contains information about transactions for a specified company and bank account in your Codat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Keys** | \_transactionIndex<br><br>bankAccountId<br><br>companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/bank-transactions)<br><br>[Codat API method](https://docs.codat.io/reference/bankaccounts#bankaccounts_getaccounttransactions "Opens in new tab: Codat API method") |

bank\_account\_transactions table foreign keys

| Join bank\_account\_transactions with | on |
| --- | --- |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>bank_account_transactions.bankAccountId = bank_accounts.id<br>```<br><br>```<br>bank_account_transactions.companyId = bank_accounts.companyId<br>``` |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>bank_account_transactions.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>bank_account_transactions.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>bank_account_transactions.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>bank_account_transactions.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>bank_account_transactions.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>bank_account_transactions.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>bank_account_transactions.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>bank_account_transactions.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>bank_account_transactions.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>bank_account_transactions.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>bank_account_transactions.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>bank_account_transactions.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>bank_account_transactions.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>bank_account_transactions.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>bank_account_transactions.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>bank_account_transactions.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>bank_account_transactions.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>bank_account_transactions.companyId = tax_rates.companyId<br>``` |

bank\_account\_transactions table schema

| **\_transactionIndex**<br><br><br>INTEGER |
| --- |
| **amount**<br><br><br>NUMBER |
| **balance**<br><br><br>NUMBER |
| **bankAccountId**<br><br><br>STRING |
| **companyId**<br><br><br>STRING |
| **date**<br><br><br>STRING |
| **description**<br><br><br>STRING |
| **modifiedDate**<br><br><br>STRING |
| **reconciled**<br><br><br>BOOLEAN |
| **sourceModifiedDate**<br><br><br>STRING |
| **transactionType**<br><br><br>STRING |

### bank\_accounts

The `bank_accounts` table contains informaiton about bank accounts for a given company in your Codat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Keys** | accountName<br><br>companyId<br><br>connectionId |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/bank-accounts)<br><br>[Codat API method](https://docs.codat.io/reference/bankaccounts#bankaccounts_listaccountspaged "Opens in new tab: Codat API method") |

bank\_accounts table foreign keys

| Join bank\_accounts with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#accounts) | ```<br>bank_accounts.accountName = accounts.name<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>bank_accounts.accountName = bank_statement_lines.accountName<br>```<br><br>```<br>bank_accounts.companyId = bank_statement_lines.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>bank_accounts.id = bank_account_transactions.bankAccountId<br>```<br><br>```<br>bank_accounts.companyId = bank_account_transactions.companyId<br>``` |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>bank_accounts.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>bank_accounts.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>bank_accounts.companyId = bank_statements.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>bank_accounts.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>bank_accounts.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>bank_accounts.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>bank_accounts.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>bank_accounts.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>bank_accounts.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>bank_accounts.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>bank_accounts.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>bank_accounts.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>bank_accounts.companyId = connections.companyId<br>```<br><br>```<br>bank_accounts.connectionId = connections.id<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>bank_accounts.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>bank_accounts.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>bank_accounts.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>bank_accounts.companyId = tax_rates.companyId<br>``` |

bank\_accounts table schema

| **accountName**<br><br><br>STRING |
| --- |
| **accountNumber**<br><br><br>STRING |
| **availableBalance**<br><br><br>NUMBER |
| **balance**<br><br><br>NUMBER |
| **companyId**<br><br><br>STRING |
| **connectionId**<br><br><br>STRING |
| **currency**<br><br><br>STRING |
| **fromDate**<br><br><br>STRING |
| **iban**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **modifiedDate**<br><br><br>STRING |
| **overdraftLimit**<br><br><br>NUMBER |
| **sortCode**<br><br><br>STRING |
| **sourceModifiedDate**<br><br><br>STRING |
| **toDate**<br><br><br>STRING |

### bank\_statement\_lines

The `bank_statement_lines` table contains info about lines included in bank statements.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Keys** | accountName<br><br>companyId<br><br>\_lineIndex |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/bank-transactions)<br><br>[Codat API method](https://docs.codat.io/reference/bankstatements#bankstatements_listpaged "Opens in new tab: Codat API method") |

bank\_statement\_lines table foreign keys

| Join bank\_statement\_lines with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#accounts) | ```<br>bank_statement_lines.accountName = accounts.name<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>bank_statement_lines.accountName = bank_accounts.accountName<br>```<br><br>```<br>bank_statement_lines.companyId = bank_accounts.companyId<br>``` |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>bank_statement_lines.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>bank_statement_lines.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>bank_statement_lines.companyId = bank_statements.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>bank_statement_lines.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>bank_statement_lines.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>bank_statement_lines.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>bank_statement_lines.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>bank_statement_lines.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>bank_statement_lines.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>bank_statement_lines.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>bank_statement_lines.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>bank_statement_lines.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>bank_statement_lines.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>bank_statement_lines.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>bank_statement_lines.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>bank_statement_lines.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>bank_statement_lines.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>bank_statement_lines.companyId = bank_account_transactions.companyId<br>``` |

bank\_statement\_lines table schema

| **\_lineIndex**<br><br><br>INTEGER |
| --- |
| **accountName**<br><br><br>STRING |
| **amount**<br><br><br>NUMBER |
| **balance**<br><br><br>NUMBER |
| **companyId**<br><br><br>STRING |
| **date**<br><br><br>DATE-TIME |
| **description**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **reconciled**<br><br><br>BOOLEAN |

### bank\_statements

The `bank_statements` table contains info about bank statement report data for a company over a time period.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | id<br><br>companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/bank-accounts)<br><br>[Codat API method](https://docs.codat.io/reference/bankstatements#bankstatements_listpaged "Opens in new tab: Codat API method") |

bank\_statements table foreign keys

| Join bank\_statements with | on |
| --- | --- |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>bank_statements.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>bank_statements.companyId = balance_sheets.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>bank_statements.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>bank_statements.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>bank_statements.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>bank_statements.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>bank_statements.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>bank_statements.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>bank_statements.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>bank_statements.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>bank_statements.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>bank_statements.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>bank_statements.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>bank_statements.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>bank_statements.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>bank_statements.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>bank_statements.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>bank_statements.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>bank_statements.companyId = bank_accounts.companyId<br>``` |

bank\_statements table schema

| **accountName**<br><br><br>STRING |
| --- |
| **accountNumber**<br><br><br>STRING |
| **availableBalance**<br><br><br>STRING, NUMBER |
| **balance**<br><br><br>STRING, NUMBER |
| **companyId**<br><br><br>STRING |
| **currency**<br><br><br>STRING |
| **fromDate**<br><br><br>DATE-TIME |
| **iban**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **sortCode**<br><br><br>STRING |
| **toDate**<br><br><br>DATE-TIME |

### bill\_payments

The bill\_payments table contains information about company bill payments in your Codat account.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | companyId<br><br>id |
| **Replication Key** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/billpayments-1)<br><br>[Codat API method](https://docs.codat.io/reference/billpayments#billpayments_listpaged "Opens in new tab: Codat API method") |

bill\_payments table foreign keys

| Join bill\_payments with | on |
| --- | --- |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>bill_payments.supplierRef.companyId = companies.id<br>```<br><br>```<br>bill_payments.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>bill_payments.supplierRef.companyId = balance_sheets.companyId<br>```<br><br>```<br>bill_payments.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>bill_payments.supplierRef.companyId = bank_statements.companyId<br>```<br><br>```<br>bill_payments.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>bill_payments.supplierRef.companyId = bank_statement_lines.companyId<br>```<br><br>```<br>bill_payments.companyId = bank_statement_lines.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>bill_payments.supplierRef.companyId = bills.companyId<br>```<br><br>```<br>bill_payments.companyId = bills.companyId<br>```<br><br>```<br>bill_payments.supplierRef.id = bills.supplierRef<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>bill_payments.supplierRef.companyId = company_info.companyId<br>```<br><br>```<br>bill_payments.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>bill_payments.supplierRef.companyId = customers.companyId<br>```<br><br>```<br>bill_payments.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>bill_payments.supplierRef.companyId = invoices.companyId<br>```<br><br>```<br>bill_payments.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>bill_payments.supplierRef.companyId = payments.companyId<br>```<br><br>```<br>bill_payments.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>bill_payments.supplierRef.companyId = profit_and_loss.companyId<br>```<br><br>```<br>bill_payments.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>bill_payments.supplierRef.companyId = suppliers.companyId<br>```<br><br>```<br>bill_payments.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>bill_payments.supplierRef.companyId = connections.companyId<br>```<br><br>```<br>bill_payments.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>bill_payments.supplierRef.companyId = events.companyId<br>```<br><br>```<br>bill_payments.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>bill_payments.supplierRef.companyId = items.companyId<br>```<br><br>```<br>bill_payments.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>bill_payments.supplierRef.companyId = journal_entries.companyId<br>```<br><br>```<br>bill_payments.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>bill_payments.supplierRef.companyId = tax_rates.companyId<br>```<br><br>```<br>bill_payments.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>bill_payments.supplierRef.companyId = bank_account_transactions.companyId<br>```<br><br>```<br>bill_payments.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>bill_payments.supplierRef.companyId = bank_accounts.companyId<br>```<br><br>```<br>bill_payments.companyId = bank_accounts.companyId<br>``` |

bill\_payments table schema

| **companyId**<br><br><br>STRING |
| --- |
| **currency**<br><br><br>STRING |
| **currencyRate**<br><br><br>NUMBER |
| **date**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **lines**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>amount: NUMBER</li><li>links: ARRAY, which is also a nested data structure.											<ul><li>id: STRING</li><li>type: STRING</li></ul></li></ul> |
| **modifiedDate**<br><br><br>STRING |
| **note**<br><br><br>STRING |
| **sourceModifiedDate**<br><br><br>STRING |
| **supplierRef**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>addresses: ARRAY, which is also a nested data structure.											<ul><li>city: STRING</li><li>country: STRING</li><li>line1: STRING</li><li>line2: STRING</li><li>postalCode: STRING</li><li>region: STRING</li><li>type: STRING</li></ul></li><li>companyId: STRING</li><li>contactName: STRING</li><li>emailAddress: STRING</li><li>id: STRING</li><li>phone: STRING</li><li>registrationNumber: STRING</li><li>status: STRING</li><li>supplierName: STRING</li><li>taxNumber: STRING</li></ul> |
| **totalAmount**<br><br><br>NUMBER |

### bills

The `bills` table contains info about the bills in your Codat account. A bill is an itemized record of goods or services purchased from a [supplier](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers).

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | companyId<br><br>id |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/bills-1)<br><br>[Codat API method](https://docs.codat.io/reference/bills#bills_listpaged "Opens in new tab: Codat API method") |

bills table foreign keys

| Join bills with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#accounts) | ```<br>bills.lineItems.accountRef.id = accounts.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>bills.lineItems.accountRef.id = balance_sheets.reports.assets.accountId<br>```<br><br>```<br>bills.lineItems.accountRef.id = balance_sheets.reports.equity.accountId<br>```<br><br>```<br>bills.lineItems.accountRef.id = balance_sheets.reports.liabilities.accountId<br>```<br><br>```<br>bills.companyId = balance_sheets.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>bills.lineItems.accountRef.id = profit_and_loss.reports.costOfSales.accountId<br>```<br><br>```<br>bills.lineItems.accountRef.id = profit_and_loss.reports.expenses.accountId<br>```<br><br>```<br>bills.lineItems.accountRef.id = profit_and_loss.reports.income.accountId<br>```<br><br>```<br>bills.lineItems.accountRef.id = profit_and_loss.reports.otherExpenses.accountId<br>```<br><br>```<br>bills.lineItems.accountRef.id = profit_and_loss.reports.otherIncome.accountId<br>```<br><br>```<br>bills.companyId = profit_and_loss.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>bills.lineItems.accountRef.id = items.billItem.accountRef.id<br>```<br><br>```<br>bills.lineItems.accountRef.id = items.invoiceItem.accountRef.id<br>```<br><br>```<br>bills.companyId = items.companyId<br>```<br><br>```<br>bills.lineItems.itemRef.id = items.id<br>```<br><br>```<br>bills.lineItems.taxRateRef.id = items.billItem.taxRateRef.id<br>```<br><br>```<br>bills.lineItems.taxRateRef.id = items.invoiceItem.taxRateRef.id<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>bills.lineItems.accountRef.id = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>bills.companyId = journal_entries.companyId<br>``` |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>bills.companyId = companies.id<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>bills.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>bills.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>bills.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>bills.companyId = bill_payments.companyId<br>```<br><br>```<br>bills.supplierRef = bill_payments.supplierRef.id<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>bills.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>bills.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>bills.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>bills.companyId = payments.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>bills.companyId = suppliers.companyId<br>```<br><br>```<br>bills.supplierRef = suppliers.id<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>bills.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>bills.companyId = events.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>bills.companyId = tax_rates.companyId<br>```<br><br>```<br>bills.lineItems.taxRateRef.id = tax_rates.id<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>bills.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>bills.companyId = bank_accounts.companyId<br>``` |

bills table schema

| **amountDue**<br><br><br>NUMBER |
| --- |
| **companyId**<br><br><br>STRING |
| **currency**<br><br><br>STRING |
| **dueDate**<br><br><br>DATE-TIME |
| **id**<br><br><br>STRING |
| **issueDate**<br><br><br>DATE-TIME |
| **lineItems**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>accountRef: OBJECT, which is also a nested data structure.											<ul><li>id: STRING</li><li>name: STRING</li></ul></li><li>description: STRING</li><li>discountAmount: NUMBER</li><li>discountPercentage: NUMBER</li><li>itemRef: OBJECT, which is also a nested data structure.											<ul><li>id: STRING</li><li>name: STRING</li></ul></li><li>quantity: NUMBER</li><li>subTotal: NUMBER</li><li>taxAmount: NUMBER</li><li>taxRateRef: OBJECT, which is also a nested data structure.											<ul><li>id: STRING</li><li>name: STRING</li></ul></li><li>totalAmount: NUMBER</li><li>unitAmount: NUMBER</li></ul> |
| **reference**<br><br><br>STRING |
| **status**<br><br><br>STRING |
| **subTotal**<br><br><br>NUMBER |
| **supplierRef**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>addresses: ARRAY, which is also a nested data structure.											<ul><li>city: STRING</li><li>country: STRING</li><li>line1: STRING</li><li>line2: STRING</li><li>postalCode: STRING</li><li>region: STRING</li><li>type: STRING</li></ul></li><li>companyId: STRING</li><li>contactName: STRING</li><li>emailAddress: STRING</li><li>id: STRING</li><li>phone: STRING</li><li>registrationNumber: STRING</li><li>status: STRING</li><li>supplierName: STRING</li><li>taxNumber</li></ul> |
| **taxAmount**<br><br><br>NUMBER |
| **totalAmount**<br><br><br>NUMBER |

### companies

The `companies` table contains info about the companies in your Codat instance. A company represents a business who can share the connection to their financial data sources.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | id |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/companies)<br><br>[Codat API method](https://docs.codat.io/reference/companies#companies_listpaged "Opens in new tab: Codat API method") |

companies table foreign keys

| Join companies with | on |
| --- | --- |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>companies.id = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>companies.id = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>companies.id = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>companies.id = bill_payments.supplierRef.companyId<br>```<br><br>```<br>companies.id = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>companies.id = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>companies.id = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>companies.id = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>companies.id = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>companies.id = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>companies.id = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>companies.id = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>companies.id = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>companies.id = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>companies.id = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>companies.id = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>companies.id = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>companies.id = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>companies.id = bank_accounts.companyId<br>``` |

companies table schema

| **id**<br><br><br>STRING |
| --- |
| **lastSync**<br><br><br>DATE-TIME |
| **name**<br><br><br>STRING |
| **platform**<br><br><br>STRING |
| **redirect**<br><br><br>STRING |
| **status**<br><br><br>STRING |

### company\_info

The `company_info` table contains company info. In Codat, company info includes information about a linked company such as address, phone number and company registration.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/info)<br><br>[Codat API method](https://docs.codat.io/reference/info#info_list "Opens in new tab: Codat API method") |

company\_info table foreign keys

| Join company\_info with | on |
| --- | --- |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>company_info.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>company_info.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>company_info.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>company_info.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>company_info.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>company_info.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>company_info.companyId = bills.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>company_info.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>company_info.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>company_info.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>company_info.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>company_info.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>company_info.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>company_info.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>company_info.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>company_info.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>company_info.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>company_info.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>company_info.companyId = bank_accounts.companyId<br>``` |

company\_info table schema

| **accountingPlatformRef**<br><br><br>STRING |
| --- |
| **addresses**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>city: STRING</li><li>country: STRING</li><li>line1: STRING</li><li>line2: STRING</li><li>postalCode: STRING</li><li>region: STRING</li><li>type: STRING</li></ul> |
| **baseCurrency**<br><br><br>STRING |
| **companyId**<br><br><br>STRING |
| **companyLegalName**<br><br><br>STRING |
| **companyName**<br><br><br>STRING |
| **createdDate**<br><br><br>STRING |
| **financialYearStartDate**<br><br><br>DATE-TIME |
| **phoneNumbers**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>number: STRING</li><li>type: STRING</li></ul> |
| **registrationNumber**<br><br><br>STRING |
| **taxNumber**<br><br><br>STRING |
| **webLinks**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>type: STRING</li><li>url: STRING</li></ul> |

### connections

The connections table contains information about company connections in your Codat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Keys** | companyId<br><br>id |
| **Useful links** | [Codat API method](https://docs.codat.io/reference/connection#connection_getconnection "Opens in new tab: Codat API method") |

connections table foreign keys

| Join connections with | on |
| --- | --- |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>connections.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>connections.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>connections.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>connections.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>connections.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>connections.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>connections.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>connections.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>connections.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>connections.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>connections.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>connections.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>connections.companyId = suppliers.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>connections.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>connections.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>connections.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>connections.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>connections.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>connections.companyId = bank_accounts.companyId<br>```<br><br>```<br>connections.id = bank_accounts.connectionId<br>``` |

connections table schema

| **companyId**<br><br><br>STRING |
| --- |
| **id**<br><br><br>STRING |
| **integrationId**<br><br><br>STRING |
| **linkUrl**<br><br><br>STRING |
| **platformName**<br><br><br>STRING |
| **sourceId**<br><br><br>STRING |
| **status**<br><br><br>STRING |

### credit\_notes

The `credit_notes` table contains info about the credit notes in your Codat instance.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | id<br><br>companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/credit-notes)<br><br>[Codat API method](https://docs.codat.io/reference/creditnotes#creditnotes_listpaged "Opens in new tab: Codat API method") |

credit\_notes table foreign keys

| Join credit\_notes with | on |
| --- | --- |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>credit_notes.id = payments.lines.links.id<br>```<br><br>```<br>credit_notes.customerRef.id = payments.customerRef.id<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>credit_notes.customerRef.id = customers.id<br>``` |

credit\_notes table schema

| **companyId**<br><br><br>STRING |
| --- |
| **creditNoteNumber**<br><br><br>STRING |
| **currency**<br><br><br>STRING |
| **customerRef**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>companyName: STRING</li><li>id: STRING</li></ul> |
| **id**<br><br><br>STRING |
| **issueDate**<br><br><br>DATE-TIME |
| **paymentAllocations**<br><br><br>ARRAY<br><br>This is a nested data structure. |
| **remainingCredit**<br><br><br>NUMBER |
| **status**<br><br><br>STRING |
| **totalAmount**<br><br><br>NUMBER |

### customers

The `customers` table contains info about the customers in your Codat instance. A customer is a person or organisation that buys goods or services.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | companyId<br><br>id |
| **Replication Key** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/customers)<br><br>[Codat API method](https://docs.codat.io/reference/customers#customers_listpaged "Opens in new tab: Codat API method") |

customers table foreign keys

| Join customers with | on |
| --- | --- |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>customers.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>customers.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>customers.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>customers.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>customers.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>customers.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>customers.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>customers.companyId = company_info.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>customers.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>customers.companyId = payments.companyId<br>```<br><br>```<br>customers.id = payments.customerRef.id<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>customers.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>customers.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>customers.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>customers.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>customers.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>customers.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>customers.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>customers.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>customers.companyId = bank_accounts.companyId<br>``` |
| [credit_notes](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#credit-notes) | ```<br>customers.id = credit_notes.customerRef.id<br>``` |

customers table schema

| **addresses**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>city: STRING</li><li>country: STRING</li><li>line1: STRING</li><li>line2: STRING</li><li>postalCode: STRING</li><li>region: STRING</li><li>type: STRING</li></ul> |
| --- |
| **companyId**<br><br><br>STRING |
| **contactName**<br><br><br>STRING |
| **contacts**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>address: OBJECT, which is also a nested data structure.											<ul><li>city: STRING</li><li>country: STRING</li><li>line1: STRING</li><li>line2: STRING</li><li>postalCode: STRING</li><li>region: STRING</li><li>type: STRING</li></ul></li><li>email: STRING</li><li>modifiedDate: DATE-TIME</li><li>name: STRING</li><li>phone: ARRAY, which is also a nested data structure.											<ul><li>number: STRING</li><li>type: STRING</li></ul></li><li>status: STRING</li></ul> |
| **customerName**<br><br><br>STRING |
| **defaultCurrency**<br><br><br>STRING |
| **emailAddress**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **modifiedDate**<br><br><br>DATE-TIME |
| **phone**<br><br><br>STRING |
| **registrationNumber**<br><br><br>STRING |
| **status**<br><br><br>STRING |
| **taxNumber**<br><br><br>STRING |

### events

The `events` table contains information about a given company’s events in your Codat account.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Keys** | companyId<br><br>eventTimeUtc |
| **Useful links** | [Codat API method](https://docs.codat.io/reference/reports#reports_companyevents "Opens in new tab: Codat API method") |

events table foreign keys

| Join events with | on |
| --- | --- |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>events.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>events.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>events.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>events.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>events.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>events.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>events.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>events.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>events.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>events.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>events.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>events.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>events.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>events.companyId = connections.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>events.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>events.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>events.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>events.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>events.companyId = bank_accounts.companyId<br>``` |

events table schema

| **companyId**<br><br><br>STRING |
| --- |
| **description**<br><br><br>STRING |
| **eventTimeUtc**<br><br><br>STRING |
| **type**<br><br><br>STRING |

### invoices

The `invoices` table contains info about the invoices in your Codat instance. An invoice is an itemized record of goods or services sold to a [customer](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers).

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | companyId<br><br>id |
| **Replication Key** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/invoices-1)<br><br>[Codat API method](https://docs.codat.io/reference/invoices#invoices_listpaged "Opens in new tab: Codat API method") |

invoices table foreign keys

| Join invoices with | on |
| --- | --- |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>invoices.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>invoices.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>invoices.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>invoices.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>invoices.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>invoices.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>invoices.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>invoices.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>invoices.companyId = customers.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>invoices.companyId = payments.companyId<br>```<br><br>```<br>invoices.id = payments.lines.links.id<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>invoices.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>invoices.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>invoices.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>invoices.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>invoices.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>invoices.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>invoices.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>invoices.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>invoices.companyId = bank_accounts.companyId<br>``` |

invoices table schema

| **amountDue**<br><br><br>NUMBER |
| --- |
| **companyId**<br><br><br>STRING |
| **currency**<br><br><br>STRING |
| **customerRef**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>companyName: STRING</li><li>id: STRING</li></ul> |
| **dueDate**<br><br><br>DATE-TIME |
| **id**<br><br><br>STRING |
| **invoiceNumber**<br><br><br>STRING |
| **issueDate**<br><br><br>DATE-TIME |
| **lineItems**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>description: STRING</li><li>discountAmount: NUMBER</li><li>quantity: NUMBER</li><li>subTotal: NUMBER</li><li>taxAmount: NUMBER</li><li>totalAmount: NUMBER</li><li>unitAmount: NUMBER</li></ul> |
| **modifiedDate**<br><br><br>DATE-TIME |
| **paidOnDate**<br><br><br>DATE-TIME |
| **paymentAllocations**<br><br><br>ARRAY<br><br>This is a nested data structure. |
| **status**<br><br><br>STRING |
| **subTotal**<br><br><br>NUMBER |
| **totalAmount**<br><br><br>NUMBER |
| **totalDiscount**<br><br><br>NUMBER |
| **totalTaxAmount**<br><br><br>NUMBER |

### items

The items table contains information about items for a given company in your Codat account.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | companyId<br><br>id |
| **Replication Key** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/items)<br><br>[Codat API method](https://docs.codat.io/reference/items#items_listpaged "Opens in new tab: Codat API method") |

items table foreign keys

| Join items with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#accounts) | ```<br>items.billItem.accountRef.id = accounts.id<br>```<br><br>```<br>items.invoiceItem.accountRef.id = accounts.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>items.billItem.accountRef.id = balance_sheets.reports.assets.accountId<br>```<br><br>```<br>items.invoiceItem.accountRef.id = balance_sheets.reports.assets.accountId<br>```<br><br>```<br>items.billItem.accountRef.id = balance_sheets.reports.equity.accountId<br>```<br><br>```<br>items.invoiceItem.accountRef.id = balance_sheets.reports.equity.accountId<br>```<br><br>```<br>items.billItem.accountRef.id = balance_sheets.reports.liabilities.accountId<br>```<br><br>```<br>items.invoiceItem.accountRef.id = balance_sheets.reports.liabilities.accountId<br>```<br><br>```<br>items.companyId = balance_sheets.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>items.billItem.accountRef.id = profit_and_loss.reports.costOfSales.accountId<br>```<br><br>```<br>items.invoiceItem.accountRef.id = profit_and_loss.reports.costOfSales.accountId<br>```<br><br>```<br>items.billItem.accountRef.id = profit_and_loss.reports.expenses.accountId<br>```<br><br>```<br>items.invoiceItem.accountRef.id = profit_and_loss.reports.expenses.accountId<br>```<br><br>```<br>items.billItem.accountRef.id = profit_and_loss.reports.income.accountId<br>```<br><br>```<br>items.invoiceItem.accountRef.id = profit_and_loss.reports.income.accountId<br>```<br><br>```<br>items.billItem.accountRef.id = profit_and_loss.reports.otherExpenses.accountId<br>```<br><br>```<br>items.invoiceItem.accountRef.id = profit_and_loss.reports.otherExpenses.accountId<br>```<br><br>```<br>items.billItem.accountRef.id = profit_and_loss.reports.otherIncome.accountId<br>```<br><br>```<br>items.invoiceItem.accountRef.id = profit_and_loss.reports.otherIncome.accountId<br>```<br><br>```<br>items.companyId = profit_and_loss.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>items.billItem.accountRef.id = bills.lineItems.accountRef.id<br>```<br><br>```<br>items.invoiceItem.accountRef.id = bills.lineItems.accountRef.id<br>```<br><br>```<br>items.companyId = bills.companyId<br>```<br><br>```<br>items.id = bills.lineItems.itemRef.id<br>```<br><br>```<br>items.billItem.taxRateRef.id = bills.lineItems.taxRateRef.id<br>```<br><br>```<br>items.invoiceItem.taxRateRef.id = bills.lineItems.taxRateRef.id<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>items.billItem.accountRef.id = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>items.invoiceItem.accountRef.id = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>items.companyId = journal_entries.companyId<br>``` |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>items.companyId = companies.id<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>items.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>items.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>items.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>items.companyId = bill_payments.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>items.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>items.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>items.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>items.companyId = payments.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>items.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>items.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>items.companyId = events.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>items.companyId = tax_rates.companyId<br>```<br><br>```<br>items.billItem.taxRateRef.id = tax_rates.id<br>```<br><br>```<br>items.invoiceItem.taxRateRef.id = tax_rates.id<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>items.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>items.companyId = bank_accounts.companyId<br>``` |

items table schema

| **billItem**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>accountRef: OBJECT, which is also a nested data structure.											<ul><li>id: STRING</li></ul></li><li>description: STRING</li><li>taxRateRef: OBJECT, which is also a nested data structure.											<ul><li>id: STRING</li></ul></li><li>unitPrice: NUMBER</li></ul> |
| --- |
| **code**<br><br><br>STRING |
| **companyId**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **invoiceItem**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>accountRef: OBJECT, which is also a nested data structure.											<ul><li>id: STRING</li></ul></li><li>description: STRING</li><li>taxRateRef: OBJECT, which is also a nested data structure.											<ul><li>id: STRING</li></ul></li><li>unitPrice: NUMBER</li></ul> |
| **isBillItem**<br><br><br>BOOLEAN |
| **isInvoiceItem**<br><br><br>BOOLEAN |
| **itemStatus**<br><br><br>STRING |
| **modifiedDate**<br><br><br>STRING |
| **name**<br><br><br>STRING |
| **sourceModifiedDate**<br><br><br>STRING |

### journal\_entries

The journal\_entries table contains information about journal entries for a given company in your Codat account.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | companyId<br><br>id |
| **Replication Key** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/journals)<br><br>[Codat API method](https://docs.codat.io/reference/journals#journals_listpaged "Opens in new tab: Codat API method") |

journal\_entries table foreign keys

| Join journal\_entries with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#accounts) | ```<br>journal_entries.journalLines.accountRef.id = accounts.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>journal_entries.journalLines.accountRef.id = balance_sheets.reports.assets.accountId<br>```<br><br>```<br>journal_entries.journalLines.accountRef.id = balance_sheets.reports.equity.accountId<br>```<br><br>```<br>journal_entries.journalLines.accountRef.id = balance_sheets.reports.liabilities.accountId<br>```<br><br>```<br>journal_entries.companyId = balance_sheets.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>journal_entries.journalLines.accountRef.id = profit_and_loss.reports.costOfSales.accountId<br>```<br><br>```<br>journal_entries.journalLines.accountRef.id = profit_and_loss.reports.expenses.accountId<br>```<br><br>```<br>journal_entries.journalLines.accountRef.id = profit_and_loss.reports.income.accountId<br>```<br><br>```<br>journal_entries.journalLines.accountRef.id = profit_and_loss.reports.otherExpenses.accountId<br>```<br><br>```<br>journal_entries.journalLines.accountRef.id = profit_and_loss.reports.otherIncome.accountId<br>```<br><br>```<br>journal_entries.companyId = profit_and_loss.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>journal_entries.journalLines.accountRef.id = bills.lineItems.accountRef.id<br>```<br><br>```<br>journal_entries.companyId = bills.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>journal_entries.journalLines.accountRef.id = items.billItem.accountRef.id<br>```<br><br>```<br>journal_entries.journalLines.accountRef.id = items.invoiceItem.accountRef.id<br>```<br><br>```<br>journal_entries.companyId = items.companyId<br>``` |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>journal_entries.companyId = companies.id<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>journal_entries.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>journal_entries.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>journal_entries.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>journal_entries.companyId = bill_payments.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>journal_entries.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>journal_entries.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>journal_entries.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>journal_entries.companyId = payments.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>journal_entries.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>journal_entries.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>journal_entries.companyId = events.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>journal_entries.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>journal_entries.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>journal_entries.companyId = bank_accounts.companyId<br>``` |

journal\_entries table schema

| **companyId**<br><br><br>STRING |
| --- |
| **createdOn**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **journalLines**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>accountRef: OBJECT, which is also a nested data structure.											<ul><li>id: STRING</li><li>name: STRING</li></ul></li><li>currency: STRING</li><li>description: STRING</li><li>grossAmount: NUMBER</li><li>id: STRING</li><li>netAmount: NUMBER</li><li>taxAmount: NUMBER</li></ul> |
| **modifiedDate**<br><br><br>STRING |
| **postedOn**<br><br><br>STRING |
| **sourceModifiedDate**<br><br><br>STRING |

### payments

The `payments` table contains info about the payments, or Accounts Receivable transactions, in your Codat instance. This includes details about invoices and credit notes.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | companyId<br><br>id |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/payments-1)<br><br>[Codat API method](https://docs.codat.io/reference/payments#payments_listpaged "Opens in new tab: Codat API method") |

payments table foreign keys

| Join payments with | on |
| --- | --- |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>payments.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>payments.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>payments.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>payments.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>payments.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>payments.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>payments.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>payments.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>payments.companyId = customers.companyId<br>```<br><br>```<br>payments.customerRef.id = customers.id<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>payments.companyId = invoices.companyId<br>```<br><br>```<br>payments.lines.links.id = invoices.id<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>payments.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>payments.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>payments.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>payments.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>payments.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>payments.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>payments.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>payments.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>payments.companyId = bank_accounts.companyId<br>``` |
| [credit_notes](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#credit-notes) | ```<br>payments.lines.links.id = credit_notes.id<br>```<br><br>```<br>payments.customerRef.id = credit_notes.customerRef.id<br>``` |

payments table schema

| **companyId**<br><br><br>STRING |
| --- |
| **currency**<br><br><br>STRING |
| **customerRef**<br><br><br>OBJECT<br><br>This is a nested data structure:<br><br><ul><li>companyName: STRING</li><li>id: STRING</li></ul> |
| **date**<br><br><br>DATE-TIME |
| **id**<br><br><br>STRING |
| **lines**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>amount: NUMBER</li><li>links: ARRAY, which is also a nested data structure.											<ul><li>id: STRING</li><li>type: STRING</li></ul></li></ul> |
| **note**<br><br><br>STRING |
| **totalAmount**<br><br><br>NUMBER |

### profit\_and\_loss

The `profit_and_loss` table contains profit and loss report data for a company over a time period.

| **Replication Method** | Full Table |
| --- | --- |
| **Primary Key** | companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/profit-and-loss-2)<br><br>[Codat API method](https://docs.codat.io/reference/financials#financials_profitandloss "Opens in new tab: Codat API method") |

profit\_and\_loss table foreign keys

| Join profit\_and\_loss with | on |
| --- | --- |
| [accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#accounts) | ```<br>profit_and_loss.reports.costOfSales.accountId = accounts.id<br>```<br><br>```<br>profit_and_loss.reports.expenses.accountId = accounts.id<br>```<br><br>```<br>profit_and_loss.reports.income.accountId = accounts.id<br>```<br><br>```<br>profit_and_loss.reports.otherExpenses.accountId = accounts.id<br>```<br><br>```<br>profit_and_loss.reports.otherIncome.accountId = accounts.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>profit_and_loss.reports.costOfSales.accountId = balance_sheets.reports.assets.accountId<br>```<br><br>```<br>profit_and_loss.reports.expenses.accountId = balance_sheets.reports.assets.accountId<br>```<br><br>```<br>profit_and_loss.reports.income.accountId = balance_sheets.reports.assets.accountId<br>```<br><br>```<br>profit_and_loss.reports.otherExpenses.accountId = balance_sheets.reports.assets.accountId<br>```<br><br>```<br>profit_and_loss.reports.otherIncome.accountId = balance_sheets.reports.assets.accountId<br>```<br><br>```<br>profit_and_loss.reports.costOfSales.accountId = balance_sheets.reports.equity.accountId<br>```<br><br>```<br>profit_and_loss.reports.expenses.accountId = balance_sheets.reports.equity.accountId<br>```<br><br>```<br>profit_and_loss.reports.income.accountId = balance_sheets.reports.equity.accountId<br>```<br><br>```<br>profit_and_loss.reports.otherExpenses.accountId = balance_sheets.reports.equity.accountId<br>```<br><br>```<br>profit_and_loss.reports.otherIncome.accountId = balance_sheets.reports.equity.accountId<br>```<br><br>```<br>profit_and_loss.reports.costOfSales.accountId = balance_sheets.reports.liabilities.accountId<br>```<br><br>```<br>profit_and_loss.reports.expenses.accountId = balance_sheets.reports.liabilities.accountId<br>```<br><br>```<br>profit_and_loss.reports.income.accountId = balance_sheets.reports.liabilities.accountId<br>```<br><br>```<br>profit_and_loss.reports.otherExpenses.accountId = balance_sheets.reports.liabilities.accountId<br>```<br><br>```<br>profit_and_loss.reports.otherIncome.accountId = balance_sheets.reports.liabilities.accountId<br>```<br><br>```<br>profit_and_loss.companyId = balance_sheets.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>profit_and_loss.reports.costOfSales.accountId = bills.lineItems.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.expenses.accountId = bills.lineItems.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.income.accountId = bills.lineItems.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.otherExpenses.accountId = bills.lineItems.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.otherIncome.accountId = bills.lineItems.accountRef.id<br>```<br><br>```<br>profit_and_loss.companyId = bills.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>profit_and_loss.reports.costOfSales.accountId = items.billItem.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.expenses.accountId = items.billItem.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.income.accountId = items.billItem.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.otherExpenses.accountId = items.billItem.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.otherIncome.accountId = items.billItem.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.costOfSales.accountId = items.invoiceItem.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.expenses.accountId = items.invoiceItem.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.income.accountId = items.invoiceItem.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.otherExpenses.accountId = items.invoiceItem.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.otherIncome.accountId = items.invoiceItem.accountRef.id<br>```<br><br>```<br>profit_and_loss.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>profit_and_loss.reports.costOfSales.accountId = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.expenses.accountId = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.income.accountId = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.otherExpenses.accountId = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>profit_and_loss.reports.otherIncome.accountId = journal_entries.journalLines.accountRef.id<br>```<br><br>```<br>profit_and_loss.companyId = journal_entries.companyId<br>``` |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>profit_and_loss.companyId = companies.id<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>profit_and_loss.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>profit_and_loss.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>profit_and_loss.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>profit_and_loss.companyId = bill_payments.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>profit_and_loss.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>profit_and_loss.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>profit_and_loss.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>profit_and_loss.companyId = payments.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>profit_and_loss.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>profit_and_loss.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>profit_and_loss.companyId = events.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>profit_and_loss.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>profit_and_loss.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>profit_and_loss.companyId = bank_accounts.companyId<br>``` |

profit\_and\_loss table schema

| **companyId**<br><br><br>STRING |
| --- |
| **currency**<br><br><br>STRING |
| **mostRecentAvailableMonth**<br><br><br>STRING |
| **reportBasis**<br><br><br>STRING |
| **reports**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>costOfSales: ARRAY, which is also a nested data structure.											<ul><li>accountId: STRING</li><li>name: STRING</li><li>value: NUMBER</li></ul></li><li>expenses: ARRAY, which is also a nested data structure.											<ul><li>accountId: STRING</li><li>name: STRING</li><li>value: NUMBER</li></ul></li><li>fromDate: STRING</li><li>grossProfit: NUMBER</li><li>income: ARRAY, which is also a nested data structure.											<ul><li>accountId: STRING</li><li>name: STRING</li><li>value: NUMBER</li></ul></li><li>netOperatingProfit: NUMBER</li><li>netOtherIncome: NUMBER</li><li>netProfit: NUMBER</li><li>otherExpenses: ARRAY, which is also a nested data structure.											<ul><li>accountId: STRING</li><li>name: STRING</li><li>value: NUMBER</li></ul></li><li>otherIncome: ARRAY, which is also a nested data structure.											<ul><li>accountId: STRING</li><li>name: STRING</li><li>value: NUMBER</li></ul></li><li>toDate: STRING</li></ul> |

### suppliers

The `suppliers` table contains info about the suppliers in your Codat instance. A supplier is a person or organization that provides a product or service.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | companyId<br><br>id |
| **Useful links** | [Codat documentation](https://docs.codat.io/Content/suppliers-2)<br><br>[Codat API method](https://docs.codat.io/reference/suppliers#suppliers_listpaged "Opens in new tab: Codat API method") |

suppliers table foreign keys

| Join suppliers with | on |
| --- | --- |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>suppliers.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>suppliers.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>suppliers.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>suppliers.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>suppliers.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>suppliers.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>suppliers.companyId = bills.companyId<br>```<br><br>```<br>suppliers.id = bills.supplierRef<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>suppliers.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>suppliers.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>suppliers.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>suppliers.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>suppliers.companyId = profit_and_loss.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>suppliers.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>suppliers.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>suppliers.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>suppliers.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#tax-rates) | ```<br>suppliers.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>suppliers.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>suppliers.companyId = bank_accounts.companyId<br>``` |

suppliers table schema

| **addresses**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>city: STRING</li><li>country: STRING</li><li>line1: STRING</li><li>line2: STRING</li><li>postalCode: STRING</li><li>region: STRING</li><li>type: STRING</li></ul> |
| --- |
| **companyId**<br><br><br>STRING |
| **contactName**<br><br><br>STRING |
| **emailAddress**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **phone**<br><br><br>STRING |
| **registrationNumber**<br><br><br>STRING |
| **status**<br><br><br>STRING |
| **supplierName**<br><br><br>STRING |
| **taxNumber**<br><br><br>STRING |

### tax\_rates

The tax\_rates table contains information about tax rates for a given company in your Codat account.

| **Replication Method** | CDC |
| --- | --- |
| **Primary Keys** | companyId<br><br>id |
| **Replication Key** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/taxrates)<br><br>[Codat API method](https://docs.codat.io/reference/taxrates#taxrates_listpaged "Opens in new tab: Codat API method") |

tax\_rates table foreign keys

| Join tax\_rates with | on |
| --- | --- |
| [companies](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#companies) | ```<br>tax_rates.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#balance-sheets) | ```<br>tax_rates.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statements) | ```<br>tax_rates.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-statement-lines) | ```<br>tax_rates.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bill-payments) | ```<br>tax_rates.companyId = bill_payments.supplierRef.companyId<br>```<br><br>```<br>tax_rates.companyId = bill_payments.companyId<br>``` |
| [bills](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bills) | ```<br>tax_rates.companyId = bills.companyId<br>```<br><br>```<br>tax_rates.id = bills.lineItems.taxRateRef.id<br>``` |
| [company_info](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#company-info) | ```<br>tax_rates.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#customers) | ```<br>tax_rates.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#invoices) | ```<br>tax_rates.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#payments) | ```<br>tax_rates.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#profit-and-loss) | ```<br>tax_rates.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#suppliers) | ```<br>tax_rates.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#connections) | ```<br>tax_rates.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#events) | ```<br>tax_rates.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#items) | ```<br>tax_rates.companyId = items.companyId<br>```<br><br>```<br>tax_rates.id = items.billItem.taxRateRef.id<br>```<br><br>```<br>tax_rates.id = items.invoiceItem.taxRateRef.id<br>``` |
| [journal_entries](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#journal-entries) | ```<br>tax_rates.companyId = journal_entries.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-account-transactions) | ```<br>tax_rates.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/DataIntegration/WebApplications/Connecting-Codat.htm#bank-accounts) | ```<br>tax_rates.companyId = bank_accounts.companyId<br>``` |

tax\_rates table schema

| **code**<br><br><br>STRING |
| --- |
| **companyId**<br><br><br>STRING |
| **components**<br><br><br>ARRAY<br><br>This is a nested data structure:<br><br><ul><li>isCompound: BOOLEAN</li><li>name: STRING</li><li>rate: NUMBER</li></ul> |
| **effectiveTaxRate**<br><br><br>NUMBER |
| **id**<br><br><br>STRING |
| **modifiedDate**<br><br><br>STRING |
| **name**<br><br><br>STRING |
| **sourceModifiedDate**<br><br><br>STRING |
| **totalTaxRate**<br><br><br>NUMBER |