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:

CodeDescription
200Everything worked as expected
400Invalid user input
401Invalid or missing credentials
403Missing permissions
404Item 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."
}