HTTP Status Codes

HTTP status codes are used to communicate the success or failure of a request to a resource. The predominant status codes are:

Code Description
200 Everything worked as expected
400 Invalid user input
401 Invalid or missing credentials
403 Missing permissions
404 Item not found

In general all codes that are defined by the HTTP/1.1 standard can occur.

If the status code is not 200, the request should be considered failed and throwing an exception is recommended. A JSON object will be returned that contains a detailed error message for debugging.

Error 401
  "code": 401,
  "message": "Credentials required."