Skip to content

Idempotency

An idempotency key makes a retry safe. Send the same Idempotency-Key header again and Flume returns the first answer instead of doing the work twice.

CallIdempotency-KeyWithout it
POST /request-instant-quoteRequired400 IDEMPOTENCY_KEY_REQUIRED
POST /keysRequired422 VALIDATION_FAILED
POST /sales-requestsOptionalThe call runs every time
POST /deep-linksOptionalThe call runs every time
POST /save-itemNot used. save_uuid in the body does the same job
POST /searchNot used. Every call is a new search
  • Any string of 1 to 255 characters. A UUID works well.
  • Use a new key for each user action. Reuse it only to retry that same action.
  • A key longer than 255 characters is a 400 VALIDATION_FAILED.
curl -X POST "https://sandbox-api.tryflume.ai/partner/v1/deep-links" \
-H "X-Flume-Partner-Key: $FLUME_PARTNER_KEY" \
-H "X-Flume-User-Token: $FLUME_USER_TOKEN" \
-H "Idempotency-Key: 0d3c1a52-6f0e-4d0b-9a57-1c2e8b7f4a10" \
-H "Content-Type: application/json" \
-d '{"search_session_uuid": "5f0c1d2e-8a7b-4c3d-9e1f-2a3b4c5d6e7f"}'
RetryResult
Same key, same body, first call finishedThe stored answer, with the header Idempotent-Replay: true
Same key, same body, first call still running409 IDEMPOTENCY_IN_PROGRESS, usually with Retry-After: 2
Same key, different body422 IDEMPOTENCY_KEY_REUSED
  • Flume keeps a key for 24 hours.
  • A key is scoped to your platform and to one endpoint.
First answerStoredA retry with the same key
A successYesReplays it
A 4xx refusalYesReplays it. Fix the request and use a new key
A 5xx errorNoRuns the work again
A 429 with Retry-AfterNoRuns the work again
A quote that is still pricingNoRuns again, and counts against the daily quote limit again

A replay never repeats a secret.

CallField on a replay
POST /keyssecret is null
POST /deep-linksurl is null

POST /save-item uses save_uuid from the body instead of the header.

  • You choose save_uuid. Use a new UUID per save.
  • The same save_uuid returns the stored payload, unchanged.
  • Another user's save_uuid is a 409 SAVE_CONFLICT.

Every POST /search call is a new search. Page 2 included.

  • Each call spends one unit of the daily search limit.
  • Each call returns a new search_session_uuid.
  • To read a search again without spending a unit, call GET /searches/{search_session_uuid}.