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) integration, including release status, useful links, and the features supported in Stitch.

STITCH
Release status

Released on December 11, 2017

Supported by

Singer Community

Stitch plan

Standard

API availability

Available

Singer GitHub repository

singer-io/tap-codat

REPLICATION SETTINGS
Anchor Scheduling

Supported

Advanced Scheduling

Supported

Table-level reset

Unsupported

Configurable Replication Methods

Unsupported

DATA SELECTION
Table selection

Supported

Column selection

Unsupported

Select all

Supported

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 replication start date

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

  • For tables using Key-based Incremental Replication, data equal to or newer than this date will be replicated to your destination.
  • 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 destination.

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 objects to replicate

The last step is to select the tables you want to replicate. Learn about the available tables for this integration.

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

For Codat integrations, you can select:

  1. **Individual tables **

  2. All tables and columns

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

  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.

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 reference

Replication Method :

Key-based Incremental

Replication Key :

modifiedDate

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:

modifiedDate
STRING

currency
STRING

The currency of the account.

currentBalance
NUMBER

The current balance of the account.

description
STRING

fullyQualifiedName
STRING

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

fullyQualifiedCategory
STRING

isBankAccount
BOOLEAN

Indicates if the account is a bank account.

name
STRING

The name of the account.

Reference:

Reference:

nominalCode
STRING

The reference given to each nominal account for a business.

sourceModifiedDate
STRING

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.

Reference:

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 :

accountName : companyId : connectionId

API endpoint :

getBankAccounts

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


bank_account_transactions

Replication Method :

Full Table

Primary Key :

_transactionIndex : bankAccountId : companyId

API endpoint :

Gets bank transactions for a given bank account ID

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


Replication Method :

Key-based Incremental

Replication Key :

modifiedDate

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.

Reference:

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.

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


bank_statement_lines

Replication Method :

Full Table

Primary Key :

accountName : companyId : _lineIndex

API endpoint :

List bank statements for a company

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


Replication Method :

Key-based Incremental

Replication Key :

modifiedDate

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.

Reference:

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:

Reference:

taxAmount
NUMBER

The amount of tax on the bill.

totalAmount
NUMBER

The total amount of the bill, including tax.

lineItems
ARRAY

description
STRING

The name of the goods or services.

unitAmount
NUMBER

The price of each unit of goods or services.

quantity
NUMBER

The number of units of goods or services.

discountAmount
NUMBER

The value of the discounts applied.

subTotal
NUMBER

The price of the goods or services, including the discounts.

taxAmount
NUMBER

The amount of tax on the line items.

totalAmount
NUMBER

The price of the good or services, including the discounts and tax.

accountRef
OBJECT

The account the line items are linked to.

discountPercentage
NUMBER

The percentage rate of the discounts, from 0 to 100.

taxRateRef
OBJECT

The tax rate that the line items are linked to.

id
STRING

The tax rate ID.

Reference:

name
STRING

The tax rate name.

bills (table), taxRateRef (attribute)

itemRef
OBJECT

The product, service type, or inventory that is linked to the line item.

id
STRING

The item ID.

Reference:

name
STRING

The item name.

bills (table), itemRef (attribute)
bills (table), lineItems (attribute)

Replication Method :

Key-based Incremental

Replication Key :

modifiedDate

Primary Key :

companyId : id

API endpoint :

Get bill payments

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

companyId
STRING

The company ID.

Reference:

id
STRING

The bill payment ID.

Reference:

modifiedDate
STRING

The date the bill payment was last modified.

currency
STRING

currencyRate
NUMBER

date
STRING

lines
ARRAY

amount
NUMBER

links
ARRAY

bill_payments (table), lines (attribute)

note
STRING

sourceModifiedDate
STRING

supplierRef
OBJECT

bill_payments (table), supplierRef (attribute)

totalAmount
NUMBER


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.


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 :

companyId : id

API endpoint :

Get connections

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


Replication Method :

Key-based Incremental

Replication Key :

modifiedDate

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 :

Key-based Incremental

Replication Key :

modifiedDate

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:

modifiedDate
DATE-TIME

The time the customer was last modified.

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.

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 : eventTimeUtc

API endpoint :

Get events

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


Replication Method :

Key-based Incremental

Replication Key :

modifiedDate

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:

modifiedDate
DATE-TIME

The time the invoice was last modified.

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)

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 :

Key-based Incremental

Replication Key :

modifiedDate

Primary Key :

companyId : id

API endpoint :

Get items

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

companyId
STRING

The company ID.

Reference:

id
STRING

The item ID.

Reference:

modifiedDate
STRING

The date the item was last modified.

billItem
OBJECT

code
STRING

invoiceItem
OBJECT

isBillItem
BOOLEAN

isInvoiceItem
BOOLEAN

itemStatus
STRING

name
STRING

sourceModifiedDate
STRING


Replication Method :

Key-based Incremental

Replication Key :

modifiedDate

Primary Key :

companyId : id

API endpoint :

Get journal entries

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


Replication Method :

Key-based Incremental

Replication Key :

modifiedDate

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.

expenses
ARRAY

A list of line items for expenses.

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.

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.

otherIncome
ARRAY

A list of line items for other income.

toDate
STRING

The date for which the report data ends.

profit_and_loss (table), reports (attribute)

Replication Method :

Key-based Incremental

Replication Key :

modifiedDate

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.


Replication Method :

Key-based Incremental

Replication Key :

modifiedDate

Primary Key :

companyId : id

API endpoint :

Get tax rates

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



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.