Codat integration summary

Stitch’s Codat integration replicates data using the Codat API . Refer to the Schema section for a list of objects available for replication.

Codat feature snapshot

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

STITCH
Release Status Released Supported By

Singer Community

Stitch Plan

Free

Singer GitHub Repository

Codat Repository

DATA SELECTION
Table Selection

Supported

Column Selection

Unsupported

REPLICATION SETTINGS
Anchor Scheduling

Supported

Advanced Scheduling

Unsupported

Table-level Reset

Unsupported

Configurable Replication Methods

Unsupported

TRANSPARENCY
Extraction Logs

Supported

Loading Reports

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 for more info.

Step 1: Retrieve your Codat API key

  1. Sign into your Codat account.
  2. Click Accounts > 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.
  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.
  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 sync

The Sync Historical Data setting will define the starting date for your Codat integration. This means that:

  • For tables using Incremental Replication, data equal to or newer than this date will be replicated to your data warehouse.
  • For tables using Full Table Replication, all data - including records that are older, 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 guide.

Step 4: Create a replication schedule

In the Replication Frequency section, you’ll create the integration’s replication schedule. 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:

To keep your row usage low, consider setting the integration to replicate less frequently. See the Understanding and Reducing Your Row Usage guide for tips on reducing your usage.

Step 5: Set tables to replicate

To complete the setup, you’ll need to select the tables you want to replicate to your data warehouse.

Check out the Schema section to learn more about the available tables in Codat and how they replicate.

  1. In the list of tables that displays - or in the Tables to Replicate tab, if you skipped this step during setup - locate a table you want to replicate.
  2. To track a table, click the checkbox next to the table’s name. A green 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.

Note: If you change these settings while a replication job is still in progress, they will not be used until the next job starts.

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.

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.


Codat table schemas

Replication Method :

Full Table

Primary Key :

id : companyId

API endpoint :

List 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.

id
STRING

The account ID.

Reference:

companyId
STRING

The ID of the company associated with the account.

Reference:

currency
STRING

The currency of the account.

currentBalance
NUMBER

The current balance of the account.

fullyQualifiedName
STRING

The full name of the account. For example: Liability.Current.VAT

isBankAccount
BOOLEAN

Indicates if the account is a bank account.

name
STRING

The name of the account.

nominalCode
STRING

The reference given to each nominal account for a business.

status
STRING

The status of the account. Possible values are:

  • Unknown
  • Active
  • Archived
  • Pending

type
STRING

The type of account. Possible values are:

  • Unknown
  • Asset
  • Expense
  • Income
  • Liability
  • Equity

Replication Method :

Full Table

Primary Key :

companyId

API endpoint :

List balance sheets for a company

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.

companyId
STRING

The ID of the company the balance sheet is for.

currency
STRING

The currency of the balance sheet.

mostRecentAvailableMonth
STRING

The most recent available month from which report data can be shown.

reports
ARRAY

A list of balance sheet reports.

assets
ARRAY

A list of asset report lines.

date
DATE-TIME

The specified point in time for the balance sheet.

equity
ARRAY

A list of equity report lines.

liabilities
ARRAY

A list of liability report lines.

netAssets
NUMBER

The value of net assets for the company, in their base currency.

balance_sheets (table), reports (attribute)

status
STRING


Replication Method :

Full Table

Primary Key :

id : companyId

API endpoint :

List bank statements for a company

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

id
STRING

The bank statement ID.

companyId
STRING

The ID of the company associated with the account.

accountName
STRING

The name of the bank account.

accountNumber
STRING

The account number for the bank account.

availableBalance
NUMBER, STRING

The total available balance of the bank account, as reported by the underlying data source.

balance
NUMBER, STRING

The balance of the bank account.

currency
STRING

The currency of the bank account.

details
ARRAY

Details about the transactions contained in the bank statement.

amount
NUMBER

The amount of the line item.

balance
NUMBER

The current balance of the bank account, with the line item accounted for.

date
DATE-TIME

The date of the transaction.

description
STRING

A description of the transaction.

id
STRING

The ID for the bank transaction.

reconciled
BOOLEAN

Indicates if the bank account has been reconciled with the accounting platform or not.

bank_statements (table), details (attribute)

fromDate
DATE-TIME

iban
STRING

The international bank account number of the account.

sortCode
STRING

The sort code for the bank account.

toDate
DATE-TIME


Replication Method :

Full Table

