Skip to main content

Get All Exchange Rates

Retrieves the store's exchange rates. Each record has a base currency and a list of conversion rates. Add activeCurrency=true to get only the rates currently used for the store's additional currencies.

HTTP Request​

  • URL: /exchangeRate
  • Method: GET
  • Headers:
    • accessToken: Required. Your API access token.
  • Required scope: None. Any valid access token can call this endpoint.

Query Parameters​

ParameterTypeDescription
pageNumberPage number to retrieve. Default is 1.
limitNumberNumber of records per page. Default is 10.
activeCurrencyBooleanSet to true to get the rates used for the store's additional currencies.

cURL Example​

curl --location '<BASE_URL>/exchangeRate?page=1&limit=10' \
--header 'accessToken: <ACCESS_TOKEN>'

Response​

  • 200 OK: The exchange rates were returned successfully.
  • 400 Bad Request: The request could not be completed.

Sample JSON Response​

{
"success": true,
"data": [
{
"id": "66f1a2b3c4d5e6f708192a3b",
"baseCurrency": "USD",
"rates": [
{ "id": "66f1a2b3c4d5e6f708192a3c", "currency": "EUR", "rate": 0.9214 },
{ "id": "66f1a2b3c4d5e6f708192a3d", "currency": "GBP", "rate": 0.7712 },
{ "id": "66f1a2b3c4d5e6f708192a3e", "currency": "CAD", "rate": 1.3651 }
],
"updatedAt": "2024-10-13T00:00:02.415Z",
"createdAt": "2024-09-23T17:41:07.902Z"
}
]
}

Sample JSON Response with activeCurrency=true​

{
"success": true,
"data": {
"updatedAt": "2024-10-14T09:30:11.204Z",
"baseCurrency": "USD",
"rates": [
{
"currency": "EUR",
"symbol": "€",
"symbolPosition": "left",
"decimalDigits": 2,
"rate": 0.9214,
"source": "live"
},
{
"currency": "CAD",
"symbol": "$",
"symbolPosition": "left",
"decimalDigits": 2,
"rate": 1.35,
"source": "manual"
}
]
}
}

Response Details​

Exchange Rate Data​

FieldTypeDescription
idStringUnique identifier of the exchange rate record.
baseCurrencyStringCurrency the rates convert from, for example USD.
ratesArrayConversion rates. See below.
updatedAtStringDate and time the rates were last updated (ISO 8601).
createdAtStringDate and time the record was created (ISO 8601).

Rate Object​

FieldTypeDescription
idStringUnique identifier of the rate.
currencyStringCurrency code, for example EUR.
rateNumberHow much of this currency equals 1 unit of the base currency.

Active Currency Data​

Returned when activeCurrency=true. data is null if the store has no additional currencies.

FieldTypeDescription
updatedAtStringDate and time the rates were last refreshed (ISO 8601).
baseCurrencyStringCurrency the rates convert from.
rates[].currencyStringCurrency code.
rates[].symbolStringCurrency symbol.
rates[].symbolPositionStringWhere the symbol is shown.
rates[].decimalDigitsNumberNumber of decimal places.
rates[].rateNumberRate in use.
rates[].sourceStringlive for automatically updated rates, or manual for a fixed rate set in the store settings.

Notes​

  • Live exchange rates are updated automatically on a regular schedule.