JSON ( JavaScript Object Notation, pronounced / desn /; also / desn /) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute-value pairs and arrays (or other serializable values). HttpStatusCode is an enumeration, whose values can be found over in the Status Codes exhibit. So I googled and found this link which is handling status codes of rest API asp.net: This Refunds do not work . At that point the request is done. Say you have a ProductController that is concerned with CRUD operations on Products, it might have a method like the below: public Product Get(int id) { return dbContext.Products.Get(id); } We have returned the Product type directly making this the simplest solution and . Many people have different designs for specifying the errors in the API response - some just return status code without any response message, while some describe a simple text message in the body and others specify custom JSON schema for specifying the errors. If the PUT method is not implemented, 405 METHOD NOT ALLOWED shall be used. In this section, we will learn more about the HTTP Status Codes in detail. This step is common for MVC, WebAPI, and WebForms. It is important to use the right status code for a given request because that is the standard way for the client would understand what went wrong with the request it sent to the server. In such scenarios, it would be a good idea to inform the client that it should wait a while for the response to reach. Thanks for sharing. It helps us to send responses in different ways. The first digit of the HTTP status code gives an idea of what category of response is received. HTTP Status codes that start with 1 informs the client that the request was received, and it is being processed at the server end. Made with love and Ruby on Rails. Before doing this, I didn't realize that you can actually write