For HTTP APIs
The need for idempotency often occurs in HTTP APIs such as REST APIs.
A great guide: https://developer.mozilla.org/en-US/docs/Glossary/Idempotent
There is an experimental idempotency header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Idempotency-Key