Sync protocol¶
Events (satellite → hub)¶
- Endpoint:
POST /wp-json/mindful-events-sync/v2/events/receive - Requires
schema_version: 2,sync_id,idempotency_token - Hub matches existing events by
_mindful_sync_id - Trust level: pending approval vs auto-publish per satellite registry
- Idempotency: sync log table + transient cache on hub
Reference (hub → satellite)¶
GET /v2/reference/types- For each type:
GET /v2/reference/{post_type}?page=&per_page=&modified_after=&country_id=(country_id organisers only) - Local import via
_mindful_hub_entity_id
Cron (production)¶
Schedule real server cron for WordPress if possible:
Plugin hooks:
| Hook | Purpose |
|---|---|
mindful_ref_pull_cron |
Scheduled reference pull (satellites) |
mindful_events_sync_retry |
Retry failed event syncs |
mindful_events_sync_cleanup |
Log retention |
Verify with wp cron event list.