Primary Key :

companyId : id

API endpoint :

Get bills for a company

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.

companyId
STRING

The ID of the company associated with the bill.

id
STRING

The bill ID.

amountDue
NUMBER

The amount due for the bill.

currency
STRING

The currency of the bill.

dueDate
DATE-TIME

The date the bill is due to be paid by.

issueDate
DATE-TIME

The date the bill was recorded in the accounting system.

reference
STRING

A user-friendly identifier for the bill.

status
STRING

The status of the bill. Possible values are:

  • Draft - Bill is yet to be authorised and sent by the Supplier and will not be used in any reports. It may contain incomplete line items.
  • Open - The Bill is no longer a draft. It has no payments made against it (amountDue == totalAmount).
  • PartiallyPaid - The balance paid against the Bill is positive, but less than the total Bill amount (0 < amountDue < totalAmount).
  • Paid - Bill is paid in full. This includes if the Bill has been credited or overpaid. (amountDue == 0)
  • Void - A Bill can become Void by being deleted, refunded, written off or cancelled. Note: A voided Bill may still be partiallyPaid and so all outstanding amounts on voided Bills are removed from the AP (Accounts Payable) account.
  • Unknown

subTotal
NUMBER

The total amount of the bill, excluding any taxes.

supplierRef
STRING

The supplier the bill has been received from.

Reference:

taxAmount
NUMBER

The amount of tax on the bill.

totalAmount
NUMBER

The total amount of the bill, including tax.


Replication Method :

Full Table

Primary Key :

id

API endpoint :

List 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.

id
STRING

The company ID.

lastSync
DATE-TIME

name
STRING

The name of the company.

platform
STRING

redirect
STRING

status
STRING


Replication Method :

Full Table

Primary Key :

companyId

API endpoint :

List basic info for a company

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.

companyId
STRING

The company ID.

Reference:

accountingPlatformRef
STRING

A company reference as provided by some accounting platforms.

addresses
ARRAY

A list of addresses associated with the company.

city
STRING

The city.

country
STRING

The country.

line1
STRING

The first address line.

line2
STRING

The second address line.

postalCode
STRING

The zip or postal code.

region
STRING

The region.

type
STRING

The type of the address. Possible values are:

  • Billing
  • Delivery
  • Unknown
company_info (table), addresses (attribute)

baseCurrency
STRING

The currency set in the linked company’s accounting platform.

companyLegalName
STRING

The legal registered name of the linked company.

companyName
STRING

The name of the linked company.

createdDate
STRING

The date the linked company was created in the accounting platform.

financialYearStartDate
DATE-TIME

The date for the start of the company’s financial year.

phoneNumbers
ARRAY

A list of phone numbers associated with the linked company.

number
STRING

The phone number.

type
STRING

The type of phone number. Possible values are:

  • Primary
  • Landline
  • Mobile
  • Fax
  • Unknown
company_info (table), phoneNumbers (attribute)

registrationNumber
STRING

The registration number given to the linked company by the companies authority in the country of origin.

taxNumber
STRING

The company tax number.

webLinks
ARRAY

A list of web links associated with the company.


Replication Method :

Full Table

Primary Key :

id : companyId

API endpoint :

List credit notes for a company

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

id
STRING

The credit note ID.

Reference:

companyId
STRING

The ID of the company associated with the credit note.

creditNoteNumber
STRING

A user-friendly reference for the credit note.

currency
STRING

The currency for the credit note.

customerRef
OBJECT

Details about the customer the credit note has been issued to.

companyName
STRING

The name of the customer’s company.

id
STRING

The customer ID.

Reference:

credit_notes (table), customerRef (attribute)

issueDate
DATE-TIME

The date of the credit note as recorded in the accounting system.

paymentAllocations
ARRAY

A list of credit note payment allocations.

id
STRING

The payment allocation ID.

currency
STRING

The currency of the payment allocation.

date
DATE-TIME

The date the payment allocation was recorded.

note
STRING

Additional info about the payment allocation.

totalAmount
NUMBER

The total amount of the payment allocation.

credit_notes (table), paymentAllocations (attribute)

remainingCredit
NUMBER

The unused balance of the totalAmount originally raised.

status
STRING

The status of the credit note. Possible values are:

  • Draft
  • Submitted
  • Paid
  • Void

totalAmount
NUMBER

The total amount of the credit that has been applied to the customer’s account receivable.


Replication Method :

Full Table

