Localization Exchange API

Returns localization data containing country specifics, currencies and exchange rates.

Service End Point – localizationExchange

HTTPS Request

HTTP Method GET
End Point 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 containing 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’ (some countries it’s best to USD because their currencies fluxuate 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 multiple 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 currecny.

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