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 health

Use the Sync for Expenses product menu in the Codat Portal to navigate to Sync Health and monitor the status of your syncs, review detailed logs and error messages, and view and retry writing failed items. 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.

View detailed records

To view more detailed information about a record, click on an item in your sync history. The information appears in the Sync Details window and provides sync start and end times, and sync source and target platforms.

It also displays client-friendly notes and error messages in case of sync failures.

You can also navigate to the Config tab to view and download the customer's sync configuration, which helps establish root causes for any errors that ocurred.

View push items

In the same detailed record view, select the Push items tab to access a list of push items. The list contains an item for each accounting data type that was produced in the selected sync.

Here, you can view each item's status, search the items by their core ID or data type, or filter them by status.

Retry push items

On the Push items tab, you can also retry the push items in failed status. Click the Retry failed items button to trigger another attempt to write the data of all failed push items into the accounting software. The button is only enabled if there are failed items to retry.

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

  • Attach receipts to the expense transaction using attachment upload
  • Review our FAQ to find out more about Sync for Expenses
  • Try Sync for Expenses in our interactive API reference

Was this page useful?
👏
👍
🤔
👎
😭