Se a vaga pede REST / HTTP, vale saber responder isso. A resposta está em inglês de propósito, porque é assim que você vai precisar falar.
For a retryable POST, the client reuses one idempotency key for one logical operation. The server scopes the key to the caller and operation, checks that the request payload matches, and durably records its result.
Trap: checking for a key and inserting it later is a race. Concurrent requests need an atomic claim, such as a unique constraint, plus a defined in-progress response. Persist business changes and the result together where possible. External payment calls also need a retry-safe protocol. Define retention and reject reuse of a key with a different payload.
Practice the timeout after commit: the client saw no response, but the server already applied the operation. A retry must return the recorded outcome without applying it again.
Essa pergunta tem uma armadilha que derruba muita gente em entrevista. Ela está marcada na resposta acima: vale reler antes de treinar.
Ler é o primeiro passo. No app, essa pergunta vira flashcard com repetição espaçada, e o módulo tem quiz e simulado para testar o que ficou.
Treinar essa pergunta no app