Status Codes
Http codes can be separated in 4 simple groups:
-
codes for successful calls,
-
calls redirected to new or moved URI,
-
client and
-
server side errors.
Success codes
200: OK
Default success code - Provides the requested resources (if any were requested)
201: CREATED
Default success code for creation - resource has been created successfully
Redirection codes
301: MOVED PERMANENTLY
This and all future requests will be redirected to the new destination
304: NOT MODIFIED
The resource has not been modified.
Client side errors
400: BAD REQUEST
Default Error Code - Used if an object has invalid parameters
401: UNAUTHORIZED
Current consumer is not authorized to access requested resource
404: NOT FOUND
Resource / Method / Route not found
Server side errors
500: INTERNAL SERVER ERROR
Default Error Code - Used if an exception occurs