HTTP Response codes

The koinju API returns HTTP status codes in addition to JSON-based error codes and messages.

The koinju REST API attempts to return conventional HTTP status codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Status codes in the 4xx range indicate a failed request based on client information or context (for exemple, wrong parameter or a rate limit...). Status code in the 5xx range indicate an error from the koinju's servers.

HTTP Success

Successful HTTP responses have the status code 200 like in this exemple :

{
  "api_version": "2.0.0",
  "server_time": "2020-02-25T15:48:26.538Z"
}

HTTP Errors

All HTTP requests with response status codes different to 200 must be considered as failed and you should expect additional JSON inside the body of the response with the error message encapsulated inside it as shown in the example :

{
  "status_code": 500,
  "message": "Internal server error. Please contact the support if the problem persists."
}

We use the following error codes:

Last updated