The server saved the order, but the response disappeared
Imagine an integration sending an order to a partner. The connection drops just after the write. The API client sees an error and retries. The partner creates another order, although a person pressed the button only once.
HTTP distinguishes methods partly by idempotency: the intended effect of repeating an identical request. A network error alone does not make every operation safe to repeat. HTTP method semantics in RFC 9110
Give the operation an identity
In an example order API, a client can send a stable action identifier when the API contract supports that mechanism. The server should recognize a repeat and return the earlier outcome rather than repeat the business effect.
Specify what happens when the same identifier arrives with different content. Define how long results are retained and what happens while the first attempt is still running. Handle simultaneous requests, not just two sequential calls.
Errors belong in the contract
Responses should distinguish invalid input, missing permission, conflict and temporary unavailability. Consumers need to know when to correct data, wait or retrieve an outcome by identifier.
Test connection loss after the write, simultaneous duplicates and changed content using the same identifier. Count actual orders rather than checking only response codes. A useful REST API makes the outcome understandable even when communication is imperfect.