Guide

Idempotency

Retry safely: a booking sent twice with the same Idempotency-Key happens once.

Send a unique Idempotency-Key header (for example a UUID) on POST /orders, POST /orders/batch and POST /orders/{id}/cancel. If the network drops and you retry with the same key and the same body, you get the first answer back (with the header Idempotent-Replayed: true) and nothing is booked twice.

curl -X POST https://fieldnova.in/api/v1/orders \
  -H "Authorization: Bearer fn_live_..." \
  -H "Idempotency-Key: 6c1f0a3e-4f7b-4c55-9f1e-1d3a2b7c9e10" \
  -H "Content-Type: application/json" -d @order.json
  • Keys are kept for 24 hours, separately for test and live.
  • Same key with a different body → 422 idempotency_key_reused.
  • Same key while the first request is still running → 409 idempotency_in_progress; retry a moment later.
  • A server error (5xx) is not stored, so retrying with the same key runs the request again.