Skip to main content
When you synchronize your customers’ financial data with the Unified API, you want to fetch only what’s new or changed since your last synchronization. Incremental synchronization is the most efficient way to keep data up-to-date without fetching the entire dataset on every run.

Why incremental synchronization matters

Fetching all records on every synchronization has real costs:
  • Slower synchronizations — more data to transfer and process
  • Higher load on the connected systems
  • Unnecessary processing — comparing all records to detect changes is expensive
  • Rate limiting risk — repeated full synchronizations can hit connector rate limits
With incremental synchronization, you only fetch what’s changed since your last successful synchronization.

How it works

Most Chift Unified API collection endpoints support the updated_after parameter, which returns only records created or updated on or after a specified timestamp.
  1. Store the timestamp of your last successful synchronization
  2. On the next synchronization run, pass that timestamp as updated_after
  3. Process only the new and updated records
  4. Store the new timestamp for the next run

Example request

Response: Only clients created or updated after 2024-10-15T14:30:00Z.

Implementing incremental synchronization

1. Check if updated_after is supported

The API reference for each endpoint documents whether updated_after is available. Not all connectors support it for every endpoint, and some newer connectors may have limited support.

2. Store your last synchronization timestamp

Keep the timestamp of your last successful synchronization for each consumer and each endpoint. This is the value you’ll pass as updated_after on the next run.

First synchronization: full initial load

On your first synchronization for a consumer, you don’t have a previous timestamp to use. Instead, use the date_from and date_to parameters (if supported) to load historical data, or simply fetch all records without updated_after.
After this initial load completes successfully, store the timestamp and switch to incremental synchronizations with updated_after.

When updated_after is not supported

Some connectors don’t support incremental synchronization for certain endpoints. When this happens, you’ll need to manually track changes by comparing the current response with your stored records.

Strategy: Compare and identify changes

  1. Fetch all records from the endpoint (you’ll need to paginate if there are many)
  2. Compare each record with your stored version
  3. Identify three types:
    • New records — in the API response but not in your system
    • Updated records — in your system but with changed values (check updated_at if available)
    • Deleted records — in your system but missing from the API response (optional: implement soft deletes or mark as archived)

Performance considerations

Manually comparing all records is less efficient than true incremental synchronization. We recommend:
  • Requesting higher pagination limits to reduce API calls
  • Running these synchronizations less frequently (e.g., once per day instead of every hour)
  • Consider using caching headers to avoid unnecessary fetches — see Caching in Chift API

Best practices

1. Always store timestamps in UTC

Always work with UTC timestamps. Many timezone bugs come from mixing timezones.

2. Be precise with timing

Store the exact timestamp of when the synchronization completed, not rounded times. This ensures you don’t miss edge-case records created at exact second boundaries.

3. Handle synchronization failures gracefully

If a synchronization fails partway through, don’t update your stored timestamp. Only update it after all records have been successfully processed and stored.

4. Monitor connector-specific behavior

Some connectors have quirks:
  • Records might be updated within a brief window after creation
  • Deleted records might still appear for a short time with a deleted_at field
  • Timestamps might have millisecond precision on some systems and second precision on others
Test your synchronization logic with your integrated connectors to understand their behavior.

5. Plan for the first synchronization carefully

Initial synchronizations can be large. Consider:
  • Running them at off-peak times
  • Breaking them into smaller date ranges if the dataset is huge
  • Using date_from and date_to to limit the initial load period

Troubleshooting

No records returned, but I know data was updated

Check:
  • Is updated_after supported for this endpoint? (Check the API reference)
  • Is your timestamp in UTC?
  • Are you using the correct format? (ISO 8601: YYYY-MM-DDTHH:MM:SSZ)
  • Is your stored timestamp actually before the data you expect? (Clocks can drift)

Different results between connectors

Connector behavior varies:
  • Some update updated_at when related objects change (e.g., marking an invoice as paid)
  • Others only update updated_at when the record itself changes
  • Some don’t support updated_at at all
Always test incremental synchronization with each connector you plan to support.

Timestamps are drifting

If your synchronizations keep missing recent data, you may have a clock drift issue between your system and Chift’s servers. Monitor the server_time in API responses and adjust your next synchronization time accordingly.

Memory issues with full synchronizations

If you’re doing manual comparison (for connectors without updated_after support) and hitting memory limits with large datasets:
  • Fetch and process records in smaller batches rather than loading everything at once
  • Use streaming if your API client supports it