Response Codes

HTTP Response Codes

Standard HTTP response codes are used to indicate the success or failure of an API request. Each response code provides information about the status of the request.

Successful Response

200 – OK
The request was successfully processed.


Client Error Responses

400 – Bad Request
The request parameters are invalid or failed validation.

401 – Unauthorized / Expired
Authentication failed or the access token has expired.

402 – Insufficient Funds
The account does not have sufficient balance to process the request.

403 – Unauthenticated Request
The request is not properly authenticated.

404 – Not Found
The requested resource or endpoint could not be found.

405 – Method Not Allowed
The HTTP method used is not supported for this endpoint.

415 – Unsupported Media Type
The request content type is not supported.

422 – Unprocessable Entity
The request failed due to invalid or incorrect details.

429 – Too Many Requests
Too many requests were sent in a given time period (rate limit exceeded).


Server Error Responses

500 – Internal Server Error
An unexpected error occurred on the server.

503 – Service Unavailable
The backend system is down or under maintenance.


Response Body Structure

In addition to the HTTP status code, the API returns a structured JSON response in the response body.

Each response contains the following fields:

Field NameData TypeDescription
codeIntegerHTTP status code returned by the API
statusStringIndicates success or error
messageStringDescription of the response or error
request_idStringUnique identifier for tracking the request
responseArray / Object / NullContains actual API data (null in case of errors)

Sample JSON Error Response

{
  "code": 404,
  "status": "error",
  "message": "Resource not found",
  "request_id": "",
  "response": null
}