Skip to main content
The Store API supports multi-language, multi-currency, and market-aware responses. Use request headers to control the locale, currency, and country for each request.

Headers

HeaderExampleDescription
X-Spree-LocalefrLanguage for translated content (product names, descriptions, etc.)
X-Spree-CurrencyEURCurrency for prices and totals
X-Spree-CountryFRCountry ISO code for market resolution

Client-Level Defaults

Set locale, currency, and country once at initialization — all subsequent requests use these defaults:
SDK
Update defaults at any time:

Per-Request Overrides

Override client defaults for individual requests:

Country and Markets

The X-Spree-Country header resolves the customer’s market, which influences default locale and currency. Markets allow you to configure different pricing, languages, and product availability per region.
When a market is resolved from the country:
  1. The market’s default locale is used (unless overridden by X-Spree-Locale)
  2. The market’s default currency is used (unless overridden by X-Spree-Currency)
You can also resolve the market explicitly using the Markets API:

Resolution Priority

Each value is resolved in the following order:

Locale

  1. X-Spree-Locale header
  2. locale query parameter
  3. Market default locale (if country is set)
  4. Store default locale

Currency

  1. X-Spree-Currency header
  2. currency query parameter
  3. Market default currency (if country is set)
  4. Store default currency

Market

  1. X-Spree-Country header
  2. country query parameter
The locale and currency must be supported by the current store. If an unsupported value is provided, the API falls back to the store’s default.

Translated Content

When a locale is set, all translatable fields are returned in the requested language. This includes product names, descriptions, category names, and other content managed through translations.
If a translation doesn’t exist for the requested locale, the API falls back to the store’s default locale automatically.

Currency-Aware Prices

All price fields in the response reflect the requested currency:

Discovering Available Options

Use the dedicated endpoints to discover which markets, countries, locales, and currencies are available. These are derived from your store’s markets configuration.

Markets

List all markets to get the full picture of regions, currencies, and supported locales:

Countries

List all countries or countries within a specific market. Each country includes its market’s currency and supported locales:

Locales

Currencies