Errors 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 CodeRemarks
200Everything works as expected
400Bad request
This could mean insufficient permission or there is a firewall ruleset that strictly prohibits this specific request, e.g. the request contains a prohibited string.
404Not found
422Validation error
429Too many requests
500, 502, 503, 504Server error