Exchange Rate Module
Error Response
| Parameter | Data Type | Description |
|---|---|---|
| timestamp | Integer | The unique reference code given to the user used when a request is made. |
| status | String | The status code for the error |
| error | String | The general description of the error |
| message | String | The specific description of the error |
| path | String | The path of where the error occurred |
| causes | String | Contains error message for the inputs. This is only visible in the 400 Bad Request Error type. |
400 Bad Request
This happens when there are missing or invalid inputs in the request. This may be solved by supplying valid inputs.
Response
400 A bad request was detected. Please ensure that the required parameters are correct and valid.

{
"timestamp":"1565055825643",
"status":"400",
"error":"Bad Request",
"message":"Found error on the following data:",
"path":"/exchange-rate/convert",
"causes":{
"currencyTo":"Input is invalid",
"currencyFrom":"Input is invalid"
}
}
404 Not Found
This happens when the input is valid but there are no existing exchange rates for the given currencies. This may be solved by supplying currencies with exchange rate.
Response
404 Request not found. Either the URL is not valid or maintenance is currently ongoing.

{
"timestamp":"1564997851634",
"status":"404",
"error":"Not Found",
"message":"No record found",
"path":"/exchange-rate/convert"
}
497 Invalid Access Key
This happens when the given accessKey is invalid. This may be solved by supplying a valid access key.
Response
497 This happens when the given accessKey is invalid.

{
"timestamp":"1565057643720",
"status":"497",
"error":"Invalid access key",
"message":"invalid access key",
"path":"/exchange-rate/convert"
}
500 Internal Server Error
This happens when an internal server error occurred. This may be because of system maintenance or system failure. Some error messages may contain the solution on how to solve the problem. Another way to solve the problem is to retry the request. If the retry didn’t work, please contact the web administrator.
Response
500 An internal system error was encountered. Please retry the transaction. If problem still persists, contact your administrator.

{
"timestamp":"1565055986979",
"status":"500",
"error":"Internal Server Error",
"message":"Required String parameter 'currencyFrom' is not present",
"path":"/exchange-rate/convert"
}