...
Sending invalid parameters will result in a 400 Bad Request response.
No Format HTTP/1.1 400 Bad Request Content-Length: 137 { "message":"The request cannot be fulfilled due to bad syntax.", "errors": { "field": { "code":"Error message." } } }
Providing invalid credentials will result in a 401 Unauthorized response.
No Format HTTP/1.1 401 Unauthorized Content-Length: 67 {"message":"The authorization details given appear to be invalid."}
Attempting to access a resource that is not callable will result in a 403 Forbidden response.
No Format HTTP/1.1 403 Forbidden Content-Length: 55 {"message":"The requested resource is not accessible."}
Attempting to access a resource that does not exist will result in a 404 Not Found response.
No Format HTTP/1.1 404 Not Found Content-Length: 52 {"message":"The requested resource does not exist."}
Requesting a format that is not supported will result in a 415 Unsupported Media Type response.
No Format HTTP/1.1 415 Unsupported Media Type Content-Length: 66 {"message":"The format requested is not supported by the server."}
If an unexpected error occurs a 500 Internal Server Error will result. If this error is encountered consult the documentation for the method you are requesting.
No Format HTTP/1.1 500 Internal Server Error Content-Length: 42 {"message":"An unexpected error occured."}
If an unexpected error occurs that specifies that it "Failed to retrieve the default value" then you likely encounter this issue due to IonCube in Blesta. You can work-around this issue by ensuring that you specify all optional arguments to your API call.
No Format HTTP/1.1 500 Internal Server Error Content-Length: 108 {"message":"An unexpected error occured.","response":"Internal error: Failed to retrieve the default value"}
When Blesta is under maintenance mode, the API will return a 503 Service Unavailable response.
No Format HTTP/1.1 503 Service Unavailable Content-Length: 81 {"message":"The requested resource is currently unavailable due to maintenance."}
...