Primary Key :

companyId : id

API endpoint :

List 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.

companyId
STRING

The ID of the company associated with the customer.

Reference:

id
STRING

The customer ID.

Reference:

addresses
ARRAY

A list of addresses associated with the customer.

city
STRING

The city.

country
STRING

The country.

line1
STRING

The first address line.

line2
STRING

The second address line.

postalCode
STRING

The zip or postal code.

region
STRING

The region.

type
STRING

The type of the address. Possible values are:

  • Billing
  • Delivery
  • Unknown
customers (table), addresses (attribute)

contactName
STRING

The name of the main contact for the customer.

contacts
ARRAY

An array of contacts associated with the customer.

address
OBJECT

The contact’s address.

city
STRING

The city.

country
STRING

The country.

line1
STRING

The first address line.

line2
STRING

The second address line.

postalCode
STRING

The zip or postal code.

region
STRING

The region.

type
STRING

The type of the address. Possible values are:

  • Billing
  • Delivery
  • Unknown
customers (table), address (attribute)

email
STRING

The contact’s email address.

modifiedDate
DATE-TIME

The time the contact was last modified.

name
STRING

The contact’s name.

phone
ARRAY

A list of phone numbers for the contact.

number
STRING

The phone number.

type
STRING

The type of phone number. Possible values are:

  • Primary
  • Landline
  • Mobile
  • Fax
  • Unknown
customers (table), phone (attribute)

status
STRING

The status. Possible values are:

  • Active
  • Archived
  • Unknown
customers (table), contacts (attribute)

customerName
STRING

The name of the customer.

defaultCurrency
STRING

The default currency the customer’s transactional data is recorded in.

emailAddress
STRING

The customer’s email address.

modifiedDate
DATE-TIME

The time the customer was last modified.

phone
STRING

The phone number for the contact.

registrationNumber
STRING

The company number.

status
STRING

The status. Possible values are:

  • Active
  • Archived
  • Unknown

taxNumber
STRING

The company tax number.


Replication Method :

Full Table

Primary Key :

companyId : id

API endpoint :

List invoices for a company

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.

companyId
STRING

The ID of the company associated with the invoice.

Reference:

id
STRING

The invoice ID.

Reference:

amountDue
NUMBER

The amount outstanding on the invoice.

currency
STRING

The currency of the invoice.

customerRef
OBJECT

Details about the customer the invoice is for.

companyName
STRING

The name of the company.

id
STRING

The customer ID.

Reference:

invoices (table), customerRef (attribute)

dueDate
DATE-TIME

The date the invoice is due to be paid by.

invoiceNumber
STRING

A user-friendly reference for the invoice.

issueDate
DATE-TIME

The date the invoice was recorded in the accounting system.

lineItems
ARRAY

A list of line items in the invoice.

description
STRING

A user-friendly name of the goods or services provided.

discountAmount
NUMBER

The numerical value of any discounts applied.

quantity
NUMBER

The number of units of goods or services provided.

subTotal
NUMBER

The amount of the line, inclusive of discounts but exclusive of tax.

taxAmount
NUMBER

The amount of tax for the line.

totalAmount
NUMBER

The total amount of the line, including tax.

unitAmount
NUMBER

The price of each unit of goods or services.

invoices (table), lineItems (attribute)

modifiedDate
DATE-TIME

The time the invoice was last modified.

paidOnDate
DATE-TIME

The date the invoice was marked as paid.

paymentAllocations
ARRAY

A list of payment allocations associated with the invoice.

id
STRING

The payment allocation ID.

currency
STRING

The currency of the payment allocation.

date
DATE-TIME

The date the payment allocation was recorded.

note
STRING

Additional info about the payment allocation.

totalAmount
NUMBER

The total amount of the payment allocation.

invoices (table), paymentAllocations (attribute)

status
STRING

The status of the invoice. Possible values are:

  • Draft - Invoice has not been submitted to the Supplier. It may be in a pending state or is scheduled for future submission e.g. via email.
  • Submitted - Invoice is no longer a draft and has been sent to the Supplier. In this state, no payments have been made against the invoice (amountDue == totalAmount).
  • PartiallyPaid - The balance paid against the invoice is positive, but less than the total invoice amount (0 < amountDue < totalAmount).
  • Paid - Invoice is paid in full. This includes if the Invoice has been credited or overpaid (amountDue == 0). - Void - An invoice can become Void by being deleted, refunded, written off, or cancelled. Note, a voided Invoice may still be partiallyPaid and so all outstanding amounts on voided Inovices are removed from the AR (Accounts Receivable) account.

