GuidesChangelog
HomeLog In
Guides

Best practices

Using Sync Endpoints Over Non-Sync GET

When utilizing the Floriday API, we highly recommend using the sync endpoints whenever possible. By doing so, you'll only need to retrieve updated data, resulting in more efficient data management.

Efficiency of Data Retrieval: Sync endpoints minimize redundant data retrieval by providing only the changes in data, unlike non-sync GET endpoints, which fetch all data within the specified filter options, including unchanged data. This reduces unnecessary server load and network traffic.

Real-Time Updates: Sync endpoints facilitate real-time updates by automatically incrementing a unique 'sequenceNumber' with each modification to the data model. Users can fetch only the relevant changes by invoking the sync endpoint with the last known sequence number in their system, ensuring data accuracy.

When to use non-Sync GET endpoints: The sync endpoints are used to fetch (all) data and keep that data up to date. Non-Sync GET endpoints should be used to fetch specific data based on specified filter options or to restore missing data (for instance based on id).



Retrieving New Data with Sync

When retrieving new data with Sync endpoints, it's crucial to commence from sequence number 0 rather than the current sequence number used for that endpoint. This ensures the retrieval of all available data, thereby maintaining data integrity.