Skip to main content

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​

  1. Always set metadata.external_event_id on creates. Use a stable identifier from your source system.

  2. Persist a mapping in your bridge: (external_event_id, zenspace_booking_id).

  3. Before posting, check your mapping. If the external ID exists, treat it as an update, not a create.

  4. 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.