Idempotent Requests

These endpoints support idempotency; you can safely submit the same request multiple times without accidentally creating duplicate entities.

How It Works

  1. The client generates an idempotency key and sends a POST/PATCH request to the endpoint.
Your system generates the idempotency key; it can have a maximum of 64 characters and send it in the x-idempotency-key header.
  1. The Enfuce server checks cache and returns an appropriate result.
    • First request: If the idempotency key is new, the enfuce server processes the API request and caches the successful response. If the request has an error, the enfuce server returns an appropriate HTTP error response code.
    • Retries with same idempotency key: If the request is successfully processed, the enfuce server just returns the cached response (no additional outcome). If the request has an error, the enfuce server returns an appropriate HTTP error response code.
  • The enfuce server retains a successful response for 24 hours. After 24 hours, the cached response and the idempotency key expire; subsequent requests containing the same key are treated as new requests.
  • Errors are not persisted; we treat each retry as a fresh attempt. Based on the HTTP error response code you receive, modify the request and recall the endpoint.

Endpoints