API Response Codes
HTTP status codes are grouped into five numeric categories:
CODE |
TYPE |
---|---|
1xx | informational |
2xx | successful |
3xx | redirection |
4xx | client error |
5xx | server error |
CODE |
HTTP METHOD |
RESPONSE BODY |
DESCRIPTION |
---|---|---|---|
200 OK | GET, PUT, DELETE | Resource | There are no errors, the request has been successful |
201 Created | POST | URI of the resource that has been created | The request has been fulfilled and resulted in a new resource being created |
202 Accepted | POST, PUT, DELETE | An URI of a resource which represents the processing status | The request has been accepted for processing, but the processing has not been completed |
204 No Content | GET, PUT, DELETE | N/A | There are no errors, the request has been processed and no contact is expected in the body (by design) |
400 Bad request | GET, POST, PUT, DELETE | Error message | The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications |
401 Unauthorized | GET, POST, PUT, DELETE | Error message | The request requires user authentication |
404 Not Found | GET, POST, PUT, DELETE | Error message | The server has not found anything matching the request URI |
405 Method Not Allowed | GET, POST, PUT, DELETE | Error message | The method specified in the request is not allowed for the resource identified by the URI |
406 Not Acceptable | GET, POST, PUT, DELETE | Error message | The request contains parameters that are not acceptable |
415 Unsupported Media Type | GET, POST, PUT | Error Message | The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method |
500 Internal Server Error | GET, POST, PUT, DELETE | Error message | The server encountered an unexpected condition which prevented it from fulfilling the request |