Skip to main content

Sync transactions

Record transactions in your customer's accounting software and monitor the progress of dataset syncs

Sync transactions

Once you have created your customer's expense transaction data, we automatically initiate a sync that records the expenses in the customer's accounting software.

You can continue writing new expenses to Codat while a sync is ongoing.

Check sync status

Once you have initiated the sync, you may want to check whether the sync was completed successfully and view the details of any errors that may have occurred.

Webhook events

We recommend you use webhooks to listen to events and track the sync status. To set up a webhook consumer, navigate to Settings > Webhooks > Configure consumer in the Codat Portal and click Add endpoint that listens to the following events:

  • Expenses sync failed event of SyncFailed type is triggered if any failures occurred during the sync process.
  • Expenses sync completed event of SyncCompleted type is triggered when a sync completes.

You can read more about webhooks at Codat and various events we offer to monitor.

Sync status codes
CodeReason
1000In progress
1010In progress (Long running - over ten minutes)
2000Success (Data written)
2040Success (No data written)
4000Configuration error
4040Company deleted/de-authorized
4220Company deleted/de-authorized
4260Accounting software billing expiry
5000Generic server error
5080Duplication protection
5120Data processing error
5130Data write error

Sync status via API

Alternatively, you can check the sync status via our API using any of the following endpoints:

GET https://api.codat.io/companies/{companyId}/sync/expenses/syncs/syncId/status

Transaction status

If you want to check the status of individual transactions, use the Get sync transaction endpoint. It also returns errors associated with the transaction if it was unsuccessful.

Alternatively, use the List sync transactions endpoint to view statuses for all transactions in a specified sync.

GET https://api.codat.io/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions

Monitor sync status

Select the Codat Portal Sync For Expenses menu item to monitor the status of your syncs, as well as review detailed logs and error messages. This helps your support team to resolve common issues with the customer's settings or actions.

Sync Health page view with numbered annotations on the key page elements: the dashboard, filters, status filter, and the main data table
  • Check the dashboard (1) for a visual summary of sync totals.
  • Use the search bar (2) to narrow down the records by sync ID or company ID.
  • Display the sync history for a specific period by indicating a date range (3).
  • Review the possible statuses of the syncs and filter the records by their status code (4).
  • Use the menu (6) to sort and amend the sync history (5) table as needed.

💡 Tips and traps

  • Syncs are shown as failed if any of the included items fail to write. Therefore, if a sync contains a mix of failed and successfully written records, it will still be marked as failed.
  • Sync history does not display the date range for data read from the platform that is used in the sync.


Was this page useful?
👏
👍
🤔
👎
😭