Event streams and sync
Keep your own copy of your organization's content up to date in two moves. List what changed since your last sync, then hold the organization's event stream open to hear about each change. A server that holds no connection open receives webhook events instead.
The event stream acts as a member, so mint a session token that names one, as in the quickstart:
updated_since lists only what changed at or after an instant. Sort by updated_at, and keep the latest updated_at you read for your next sync.
Zones and collections take updated_since the same way, at /v1/zones and /v1/collections. A listing does not show what was deleted: the event stream does.
GET /v1/organizations/{organization_id}/events is a server-sent event stream. Each frame names an itinerary, a zone or a collection that was created, updated or deleted. Refetch what it names.
GET /v1/itineraries/{itinerary_id}/events and GET /v1/zones/{zone_id}/events stream one resource's edits as they happen: its segments and waypoints, and who is editing. They are what Map Studio's collaboration runs on.