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 Currency Rates.

Only managers with the System administrator role can get the list of currencies via API (see Managers' Roles).

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-TokenheaderstringRequiredAPI token of a manager that performs the operation (see Viewing and updating Manager's information)
Content-TypeheaderstringRequiredMedia type of the request. Specify the following: application/vnd.api+json
AcceptheaderstringRequired

Supported media types of the answer. Specify the following: application/vnd.api+json

base_urlpathstringRequiredActivePlatform URL
reseller_idpathintegerRequiredID of the current reseller or any of its downstream resellers (see Viewing and updating Reseller general information)

Response model

NameData typeDescription
dataobjectResponse data

idstringID of the reseller currency with currency rates

typestringData type

attributesobject

Attributes of the currency rates set for the reseller currency



created_atstringDate and time of the currency rates creation


updated_atstringDate and time when the currency rates were updated


reseller_currency_iso_codestring

Reseller currency code (ISO 4217:2008)



reseller_currency_unitstring

Displayed name for the reseller currency



ratesarray of objectsList of the currency rates



iso_codestring

Currency code (ISO 4217:2008)




unitstring

Displayed name for a currency




quantityinteger

Number of currency units used for a currency rate




ratestring

Currency rate for the specified quantity




show_for_clientbool

Indicates whether a currency rate is displayed in the Customer Control Panel (see Screen layout):

  • true — currency rate is displayed in the Customer Control Panel.
  • false — currency rate is not displayed in the Customer Control Panel.

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
                }
            ]
        }
    }
}