Status codes

Responses from the API use HTTP response codes are used to indicate general classes of success and error.

Success Codes

Status Code Description
OK 200 This status is used when the server processes a request by GET method without problems and returns the requested data in response.
Created 201 Here the server announces the creation of a new resource.

Success Response Example


        {
            "status": true,
            "message": "Request processed successfully",
            "data": {
                "id": 12345,
                "name": "Example Name",
                "created_at": "2024-08-06T12:00:00Z"
            }
        }

                    

Error Codes

Status Code Description
Bad Request 400 The server cannot process the request due to syntax errors, invalid data, or other errors on the client side (web/mobile).
Unauthorized 401 The server cannot process the request due to expired or blacklisted tokens.
Forbidden 403 The client does not have sufficient rights to access the requested resource.
Not Found 404 The requested resource does not exist on the server.
Unsupported Media Type 415 The server cannot process the data type provided in the request body.
Internal Server Error 500 The server encounters unexpected circumstances that prevent it from the request completion.

Error Response Example


        {
            "status": false,
            "message": "email field is required",
        }
                    

Table of Contents