Skip to main content

Paging

Every collection returns the same envelope:
A page holds 50 records unless you ask for more, up to 200 with ?limit=200. Keep calling with ?cursor=<next_cursor> until has_more is false. The curl examples on this site use $BASE and $VENSIGHT_KEY, set as in the Quickstart.
Do not build a cursor yourself. It is opaque and its format is not part of this contract. Use the one you were given, or start again from the beginning. A cursor that has been edited or cut short is refused with 400 invalid_query.

Ordering, and why it matters for syncing

Records come back oldest change first, ordered by when they last changed and then by id. That means a new change always lands behind your cursor, so a walk that takes an hour still sees every record. A newest-first list would put new records ahead of your cursor and you would never reach them.

Only what changed

Every collection accepts updated_since:
The pattern for a scheduled job:
  1. Remember the highest updated_at you have successfully stored.
  2. Next run, ask for updated_since=<that value>.
  3. Page until has_more is false.
Use the value from the records you stored, not the clock on your own machine, so a job that dies halfway resumes from what it actually stored rather than from when it started. For events, settings changes, screening answers and the change feed, which are never changed after they are written, updated_since filters on the time they were written (occurred_at or answered_at). Each endpoint’s reference page names the field.
updated_since is inclusive, so the boundary record comes back again on the next run. Upsert on id and that costs you one repeated record per collection per run. The alternative, an exclusive boundary, could drop a record written in the same millisecond.

The change feed

/v1/changes is every create and update across every collection, in order:
It is written by the database for every change, rather than by application code, so it does not depend on anyone remembering to record a change. Each entry is the same change a webhook announces: webhook evt_41207 is entry 41207 here. That makes it the way to catch up after a missed webhook; see Webhooks.

Filters

Beyond updated_since, collections whose records belong to a vendor accept vendor_id, and each collection has its own short list of exact-match filters: status on invoices, event_type on events, event_name on the change feed, and so on. They differ by collection, so check each endpoint’s reference page, which lists them with the values each one accepts. A filter the collection does not have is refused with 400, and the message lists the ones it does accept.