Skip to content

Idempotency

Pass an Idempotency-Key header (any string up to 255 characters, e.g. erp-2026-05-18-batch-1) on bulk-write requests. Mercura keys jobs on (organisation, Idempotency-Key):

  • Same key + same body → the original job_id is returned with 200 OK. No second job runs.
  • Same key + different body422 IDEMPOTENCY_KEY_MISMATCH. This is almost always a bug on the caller side; we refuse to silently replay a different payload under a key you said you were reusing.
  • No header → every call is a new job.

This lets you safely retry on network or proxy failures without double-writing.