-
Type:
Story
-
Resolution: Unresolved
-
Priority:
Low
-
Affects Version/s: None
-
None
-
STOP TB
-
UAT
Beneficiary sync currently pulls existing records repeatedly. Add timestamp-based filtering so routine pulls return only new or updated beneficiaries, reducing sync time and network usage for large datasets.
Requirements:
- Accept villageId, fromDate, page, and limit.
- fromDate = null: return all beneficiaries through pagination.
- fromDate provided: return only new or updated beneficiaries after that checkpoint.
- Return a fixed server-generated syncTimestamp for the sync.
- Ensure concurrent additions/updates and identical timestamps do not cause missed records across pages.
- A page with fewer than limit records indicates completion; otherwise, the app requests the next page.
Request:
{{
{ "villageId": 123, "fromDate": null, "page": 1, "limit": 10 }}}
Response:
{{
{ "data": [], "syncTimestamp": "2026-10-23T10:00:00.000Z" }}}
data contains complete beneficiary objects.
App Flow:
Save syncTimestamp only after all pages are successfully saved locally. Start the next sync from page 1 using this timestamp as fromDate. On failure, retain the previous timestamp. Existing installations without a checkpoint perform a one-time full sync.
Acceptance: Initial sync downloads all records; subsequent syncs download only changes; partial syncs and concurrent updates do not cause missed records.