Write bank transactions to Xero
Learn how to write your SMB users' bank transactions via our Xero Bank Feeds integration
When an SMBSMB The primary customer segment that Codat helps businesses serve, typically companies with annual revenues under $500 million. user has set up a bank feed connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform., you can write bank transactions for source bank accounts to Xero. The source account must have connected status, where the SMBSMB The primary customer segment that Codat helps businesses serve, typically companies with annual revenues under $500 million. user has completed the step of mapping and connecting the account.
Transactions are not automatically downloaded to Xero when the user successfully connects a bank account. They must be written as described later in this article.
This article explains how to:
- View the details of source bank accounts, including their connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform. statuses.
- Write bank transactions to a target bank account in Xero.
Prerequisites
View bank account details
Call the GET connectionInfo/bankFeedAccounts endpoint to view details of the source bank accounts for a specified companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources. and data connectionConnection A link between a Codat company and a data source (like an accounting platform). Each connection represents authorized access to pull or push data from that platform..
GET /companies/{connectionId}/connections/{connectionId}/connectionInfo/bankFeedAccounts
The response lists all source bank accounts and their statuses—either pending, connected, or disconnected. The feedStartDate property is returned for connected bank accounts only.
[
{
"id": "acc-002", // the ID of the source bank account
"accountName": "account-081",
"accountType": "Credit",
"accountNumber": "1234",
"sortCode": "123456",
"currency": "GBP",
"balance": 99.99,
"modifiedDate": "2023-01-09T13:46:59.4019628Z",
"status": "pending" // bank account connection status
},
{
"id": "acc-003",
"accountName": "account-095",
"accountType": "Debit",
"accountNumber": "12345671",
"sortCode": "123456",
"currency": "GBP",
"balance": 100.09,
"modifiedDate": "2023-01-09T13:46:59.4019628Z",
"status": "connected",
"feedStartDate": "2023-01-09T14:56:43.773Z" // only for connected accounts
}
]