Localization exchange API

The localization exchange API returns localization data that contains country specifics, currencies, and exchange rates.

Service endpoint – localizationExchange

HTTPS request

**Information Detail
HTTP method GET
Endpoint URL https://test-api.iglobalstores.com/2.0/localizationExchange
Protocol HTTPS
Message format JSON
Accept HTTP header Accept: application/json
Security Token HTTP header serviceToken: your-test-token-value
  Add a header to your HTTPS request named serviceToken with a value of your test security API token. (Contact your Account Manager for this token.)

Request parameters

countryCode

Example values: ‘CA’ or ‘AU’

Two-character country code of the given country stored inside the country-specific map for convenience; also stored as the key used to retrieve the country specific map.

true or false value to indicate whether or not to return formatting information.

HTTPS response

Message format: JSON

Example response for only Canada:

{
  "CA":{
    "name":"Canada",
    "code":"CA",
    "currency":"CAD",
    "rateEstimate":"1.42813",
    "currencySymbol":"$",
    "thousandsDelimiter":",",
    "decimalDelimiter":".",
    "scale":"2"
    }
}

Response JSON definitions

country

This is a map with the keys being two-character country codes and values being maps that contain the name, code, and currency code of the specific country.

country[country_code].code

Example values: ‘CA’ or ‘AU’

Two-character country code of the given country stored inside the country-specific map for convenience; also stored as the key used to retrieve the country-specific map.

country[country_code].currency

Example values: ‘CAD’ or ‘AUD’ or ‘USD’ (For some countries, it is best to use USD because their currency fluctuate in value too dramatically.)

The two-character currency code to use with this country.

country[country_code].rateEstimate

Example values: 1.0312 or 0.8501 (Rates may contain up to 6 digits of precision, i.e. 1.123456.)

The rate to multiply by to convert USD to the specific currency for estimated foreign pricing. You would use this rate when you intend to charge the customer in USD but show prices localized to their foreign currency.

For example, $10.00 (price in USD) multiplied by 1.0312 (the rate given for CAD) = $10.31 CAD (price in CAD rounded using the “half up” method).

country[country_code].currencySymbol

The symbol used to identify that currency in the browser.

country[country_code].thousandDelimiter

Appears only if format query parameter is true.

Shows that character that indicates divide between thousand/million/billion marker for currency.

country[country_code].decimalDelimiter

Appears only if format query parameter is true.

Shows the character used for the decimal point for currency.

country[country_code].currencySymbol