Monit API using default and conventional HTTP status code for success and failed request.
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | API or resource not found |
| 405 | Method not allowed |
| 409 | Conflict or duplicate request |
| 500 | Monit Server Error |
We also provide extra information on body response, some endpoint will provide extra field, please see request example.
| Parameter | Type | Value |
|---|---|---|
| error_code | String (Required) | Error code |
| message | String (Required) | Description |
| detail | Hashmap (Only if system detect validation error) | {"field": "description"} |
Error code for general API
| error_code | status_code | Descrption |
|---|---|---|
| API_VALIDATION_ERROR | 400 | The request failed because it contained an invalid parameter or parameter value. |
| INVALID_REQUEST | 400 | General validation error. |
| IDENTITY_MISMATCH | 400 | There is a mismatch in the data between identity image and identity field. |
| INSUFFICIENT_BALANCE | 400 | Request failed because balance is not enough. |
| INVALID_INQUIRY | 400 | Inquiry request invalid because the request data is not valid. |
| INVALID_PAYMENT | 400 | Payment request invalid because the request data is not valid. |
| REJECTED_BY_BANK | 400 | The request was rejected by the bank for various reasons, such as suspected fraud, non-compliance with internal policies or other concerns. |
| INVALID_API_KEY | 401 | Client ID or/and Client secret are invalid. |
| INVALID_SIGNATURE | 401 | Signature is invalid or not found. |
| API_IS_DISABLED | 403 | Specific API is disable, please contact Monit support for the details. |
| API_NOT_FOUND | 404 | The requested operation failed because a resource associated with the request could not be found. |
| RESOURCE_IS_NOT_FOUND | 404 | Request failed because the specific resource is not found. |
| METHOD_NOT_ALLOWED | 405 | The HTTP method associated with the request is not supported. |
| DUPLICATE_TRANSACTION | 409 | Transaction cannot be processed because duplicate with existing reference. |
| DUPLICATE_USER | 409 | User already exists. Please check username, mobile phone or identity number. |
| INTERNAL_SERVER_ERROR | 500 | Monit server is failed to process the request. |
