Locale

Read the caller's location from its IP address, and the reference lists of countries, continents, currencies, languages, phone codes and locale codes.

The Locale operations are for developers who need country, currency or language data in an integration or a storefront. They answer two questions: where is the caller, based on its IP address, and what are the reference lists for countries, continents, currencies, languages, phone codes and locale codes. All eight operations are GET requests with no parameters.

Before you call

Every call needs one of the two credentials the gateway accepts: an API key in X-Revenexx-Api-Key, or a Bearer token. An API key must carry the locale scope (or *); without it the call fails with 403. Send your tenant in X-Revenexx-Tenant on every call; without it the call fails with 400. See Authentication and API keys for how to get and send a credential.

Operations

OperationPathReturns
Get user localeGET /v1/localeThe caller's country, continent, IP address, suggested currency and EU flag.
List locale codesGET /v1/locale/codesAll locale codes, ISO 639-1.
List continentsGET /v1/locale/continentsAll continents.
List countriesGET /v1/locale/countriesAll countries.
List EU countriesGET /v1/locale/countries/euThe countries that are currently members of the EU.
List countries phone codesGET /v1/locale/countries/phonesThe phone code of each country.
List currenciesGET /v1/locale/currenciesAll currencies, with symbol, name, plural name and decimal digits.
List languagesGET /v1/locale/languagesAll languages, ISO 639-1, with the English and the native name.

Get the caller's locale

Request
curl https://api.revenexx.com/v1/locale \
  -H "X-Revenexx-Api-Key: $REVENEXX_API_KEY" \
  -H "X-Revenexx-Tenant: acme"

The location comes from the IP address the request arrives from. Called from your backend, that is your server's address, not your buyer's. Location data comes from DB-IP. The response has these fields, all of them always present. If the IP address cannot be located, countryCode and continentCode are --, eu is false and currency holds no code; the same is true of currency for a country with no mapped currency.

FieldTypeMeaning
ipstringThe caller's IP address.
countryCodestringThe country code, ISO 3166-1 two-character format.
countrystringThe country name.
continentCodestringThe continent code: AF, AN, AS, EU, NA, OC or SA.
continentstringThe continent name.
eubooleantrue if the country is currently a member of the European Union.
currencystringThe suggested currency, ISO 4217 three-character format.

Reference lists

Each list returns a total, the number of entries, and one array of entries. All entry fields are always present.

OperationArray field
List locale codeslocaleCodes
List continentscontinents
List countriescountries
List EU countriescountries
List countries phone codesphones
List currenciescurrencies
List languageslanguages
EntryFieldTypeMeaning
Locale codecodestringLocale code, ISO 639-1.
Locale codenamestringLocale name.
ContinentcodestringTwo-letter continent code.
ContinentnamestringContinent name.
CountrycodestringTwo-character ISO 3166-1 alpha code.
CountrynamestringCountry name.
PhonecodestringPhone code.
PhonecountryCodestringTwo-character ISO 3166-1 alpha code of the country.
PhonecountryNamestringCountry name.
CurrencycodestringCurrency code, ISO 4217 three-character format.
CurrencynamestringCurrency name.
CurrencynamePluralstringPlural name of the currency.
CurrencysymbolstringCurrency symbol.
CurrencysymbolNativestringNative currency symbol.
CurrencydecimalDigitsintegerNumber of decimal digits.
CurrencyroundingnumberCurrency digit rounding.
LanguagecodestringTwo-character ISO 639-1 code.
LanguagenamestringLanguage name in English.
LanguagenativeNamestringLanguage name in the language itself.

Localised names

The country and continent names in the caller's locale can come back in another supported language. The continents, countries, EU countries, phone codes and currencies lists say the same of their names. This page does not yet document how to ask for a language (as of 2026-10), so treat the names as display text and key your data on the codes.

Errors

StatusWhen
400The X-Revenexx-Tenant header is missing.
401The credential is missing or invalid.
403The caller is authenticated but not permitted, for example an API key without the locale scope.
429The tenant's rate limit was exceeded.
502The service behind the route could not be reached or did not answer in time.

For the error body and what to do for each status, see Errors.

Was this page helpful?