# Codat (v1)

Information note **Codat is supported by the Singer community**   
This integration is powered by [Singer's](https://www.singer.io/) Codat tap. For support, [visit the GitHub repo](https://github.com/singer-io/tap-codat) or [join the Singer Slack](https://singer-slackin.herokuapp.com/).

## Codat integration summary

Stitch’s Codat integration replicates data using the [Codat API](https://docs.codat.io/docs) . Refer to the [Schema](https://help.qlik.com/en-US/stitch/integrations/saas/codat#schema) section for a list of objects available for replication.

## Codat feature snapshot

A high-level look at Stitch's Codat (v1) integration, including release status, useful links, and the features supported in Stitch.

| **STITCH** |  |  |  |
| --- | --- | --- | --- |
| **[Release status](https://help.qlik.com/en-US/stitch/integrations/identify-an-integration-version)** | Released on December 11, 2017 | **Supported by**<br><br>the Info icon<br><br>Indicates if the integration is supported by Stitch or the Singer community. | [Singer Community](https://www.singer.io/) |
| **Stitch plan**<br><br>the Info icon<br><br>The type of Stitch plan required to use the integration. | Standard | **[API availability](https://help.qlik.com/en-US/stitch/developers/stitch-connect/guides/source-destination-reference)**<br><br>the Info icon<br><br>Indicates if the integration is available as a source in Stitch Connect. | the Success icon<br><br>This version of the integration is available via the API.<br><br><br>Available |
| **Singer GitHub repository** | [singer-io/tap-codat](https://github.com/singer-io/tap-codat) |  |  |
| **REPLICATION SETTINGS** |  |  |  |
| **[Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/anchor-scheduling)**<br><br>the Info icon<br><br>A type of replication scheduling where an integration's Replication Frequency is anchored to a time you select. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **[Advanced Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/advanced-scheduling)**<br><br>the Info icon<br><br>A type of replication scheduling that allows you to specify granular start times for data extraction using cron expressions. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |
| **Table-level reset**<br><br>the Info icon<br><br>Indicates if data can be reset at the table level. If unsupported, data can only be reset at the integration level. | the Remove icon<br><br>Table-level resets are not supported for this integration. Resets are only supported at the integration level.<br><br><br>Unsupported | **[Configurable Replication Methods](https://help.qlik.com/en-US/stitch/replication/replication-methods)**<br><br>the Info icon<br><br>Indicates if Replication Methods can be defined by you for tables in the integration. | the Remove icon<br><br>Configurable Replication Methods are not supported for this integration. Stitch will use pre-defined replication methods for tables you set to replicate.<br><br><br>Unsupported |
| **DATA SELECTION** |  |  |  |
| **Table selection**<br><br>the Info icon<br><br>The ability to select individual tables for replication in the Stitch interface. If table selection is unavailable, all tables and all the columns they contain will be set to replicate by default. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **Column selection**<br><br>the Info icon<br><br>The ability to select individual columns for replication in the Stitch interface. If column selection is unavailable, all columns will be set to replicate by default. | the Remove icon<br><br>Column selection is not supported for this integration. All available columns in tables set to replicate will be selected.<br><br><br>Unsupported |
| **Select all**<br><br>the Info icon<br><br>Indicates if the integration supports selecting all available tables and columns. | the Success icon<br><br>Supported<br><br><br>Supported |  |  |
| **TRANSPARENCY** |  |  |  |
| **[Extraction Logs](https://help.qlik.com/en-US/stitch/replication/extractions/integration-extraction-logs)**<br><br>the Info icon<br><br>Logs detailing the Extraction phase of the replication process for a given integration. Includes error info, should an error occur. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **[Loading Reports](https://help.qlik.com/en-US/stitch/replication/integration-loading-reports)**<br><br>the Info icon<br><br>Reports detailing the Loading phase of the replication process for a given integration. Includes the number of rows loaded for each table and error info, should an error occur. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |

## Connecting Codat

### Codat setup requirements

To set up Codat in Stitch, you need:

* **Administrator or Developer privileges in Codat.** These are required to generate an API key. Refer to [Codat’s documentation](https://docs.codat.io/reference/authentication) for more info.

### Step 1: Retrieve your Codat API key

Information note **Note**: This step requires Administrator or Developer privileges in Codat.

1. Sign into your Codat account.
2. Click **Accounts &gt; Profile** in the sidenav.
3. On the **Manage Profile** page, locate the **API Key** field.
4. Click the copy icon to copy the API key.

Paste the API key somewhere handy - you’ll need it in the next step.

### Step 2: Add Codat as a Stitch data source

1. [Sign into your Stitch account](https://app.stitchdata.com/).

2. On the Stitch Dashboard page, click the **Add Integration** button.

3. Click the **Codat** icon.

4. Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.

   For example, the name “Stitch Codat” would create a schema called `stitch_codat` in the destination. **Note**: Schema names cannot be changed after you save the integration.

5. In the **API Key** field, paste the Codat API key you generated in [Step 1](https://help.qlik.com/en-US/stitch/integrations/saas/codat#generate-codat-api-key).

6. Check the **Use Codat UAT environment** box if you’re connecting to your UAT (sandbox) environment in Codat.

   **Note**: Use this setting only if you are connecting to a UAT (sandbox) Codat instance. Checking this box when the instance isn’t a sandbox will prevent a successful connection and `401 Bad Credentials` errors in the connection check logs.

### Step 3: Define the historical replication start date

The Sync Historical Data setting defines the starting date for your Codat integration. This means that data **equal to or newer than this date** will be replicated to your data warehouse.

Change this setting if you want to replicate data beyond Codat’s default setting of **1 year**. For a detailed look at historical replication jobs, check out the [Syncing Historical SaaS Data](https://help.qlik.com/en-US/stitch/replication/syncing-historical-saas-data-resetting-replication-keys) guide.

### Step 4: Create a replication schedule

Information note Replication schedules affect the time Extraction begins, not the time to data loaded. Refer to the [Replication Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling) documentation for more information.

In the **Replication Frequency** section, you’ll create the integration’s [replication schedule](https://help.qlik.com/en-US/stitch/replication/replication-scheduling). An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.

Codat integrations support the following replication scheduling methods:

* [Replication Frequency](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/replication-frequency)

* [Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/anchor-scheduling)

* [Advanced Scheduling using Cron](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/advanced-scheduling) (Advanced or Premium plans only)

To keep your row usage low, consider setting the integration to replicate less frequently. See the [Understanding and Reducing Your Row Usage guide](https://help.qlik.com/en-US/stitch/getting-started/understanding-stitch-usage) for tips on reducing your usage.

### Step 5: Set objects to replicate

Information note **Is an object missing or not replicating?** Verify that the object meets the requirements for [selection](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#selection-requirements) and [replication](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#replication-requirements).

The last step is to select the tables you want to replicate. [Learn about the available tables for this integration.](https://help.qlik.com/en-US/stitch/integrations/saas/codat#schema)

**Note**: If a replication job is currently in progress, new selections won’t be used until the next job starts.

* Selection options
* Individual tables
* All tables

For Codat integrations, you can select:

1. **Individual tables**

2. **All tables**

Click the tabs to view instructions for each selection method.

1. In the integration’s **Tables to Replicate tab**, locate a table you want to replicate.

2. To track a table, click the **checkbox** next to the table’s name. A blue checkmark means the table is set to replicate.

3. Repeat this process for all the tables you want to replicate.

4. When finished, click the **Finalize Your Selections** button at the bottom of the screen to save your selections.

Information note **Important**: Using the **Select All** feature will overwrite any previous selections. However, selections aren’t final until **Finalize Your Selections** is clicked. Clicking **Cancel** will restore your previous selections. Refer to the [Select All guide](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#set-all-data-to-replicate) for more info about this feature.

1. Click into the integration from the Stitch Dashboard page.

2. Click the **Tables to Replicate** tab.

3. In the list of tables, click the box next to the **Table Names** column.

4. In the menu that displays, click **Track all Tables and Fields**:

   ![The Track all Tables and Fields menu in the Tables to Replicate tab](https://help.qlik.com/en-US/stitch/images/replication/select-all-tables-menu.png)The Track all Tables and Fields menu in the Tables to Replicate tabThe Track all Tables and Fields menu in the Tables to Replicate tab

5. Click the **Finalize Your Selections** button at the bottom of the page to save your data selections.

### Initial and historical replication jobs

After you finish setting up Codat, its **Sync Status** may show as **Pending** on either the Stitch Dashboard or in the Integration Details page.

For a new integration, a **Pending** status indicates that Stitch is in the process of scheduling the initial replication job for the integration. **This may take some time to complete.**

Information note

**Initial replication jobs with Anchor Scheduling**

If using Anchor Scheduling, an initial replication job may not kick off immediately. This depends on the selected Replication Frequency and Anchor Time. Refer to the [Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling#job-scheduling-and-anchor-times) documentation for more information.

#### Free historical data loads

The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.

Information note **Replication will continue after the seven days are over**. If you’re no longer interested in this source, be sure to **pause** or **delete** the integration to prevent unwanted usage.

## Codat table reference

Information note

**Schemas and versioning**

Schemas and naming conventions can change from version to version, so we recommend verifying your integration’s version before continuing.

The schema and info displayed below is for **version 1** of this integration.

This is the latest version of the Codat integration.

Information note

**Table and column names in your destination**

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

For example: Object names are lowercased in Redshift (`CusTomERs` &gt; `customers`), while case is maintained in PostgreSQL destinations (`CusTomERs` &gt; `CusTomERs`). Refer to the [Loading Guide](https://help.qlik.com/en-US/stitch/replication/loading/destination-guides) for your destination for more info.

### 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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id<br><br>companyId |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/accounts-1 "Opens in new tab: Codat documentation")<br><br><br>[accounts schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/accounts.json "Opens in new tab: accounts schema on GitHub")<br><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/stitch/integrations/saas/codat#bank-accounts) | ```<br>accounts.name = bank_accounts.accountName<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>accounts.id = bills.lineItems.accountRef.id<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#journal-entries) | ```<br>accounts.id = journal_entries.journalLines.accountRef.id<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/balance-sheet-2 "Opens in new tab: Codat documentation")<br><br><br>[balance_sheets schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/balance_sheets.json "Opens in new tab: balance_sheets schema on GitHub")<br><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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#companies) | ```<br>balance_sheets.companyId = companies.id<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>balance_sheets.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>balance_sheets.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#company-info) | ```<br>balance_sheets.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>balance_sheets.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>balance_sheets.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>balance_sheets.companyId = payments.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>balance_sheets.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>balance_sheets.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>balance_sheets.companyId = events.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>balance_sheets.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>balance_sheets.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand reports<br><br><table> <tr> <td> <p> <strong>								assets							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand assets</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								accountId							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								date							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								equity							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand equity</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								accountId							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								liabilities							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand liabilities</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								accountId							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								netAssets							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table> |
| **status**<br><br><br>OBJECT, STRING<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |

### 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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | \_transactionIndex<br><br>bankAccountId<br><br>companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/bank-transactions "Opens in new tab: Codat documentation")<br><br><br>[bank_account_transactions schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/bank_account_transactions.json "Opens in new tab: bank_account_transactions schema on GitHub")<br><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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#companies) | ```<br>bank_account_transactions.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>bank_account_transactions.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>bank_account_transactions.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>bank_account_transactions.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>bank_account_transactions.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>bank_account_transactions.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>bank_account_transactions.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>bank_account_transactions.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>bank_account_transactions.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/stitch/integrations/saas/codat#profit-and-loss) | ```<br>bank_account_transactions.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>bank_account_transactions.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>bank_account_transactions.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>bank_account_transactions.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>bank_account_transactions.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>bank_account_transactions.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | accountName<br><br>companyId<br><br>connectionId |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/bank-accounts "Opens in new tab: Codat documentation")<br><br><br>[bank_accounts schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/bank_accounts.json "Opens in new tab: bank_accounts schema on GitHub")<br><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/stitch/integrations/saas/codat#accounts) | ```<br>bank_accounts.accountName = accounts.name<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#companies) | ```<br>bank_accounts.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>bank_accounts.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>bank_accounts.companyId = bank_statements.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>bank_accounts.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>bank_accounts.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>bank_accounts.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>bank_accounts.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>bank_accounts.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/stitch/integrations/saas/codat#profit-and-loss) | ```<br>bank_accounts.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>bank_accounts.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>bank_accounts.companyId = connections.companyId<br>```<br><br>```<br>bank_accounts.connectionId = connections.id<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>bank_accounts.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>bank_accounts.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>bank_accounts.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | accountName<br><br>companyId<br><br>\_lineIndex |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/bank-transactions "Opens in new tab: Codat documentation")<br><br><br>[bank_statement_lines schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/bank_statement_lines.json "Opens in new tab: bank_statement_lines schema on GitHub")<br><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/stitch/integrations/saas/codat#accounts) | ```<br>bank_statement_lines.accountName = accounts.name<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#companies) | ```<br>bank_statement_lines.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>bank_statement_lines.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>bank_statement_lines.companyId = bank_statements.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>bank_statement_lines.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>bank_statement_lines.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>bank_statement_lines.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>bank_statement_lines.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>bank_statement_lines.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/stitch/integrations/saas/codat#profit-and-loss) | ```<br>bank_statement_lines.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>bank_statement_lines.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>bank_statement_lines.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>bank_statement_lines.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>bank_statement_lines.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>bank_statement_lines.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>bank_statement_lines.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id<br><br>companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/bank-accounts "Opens in new tab: Codat documentation")<br><br><br>[bank_statements schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/bank_statements.json "Opens in new tab: bank_statements schema on GitHub")<br><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/stitch/integrations/saas/codat#companies) | ```<br>bank_statements.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>bank_statements.companyId = balance_sheets.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>bank_statements.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>bank_statements.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>bank_statements.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>bank_statements.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>bank_statements.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>bank_statements.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/stitch/integrations/saas/codat#profit-and-loss) | ```<br>bank_statements.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>bank_statements.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>bank_statements.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>bank_statements.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>bank_statements.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>bank_statements.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>bank_statements.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>bank_statements.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/billpayments-1 "Opens in new tab: Codat documentation")<br><br><br>[bill_payments schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/bill_payments.json "Opens in new tab: bill_payments schema on GitHub")<br><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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand lines<br><br><table> <tr> <td> <p> <strong>								amount							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								links							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand links</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> </table> |
| **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. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand supplierRef<br><br><table> <tr> <td> <p> <strong>								addresses							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand addresses</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								city							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								country							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line1							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line2							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								postalCode							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								region							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								companyId							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								contactName							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								emailAddress							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								phone							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								registrationNumber							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								status							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								supplierName							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								taxNumber							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **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/stitch/integrations/saas/codat#suppliers).

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>id |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/bills-1 "Opens in new tab: Codat documentation")<br><br><br>[bills schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/bills.json "Opens in new tab: bills schema on GitHub")<br><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/stitch/integrations/saas/codat#accounts) | ```<br>bills.lineItems.accountRef.id = accounts.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#companies) | ```<br>bills.companyId = companies.id<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>bills.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>bills.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#company-info) | ```<br>bills.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>bills.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>bills.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>bills.companyId = payments.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>bills.companyId = suppliers.companyId<br>```<br><br>```<br>bills.supplierRef = suppliers.id<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>bills.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>bills.companyId = events.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>bills.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand lineItems<br><br><table> <tr> <td> <p> <strong>								accountRef							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand accountRef</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								description							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								discountAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								discountPercentage							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								itemRef							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand itemRef</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								quantity							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								subTotal							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								taxAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								taxRateRef							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand taxRateRef</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								totalAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								unitAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table> |
| **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. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand supplierRef<br><br><table> <tr> <td> <p> <strong>								addresses							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand addresses</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								city							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								country							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line1							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line2							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								postalCode							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								region							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								companyId							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								contactName							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								emailAddress							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								phone							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								registrationNumber							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								status							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								supplierName							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								taxNumber							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/companies "Opens in new tab: Codat documentation")<br><br><br>[companies schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/companies.json "Opens in new tab: companies schema on GitHub")<br><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/stitch/integrations/saas/codat#balance-sheets) | ```<br>companies.id = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>companies.id = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>companies.id = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>companies.id = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>companies.id = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>companies.id = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>companies.id = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>companies.id = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/stitch/integrations/saas/codat#profit-and-loss) | ```<br>companies.id = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>companies.id = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>companies.id = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>companies.id = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>companies.id = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>companies.id = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>companies.id = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>companies.id = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/info "Opens in new tab: Codat documentation")<br><br><br>[company_info schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/company_info.json "Opens in new tab: company_info schema on GitHub")<br><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/stitch/integrations/saas/codat#companies) | ```<br>company_info.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>company_info.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>company_info.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>company_info.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>company_info.companyId = bills.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>company_info.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>company_info.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>company_info.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/stitch/integrations/saas/codat#profit-and-loss) | ```<br>company_info.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>company_info.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>company_info.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>company_info.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>company_info.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>company_info.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>company_info.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>company_info.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand addresses<br><br><table> <tr> <td> <p> <strong>								city							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								country							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line1							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line2							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								postalCode							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								region							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand phoneNumbers<br><br><table> <tr> <td> <p> <strong>								number							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **registrationNumber**<br><br><br>STRING |
| **taxNumber**<br><br><br>STRING |
| **webLinks**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand webLinks<br><br><table> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								url							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |

### connections

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

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>id |
| **Useful links** | [connections schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/connections.json "Opens in new tab: connections schema on GitHub")<br><br><br>[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/stitch/integrations/saas/codat#companies) | ```<br>connections.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>connections.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>connections.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>connections.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>connections.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>connections.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>connections.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>connections.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>connections.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/stitch/integrations/saas/codat#profit-and-loss) | ```<br>connections.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>connections.companyId = suppliers.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>connections.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>connections.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>connections.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>connections.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>connections.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id<br><br>companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/credit-notes "Opens in new tab: Codat documentation")<br><br><br>[credit_notes schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/credit_notes.json "Opens in new tab: credit_notes schema on GitHub")<br><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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand customerRef<br><br><table> <tr> <td> <p> <strong>								companyName							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **id**<br><br><br>STRING |
| **issueDate**<br><br><br>DATE-TIME |
| **paymentAllocations**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/customers "Opens in new tab: Codat documentation")<br><br><br>[customers schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/customers.json "Opens in new tab: customers schema on GitHub")<br><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/stitch/integrations/saas/codat#companies) | ```<br>customers.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>customers.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>customers.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>customers.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>customers.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>customers.companyId = company_info.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>customers.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#profit-and-loss) | ```<br>customers.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>customers.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>customers.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>customers.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>customers.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>customers.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>customers.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>customers.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-accounts) | ```<br>customers.companyId = bank_accounts.companyId<br>``` |
| [credit_notes](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand addresses<br><br><table> <tr> <td> <p> <strong>								city							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								country							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line1							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line2							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								postalCode							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								region							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| --- |
| **companyId**<br><br><br>STRING |
| **contactName**<br><br><br>STRING |
| **contacts**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand contacts<br><br><table> <tr> <td> <p> <strong>								address							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand address</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								city							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								country							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line1							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line2							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								postalCode							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								region							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								email							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								modifiedDate							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								phone							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand phone</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								number							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								status							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>eventTimeUtc |
| **Useful links** | [events schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/events.json "Opens in new tab: events schema on GitHub")<br><br><br>[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/stitch/integrations/saas/codat#companies) | ```<br>events.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>events.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>events.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>events.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>events.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>events.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>events.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>events.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>events.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/stitch/integrations/saas/codat#profit-and-loss) | ```<br>events.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>events.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>events.companyId = connections.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>events.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>events.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>events.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>events.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#customers).

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/invoices-1 "Opens in new tab: Codat documentation")<br><br><br>[invoices schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/invoices.json "Opens in new tab: invoices schema on GitHub")<br><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/stitch/integrations/saas/codat#companies) | ```<br>invoices.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>invoices.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>invoices.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>invoices.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>invoices.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>invoices.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>invoices.companyId = customers.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#profit-and-loss) | ```<br>invoices.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>invoices.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>invoices.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>invoices.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>invoices.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>invoices.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>invoices.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>invoices.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand customerRef<br><br><table> <tr> <td> <p> <strong>								companyName							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand lineItems<br><br><table> <tr> <td> <p> <strong>								description							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								discountAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								quantity							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								subTotal							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								taxAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								totalAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								unitAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table> |
| **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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/items "Opens in new tab: Codat documentation")<br><br><br>[items schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/items.json "Opens in new tab: items schema on GitHub")<br><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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#companies) | ```<br>items.companyId = companies.id<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>items.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>items.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#company-info) | ```<br>items.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>items.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>items.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>items.companyId = payments.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>items.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>items.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>items.companyId = events.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>items.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand billItem<br><br><table> <tr> <td> <p> <strong>								accountRef							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand accountRef</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								description							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								taxRateRef							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand taxRateRef</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								unitPrice							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table> |
| --- |
| **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. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand invoiceItem<br><br><table> <tr> <td> <p> <strong>								accountRef							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand accountRef</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								description							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								taxRateRef							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand taxRateRef</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								unitPrice							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table> |
| **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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/journals "Opens in new tab: Codat documentation")<br><br><br>[journal_entries schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/journal_entries.json "Opens in new tab: journal_entries schema on GitHub")<br><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/stitch/integrations/saas/codat#accounts) | ```<br>journal_entries.journalLines.accountRef.id = accounts.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#companies) | ```<br>journal_entries.companyId = companies.id<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>journal_entries.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>journal_entries.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#company-info) | ```<br>journal_entries.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>journal_entries.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>journal_entries.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>journal_entries.companyId = payments.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>journal_entries.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>journal_entries.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>journal_entries.companyId = events.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>journal_entries.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>journal_entries.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand journalLines<br><br><table> <tr> <td> <p> <strong>								accountRef							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand accountRef</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								currency							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								description							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								grossAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								netAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								taxAmount							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table> |
| **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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>id |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/payments-1 "Opens in new tab: Codat documentation")<br><br><br>[payments schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/payments.json "Opens in new tab: payments schema on GitHub")<br><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/stitch/integrations/saas/codat#companies) | ```<br>payments.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>payments.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>payments.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>payments.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>payments.companyId = bills.companyId<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>payments.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>payments.companyId = customers.companyId<br>```<br><br>```<br>payments.customerRef.id = customers.id<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#profit-and-loss) | ```<br>payments.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>payments.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>payments.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>payments.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>payments.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>payments.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>payments.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>payments.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-accounts) | ```<br>payments.companyId = bank_accounts.companyId<br>``` |
| [credit_notes](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand customerRef<br><br><table> <tr> <td> <p> <strong>								companyName							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **date**<br><br><br>DATE-TIME |
| **id**<br><br><br>STRING |
| **lines**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand lines<br><br><table> <tr> <td> <p> <strong>								amount							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								links							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand links</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> </table> |
| **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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/profit-and-loss-2 "Opens in new tab: Codat documentation")<br><br><br>[profit_and_loss schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/profit_and_loss.json "Opens in new tab: profit_and_loss schema on GitHub")<br><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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#companies) | ```<br>profit_and_loss.companyId = companies.id<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>profit_and_loss.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>profit_and_loss.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#company-info) | ```<br>profit_and_loss.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>profit_and_loss.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>profit_and_loss.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>profit_and_loss.companyId = payments.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>profit_and_loss.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>profit_and_loss.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>profit_and_loss.companyId = events.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>profit_and_loss.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>profit_and_loss.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand reports<br><br><table> <tr> <td> <p> <strong>								costOfSales							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand costOfSales</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								accountId							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								expenses							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand expenses</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								accountId							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								fromDate							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								grossProfit							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								income							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand income</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								accountId							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								netOperatingProfit							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								netOtherIncome							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								netProfit							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								otherExpenses							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand otherExpenses</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								accountId							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								otherIncome							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand otherIncome</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								accountId							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								toDate							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |

### 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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>id |
| **Useful links** | [Codat documentation](https://docs.codat.io/docs/suppliers-2 "Opens in new tab: Codat documentation")<br><br><br>[suppliers schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/suppliers.json "Opens in new tab: suppliers schema on GitHub")<br><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/stitch/integrations/saas/codat#companies) | ```<br>suppliers.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>suppliers.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>suppliers.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>suppliers.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#bills) | ```<br>suppliers.companyId = bills.companyId<br>```<br><br>```<br>suppliers.id = bills.supplierRef<br>``` |
| [company_info](https://help.qlik.com/en-US/stitch/integrations/saas/codat#company-info) | ```<br>suppliers.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>suppliers.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>suppliers.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>suppliers.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/stitch/integrations/saas/codat#profit-and-loss) | ```<br>suppliers.companyId = profit_and_loss.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>suppliers.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>suppliers.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#items) | ```<br>suppliers.companyId = items.companyId<br>``` |
| [journal_entries](https://help.qlik.com/en-US/stitch/integrations/saas/codat#journal-entries) | ```<br>suppliers.companyId = journal_entries.companyId<br>``` |
| [tax_rates](https://help.qlik.com/en-US/stitch/integrations/saas/codat#tax-rates) | ```<br>suppliers.companyId = tax_rates.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>suppliers.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand addresses<br><br><table> <tr> <td> <p> <strong>								city							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								country							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line1							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								line2							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								postalCode							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								region							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| --- |
| **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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | companyId<br><br>id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | modifiedDate |
| **Useful links** | [Codat documentation](https://docs.codat.io/reference/taxrates "Opens in new tab: Codat documentation")<br><br><br>[tax_rates schema on GitHub](https://github.com/singer-io/tap-codat/blob/master/tap_codat/schemas/tax_rates.json "Opens in new tab: tax_rates schema on GitHub")<br><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/stitch/integrations/saas/codat#companies) | ```<br>tax_rates.companyId = companies.id<br>``` |
| [balance_sheets](https://help.qlik.com/en-US/stitch/integrations/saas/codat#balance-sheets) | ```<br>tax_rates.companyId = balance_sheets.companyId<br>``` |
| [bank_statements](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statements) | ```<br>tax_rates.companyId = bank_statements.companyId<br>``` |
| [bank_statement_lines](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-statement-lines) | ```<br>tax_rates.companyId = bank_statement_lines.companyId<br>``` |
| [bill_payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#company-info) | ```<br>tax_rates.companyId = company_info.companyId<br>``` |
| [customers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#customers) | ```<br>tax_rates.companyId = customers.companyId<br>``` |
| [invoices](https://help.qlik.com/en-US/stitch/integrations/saas/codat#invoices) | ```<br>tax_rates.companyId = invoices.companyId<br>``` |
| [payments](https://help.qlik.com/en-US/stitch/integrations/saas/codat#payments) | ```<br>tax_rates.companyId = payments.companyId<br>``` |
| [profit_and_loss](https://help.qlik.com/en-US/stitch/integrations/saas/codat#profit-and-loss) | ```<br>tax_rates.companyId = profit_and_loss.companyId<br>``` |
| [suppliers](https://help.qlik.com/en-US/stitch/integrations/saas/codat#suppliers) | ```<br>tax_rates.companyId = suppliers.companyId<br>``` |
| [connections](https://help.qlik.com/en-US/stitch/integrations/saas/codat#connections) | ```<br>tax_rates.companyId = connections.companyId<br>``` |
| [events](https://help.qlik.com/en-US/stitch/integrations/saas/codat#events) | ```<br>tax_rates.companyId = events.companyId<br>``` |
| [items](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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/stitch/integrations/saas/codat#journal-entries) | ```<br>tax_rates.companyId = journal_entries.companyId<br>``` |
| [bank_account_transactions](https://help.qlik.com/en-US/stitch/integrations/saas/codat#bank-account-transactions) | ```<br>tax_rates.companyId = bank_account_transactions.companyId<br>``` |
| [bank_accounts](https://help.qlik.com/en-US/stitch/integrations/saas/codat#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. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand components<br><br><table> <tr> <td> <p> <strong>								isCompound							</strong> </p> <p>							BOOLEAN													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								rate							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table> |
| **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 |