REST response code for existing data
http, rest
Solution
This post suggests to use the 409 Conflict status code when duplicated data is submitted.
Problem
Just wondering what HTTP status code I should return for a REST api if the posted data already exists. Example if I have a create account API that requires an email. 1) If this email already exists on my DB, what status code should I return? 2) If I redirect to another page, like an existing account login page, should the status code then be 200? or 300 for redirection? If this question has been answered, please just give me the link and I can delete this, but so far I only saw questions for invalid data.