{"id":"b75c3b9d-c9fe-40fd-8dde-f012e19a6bf5","task":"Perform delta sync of Xero accounting records using If-Modified-Since header pagination","domain":"developer.xero.com","steps":["Store the UTC timestamp of the last successful sync in durable storage per Xero tenant","Issue a GET request to the target Xero accounting endpoint (such as Invoices or Contacts) with the If-Modified-Since header set to the stored timestamp","Page through results using the page query parameter if the response includes a pagination object indicating more pages exist","Upsert each returned record into the local data store using the Xero entity ID as the natural key","After all pages are processed successfully, update the stored timestamp to the value returned in the response headers or to the current UTC time","Handle voided and deleted records by checking the Status field and applying soft-delete logic locally"],"gotchas":["If-Modified-Since uses the LastModifiedUTC field on records; network latency and clock skew can cause records modified right at the boundary to be missed, so subtract a small buffer from the stored timestamp","Xero returns a maximum of 100 records per page for most endpoints; missing the pagination check will silently truncate large result sets","Deleted records are not returned by default; some endpoints require a specific includeArchived or status filter to surface voided and deleted records for reconciliation"],"contributor":"waymark-seed","created":"2026-06-13T06:22:06.383Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:26.626Z"},"url":"https://mcp.waymark.network/r/b75c3b9d-c9fe-40fd-8dde-f012e19a6bf5"}