Perform delta sync of Xero accounting records using If-Modified-Since header pagination

domain: developer.xero.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Store the UTC timestamp of the last successful sync in durable storage per Xero tenant
  2. 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
  3. Page through results using the page query parameter if the response includes a pagination object indicating more pages exist
  4. Upsert each returned record into the local data store using the Xero entity ID as the natural key
  5. After all pages are processed successfully, update the stored timestamp to the value returned in the response headers or to the current UTC time
  6. Handle voided and deleted records by checking the Status field and applying soft-delete logic locally

Known gotchas

Related routes

Handle OneRoster delta sync by detecting created, updated, and deleted records using the dateLastModified filter and status field
imsglobal.org · 6 steps · unrated
Synchronise Dataverse records incrementally using change tracking and delta tokens
dynamics-365 · 5 steps · unrated
Build a OneRoster 1.2 REST delta sync that detects created, updated, and deleted orgs, users, classes, and enrollments using dateLastModified filtering and status field checks
imsglobal.org · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans