Idempotency and Dedupe
ZenSpace does not currently deduplicate POST /api/bookings requests. If your bridge sends the same booking twice, you get two bookings.
What to Do
-
Always set metadata.external_event_id on creates. Use a stable identifier from your source system.
-
Persist a mapping in your bridge: (external_event_id, zenspace_booking_id).
-
Before posting, check your mapping. If the external ID exists, treat it as an update, not a create.
-
On Google webhook bursts, debounce using syncToken semantics before deciding to push to ZenSpace.
Retrying After Failures
-
Network errors / 5xx: safe to retry with the same body. Catch 400s for duplicate indicators.
-
400s (validation/precondition): do not retry. Fix the payload.
-
401s: check the API key.
-
404s on update/cancel: booking may have been deleted. Remove your mapping and treat next event as fresh create.