0

I have a HTTP PUT/POST method to update a document in the database. However, in certain conditions (for example, the input transaction timestamp is less than the timestamp on the document), the PUT/POST method does not apply the update. What is the appropriate HTTP status code to return in such cases, to notify the caller that the update did not happen?

Bhanu
  • 427
  • 2
  • 8

1 Answers1

1

Look at the answer here

Ideally, you should return a 400 status code (bad request) with a message indicating why the request failed. This allows anyone using your API to understand why the request was not successful.

Griggs
  • 150
  • 2
  • 11