HTTP 428 Precondition Required means the server requires the request to be conditional — the client must include headers like If-Match or If-Unmodified-Since. This prevents lost update problems where multiple clients modify a resource simultaneously.
The API requires an If-Match header with an ETag to prevent concurrent modification conflicts.
GET the resource to obtain its current ETag value.
curl -I https://api.example.com/resource/123
Add If-Match with the ETag or If-Unmodified-Since with the timestamp.
curl -X PUT -H 'If-Match: "etag-value"' -d '{"data":"new"}' https://api.example.com/resource/123