A huge list of well-defined HTTP status codes exists. This list of commonly used status codes is useful for designing RESTful APIs and leveraging the semantics that are defined for clear communication between producers and consumers.
It is highly recommended to not return a HTTP 200 status for all requests and encode the success or failure of the request in the response body. Keep in mind that there will be a specific HTTP status code for each scenario. Returning the proper status code will indicate the exact behavior that occurred on the server side, which allows the consumer to understand what happened there. There are five high-level HTTP status code classes, as described in the following table:
High-level status code | Class | Description |
1xx | Informational | Continues the process after receiving the request. |
2xx | Success | The action was received, understood... |