Get list of currency rates
The Get list of currency rates method returns the list of currency rates for the currency of the current reseller or any of its downstream resellers.
Currency rates are set on the root reseller level and automatically applied to resellers on all downstream levels if a downstream reseller did not specify a custom currency rate. By default, all currency rates are equal to 1. For details, see Managing currency rates.
An API token of a manager is required for authorization. To get an API token via the Operator Control Panel, see Viewing and updating manager's information.
The manager's API token specified in an API request determines:
- The role and access level of the manager, which determine the availability of a method.
- The current reseller and downstream resellers accessible within a method.
GET {base_url}/api/v3/resellers/{reseller_id}/currency_rates
Arguments
Name | Parameter type | Data type | Required/Optional | Description |
---|---|---|---|---|
X-Api-Token | header | string | Required | API token of a manager that performs the operation (see Viewing and updating manager's information) |
Content-Type | header | string | Required | Media type of the request. Specify the following: application/vnd.api+json |
Accept | header | string | Required | Supported media types of the answer. Specify the following: application/vnd.api+json |
base_url | path | string | Required | ActivePlatform URL |
reseller_id | path | integer | Required | ID of the current reseller or any of its downstream resellers (see Viewing and updating reseller general information) |
Response model
Name | Data type | Description | |||
---|---|---|---|---|---|
data | object | Response data | |||
id | string | ID of the reseller currency with currency rates | |||
type | string | Data type | |||
attributes | object | Attributes of the currency rates set for the reseller currency | |||
created_at | string | Date and time of the currency rates creation | |||
updated_at | string | Date and time when the currency rates were updated | |||
reseller_currency_iso_code | string | Reseller currency code (ISO 4217:2008) | |||
reseller_currency_unit | string | Displayed name for the reseller currency | |||
rates | array of objects | List of the currency rates | |||
iso_code | string | Currency code (ISO 4217:2008) | |||
unit | string | Displayed name for a currency | |||
quantity | integer | Number of currency units used for a currency rate | |||
rate | string | Currency rate for the specified | |||
show_for_client | bool | Indicates whether a currency rate is displayed in the Customer Control Panel (see Screen layout):
|
Request example
GET /api/v3/resellers/1/currency_rates
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetest3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": {
"id": "4",
"type": "currency_rates",
"attributes": {
"created_at": "2016-08-25T09:26:12.491+03:00",
"updated_at": "2021-06-21T11:22:17.167+03:00",
"reseller_currency_iso_code": "RUB",
"reseller_currency_unit": "руб.",
"rates": [
{
"iso_code": "BYN",
"unit": "бел. руб.",
"quantity": 4,
"rate": "6.0",
"show_for_client": true
},
{
"iso_code": "USD",
"unit": "$",
"quantity": 1,
"rate": "1.0",
"show_for_client": false
},
{
"iso_code": "EUR",
"unit": "€",
"quantity": 1,
"rate": "1.0",
"show_for_client": true
},
{
"iso_code": "UAH",
"unit": "грн.",
"quantity": 1,
"rate": "1.0",
"show_for_client": false
},
{
"iso_code": "GEL",
"unit": "лари.",
"quantity": 1,
"rate": "1.0",
"show_for_client": false
},
{
"iso_code": "AMD",
"unit": "драм.",
"quantity": 1,
"rate": "1.0",
"show_for_client": false
},
{
"iso_code": "UZS",
"unit": "сум.",
"quantity": 1,
"rate": "1.0",
"show_for_client": true
},
{
"iso_code": "AZN",
"unit": "ман.",
"quantity": 1,
"rate": "1.0",
"show_for_client": false
},
{
"iso_code": "KZT",
"unit": "тг.",
"quantity": 1,
"rate": "67.0",
"show_for_client": false
},
{
"iso_code": "VND",
"unit": "₫",
"quantity": 1,
"rate": "1.0",
"show_for_client": false
},
{
"iso_code": "BRL",
"unit": "R$",
"quantity": 1,
"rate": "1.0",
"show_for_client": true
}
]
}
}
}