subTotal
NUMBER

The total amount of the invoice, excluding tax.

totalAmount
NUMBER

The amount of the invoice, including tax.

totalDiscount
NUMBER

The numerical value of discounts applied to the invoice.

totalTaxAmount
NUMBER

The amount of tax on the invoice.


Replication Method :

Full Table

Primary Key :

companyId : id

API endpoint :

List payments for a company

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

companyId
STRING

The ID of the company associated with the payment.

Reference:

id
STRING

The payment ID.

currency
STRING

The ISO currency code the payment was recorded in.

customerRef
OBJECT

Details about the customer the payment was recorded against.

companyName
STRING

The name of the company.

id
STRING

The customer’s ID.

Reference:

payments (table), customerRef (attribute)

date
DATE-TIME

The date the payment was recorded.

lines
ARRAY

A list of lines associated with the payment.

amount
NUMBER

The amount in the payment currency.

links
ARRAY

A list of allocations for the payment line.

payments (table), lines (attribute)

note
STRING

Additional information about the payment.

totalAmount
NUMBER

The amount of the payment in the payment currency.


Replication Method :

Full Table

Primary Key :

companyId

API endpoint :

List latest profit and loss for a company

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

companyId
STRING

The company ID.

Reference:

currency
STRING

The base currency for the company.

mostRecentAvailableMonth
STRING

The most recent available month from which report data can be shown.

reportBasis
STRING

The basis of the report. Possible values are:

  • Accrual
  • Cash
  • Unknown

reports
ARRAY

A list of profit and loss reports.

costOfSales
ARRAY

A list of line items for cost of sales.

accountId
STRING

The account ID.

Reference:

name
STRING

The name of the account.

value
NUMBER

The balance of the account.

profit_and_loss (table), costOfSales (attribute)

expenses
ARRAY

A list of line items for expenses.

accountId
STRING

The account ID.

Reference:

name
STRING

The name of the account.

value
NUMBER

The balance of the account.

profit_and_loss (table), expenses (attribute)

fromDate
STRING

The date from which the report data begins.

grossProfit
NUMBER

The gross profit of the company for the given date range (fromDate - toDate).

income
ARRAY

A list of line items for other income.

accountId
STRING

The account ID.

Reference:

name
STRING

The name of the account.

value
NUMBER

The balance of the account.

profit_and_loss (table), income (attribute)

netOperatingProfit
NUMBER

The net operating profit of the company for the given date range (fromDate - toDate).

netOtherIncome
NUMBER

The net other income of the company for the given date range (fromDate - toDate).

netProfit
NUMBER

The net profit of the company for the given date range (fromDate - toDate).

otherExpenses
ARRAY

A list of line items for other expenses.

accountId
STRING

The account ID.

Reference:

name
STRING

The name of the account.

value
NUMBER

The balance of the account.

profit_and_loss (table), otherExpenses (attribute)

otherIncome
ARRAY

A list of line items for other income.

accountId
STRING

The account ID.

Reference:

name
STRING

The name of the account.

value
NUMBER

The balance of the account.

profit_and_loss (table), otherIncome (attribute)

toDate
STRING

The date for which the report data ends.

profit_and_loss (table), reports (attribute)

Replication Method :

Full Table

Primary Key :

companyId : id

API endpoint :

Get suppliers for a company

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.

companyId
STRING

The company ID.

Reference:

id
STRING

The supplier ID.

addresses
ARRAY

A list of addresses associated with the supplier.

city
STRING

The city.

country
STRING

The country.

line1
STRING

The first address line.

line2
STRING

The second address line.

postalCode
STRING

The zip or postal code.

region
STRING

The region.

type
STRING

The type of the address. Possible values are:

  • Billing
  • Delivery
  • Unknown
suppliers (table), addresses (attribute)

contactName
STRING

The name of the main contact for the supplier.

emailAddress
STRING

The supplier’s email address.

phone
STRING

The supplier’s phone number.

registrationNumber
STRING

The company number of the supplier.

status
STRING

The status of the supplier. Possible values are:

  • Unknown
  • Active
  • Archived

supplierName
STRING

The name of the supplier as recorded in the accounting system.

taxNumber
STRING

The supplier’s company tax number.



Questions? Feedback?

Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.