Errors

Cermati.com uses conventional HTTP response codes to indicate the success or failure of an API request.

In general, codes in the 2xx range indicate success. Codes in the 4xx range indicate errors (eg: a required parameter was omitted, etc). Codes in the 5xx range indicate an error with Cermati’s servers.

Some 4xx errors that could be handled programmatically (eg:, an order is declined) include error codes that briefly explain the error reasons. For example, the response that accompanied HTTP response code 422 (validation error) may look like this:

{ 
  "success": false,
  "error": { 
    "name": {
      "required": "Name is required."
    }
  }
}

The summary of the HTTP response codes is given below.

HTTP Response Code

Remarks

200

Everything works as expected

400

Bad request

401

Unauthorized

422

Validation Error

404

Not found

409

Conflict

429

Too many requests

500,502,503,504

Server errors