Advanced sync settings
Review additional settings available to configure the sync of various data types
For most of our data types, we retrieve all available history. For financial statement data types, (balanceSheet, profitAndLoss, cashFlowStatement), we retrieve 24 months of history. You can apply additional syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. settings to change these defaults to help you limit the amount of data synchronized from the source platform. We reccomend that you only pull data from a date range relevant to your use-case, as this will greatly reduce the change of your datasets hitting rate limit errors.
Please note that these settings may not work for all data types, on all integrations. Please check with Codat Support if you are unsure
SyncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. settings
You can configure the following advanced settings:
| SyncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. setting | Property | Description | Data types |
|---|---|---|---|
| Months to syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. | monthsToSync | Determines how many months to fetch data history for. Set to 24 months by default. | balanceSheet, profitAndLoss, cashFlowStatement |
| SyncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. from window | syncFromWindow | Sets a number of months to fetch data history for, where only data with a modified date in that timeframe will be synced. | All except for balanceSheet, profitAndLoss, cashFlowStatement |
| SyncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. from UTC | syncFromUtc | Sets a UTC value as a start date for data syncing, where only data with a modified date in that timeframe will be synced. Records with a modified date before syncFromUtc will not be returned. | All except for balanceSheet, profitAndLoss, cashFlowStatement |
Configuration
To view your Codat Client's 'global' syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. settings you can call the following endpoint:
GET /profile/syncSettings
To override the syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. settings at a companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources. level you can make the following request
POST /companies/:companyId/syncSettings
For example, to configure advanced settings for our invoices data type, for a given companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources., send the following request to the endpoint:
{
"clientId": "your-codat-client-id",
"settings": [
{
"dataType": "invoices",
"fetchOnFirstLink": true,
"syncSchedule": 24,
"syncOrder": 0,
"syncFromUtc": "2020-01-01T12:00:00.000Z",
"syncFromWindow": 24,
"monthsToSync": 0,
"isLocked": true
}
],
"overridesDefaults": true
}
💡 Tips and traps
-
When using advanced syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. settings, settle on a uniform approach across your data types (e.g. all data types request 24 months' data). Some data types share requests, and applying different approaches may cause inconsistency.
-
Advanced syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. settings can be applied to all data types, but we advise you do not set them for reference data, such as customers, suppliers, chart of accounts, tax rates, tracking categories, and items.
-
Both
syncFromWindowandsyncFromUtcusesourceModifiedDateto select records for syncing. You can read more about modified dates. -
When a syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. setting is introduced after a successful data syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule., the records fetched prior to the new syncSync The process of fetching the latest data from a connected data source. Syncs can be triggered manually or run automatically on a schedule. setting will be either deleted or updated with a Void or Archived status.