If you are building a client capable of caching a local version of server data for the purpose of use in offline mode, the need for a syncing mechanism becomes apparent.
Toshl API supports syncing with the use of two parameters which you send when making
GET list requests:
since parameter can be used to return only objects that were changed since the provided timestamp. Each endpoint has a different since parameter, which is obtained when making a
GET request to the
Note: If you want the sync to work correctly, do not set your own since parameter - always use the one provided by the sever.
Toshl-Modified header value is saved and sent with the next request to the same endpoint. Just make sure to URL encode it before your send it.
true makes sure the returned list includes deleted objects. All deleted objects will have their
deleted parameter set to
true and you can safely delete them from your local storage.