Status Codes

When you call any REST resource, the response header returns one of the standard HTTP status codes listed in the following table. These status codes refer to a three-digit number in the response header that indicates the general classification of the response. For example, the codes indicate whether the request was successful (200s), or resulted in a client (400s) or server (500s) error. The 400 and 500 classes of status codes help in troubleshooting bad requests.

HTTP Status Code Description
200 OK Success! A successful GET or POST method returns a 200 status code.
202 Accepted The server has accepted your request for processing, but hasn't yet completed processing it. Your request might succeed or fail during processing.
400 Bad Request Your request couldn't be processed because it contains missing or invalid information, such as a validation error on an input field, a missing required value, and so forth.
401 Unauthorized Your request isn't authorized. The authentication credentials included with this request are missing or invalid.
403 Forbidden You don't have authorization to perform this request.
404 Not Found Your request includes a resource URI that doesn't exist.
405 Method Not Allowed HTTP action specified in the request (DELETE, GET, POST, PUT) isn't supported for this request URI.
406 Not Acceptable Although the server understands and processes your request, your client can't understand the server response because it's unsupported. A client's request header indicates what data or media types are acceptable. For example, the client's Accept header requests that XML be returned, but the server can return only JSON.
415 Not Acceptable Indicates that the server refuses to accept the client request because the payload format is unsupported. In your client, the ContentType header isn't correct. For example, the client tries to send the request in XML, but the server can accept only JSON.
409 Conflict Error Indicates a conflict with the current state of a resource, such as when trying to create or update a resource that already exists or has conflicting information.
500 Internal Server Error The server met something unexpected that prevented it from completing the request.
503 Service Unavailable Indicates that the server is unable to complete the request due to a server overload. This condition is usually temporary.

Note:

All 4xx and 5xx status codes will also contain a message body containing an Error Resource message with more information on the cause of the error.