Idempotency key
A client-chosen id sent with every attempt of one logical operation, so the server can run the operation once and answer retries with the same result. Here it is the Idempotency-Key header, claimed in Redis per user before the order is created.
Minimal example
POST /v1/orders
Idempotency-Key: 8c1f7d42-4e5a-4e1d-9a12-123456789abcLearn this concept
Lesson 3.9 · Idempotency keysUsed in exercises
Exercise 3.10 · POST /v1/orders: idempotent checkout Exercise 3.12 · POST /v1/orders/{id}/events: order lifecycle Exercise 4.20 · API request retry utility Exercise 4.21 · Cart synchronization helper Exercise 6.11 · Browse and order k6 scripts Exercise 8.4 · Payment processing service Exercise 8.12 · Engineering walkthrough packageRelatedSET NX