(Quick Reference)
Service: Show an exchange rate
Description: Returns the requested exchange rate in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL:
https://BASE_URL/api/VERSION/exchangeRates/{id}
URL with external_id:
https://BASE_URL/api/VERSION/exchangeRates/reference/{id}
The external id corresponding to the target currency (exchangeTo)
Method: GET
Parameters:
Name | Description | Type | Required | Example values |
---|
id | The ID of the exchange rate | Long/String | yes | 1 |
Success Output
Success case: response.status=200
{
"id": 5,
"exchangeFrom": {
"id": 2,
"name": "EUR"
},
"exchangeTo": {
"id": 6,
"name": "GBP"
},
"rate": 0.85285,
"organization": "company",
"dateCreated": "2017-04-10T13:10:47Z",
"lastUpdated": "2017-04-10T13:10:47Z"
}
Failure Output
Failure case:response.status = 400
{
"error": "invalid_param_type",
"error_description": "The type of parameter id you provided is not valid for this request."
}
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The exchange rate with the id 7065 doesn't exist."
}