HTTP request success codes are three-digit values indicating that an action was executed without significant issues. Response codes typically fall within the 200-299 range. Although not a complete absence of problems, these codes imply normal completion of requested tasks.
HTTP Status Code of Success Response must be 200. In some cases it can be 201. The range of codes are from 200-299 .i.e., HTTP 2xx. where XX indicates numbers.
Parameters
Parameter name | Data type | Description |
---|---|---|
data | JSON Object | Response for API methods |
error | JSON Object | Error message when an error or exception occur |
Schema
// HTTP STATUS CODE: 200
{
"data": {
"KEY1": "VALUE1",
"KEY2": "VALUE2",
"...": "..."
},
"error": null
}
Success Codes Reference
HTTP Status Codes and their Messages are given below in the table below👇.
Code | Message |
---|---|
200 | OK |
201 | Created |
202 | Accepted |
203 | Non-Authoritative Information |
204 | No Content |
205 | Reset Content |
206 | Partial Content |
207 | Multi-Status (WebDAV) |
208 | Already Reported (WebDAV) |
226 | IM Used (HTTP Delta encoding) |
For more information regarding HTTP status codes please refer at MDN Web Docs 🔗