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.
Client-Level Defaults
Set locale, currency, and country once at initialization — all subsequent requests use these defaults:
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:
- The market’s default locale is used (unless overridden by
X-Spree-Locale)
- 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
X-Spree-Locale header
locale query parameter
- Market default locale (if country is set)
- Store default locale
Currency
X-Spree-Currency header
currency query parameter
- Market default currency (if country is set)
- Store default currency
Market
X-Spree-Country header
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