Returns all markets for the current store with their countries, currency, locales, and tax configuration.
import { createSpreeClient } from '@spree/sdk'
const client = createSpreeClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
const markets = await client.store.markets.list(){
"data": [
{
"id": "mkt_UkLWZg9DAJ",
"name": "North America",
"currency": "USD",
"default_locale": "en",
"tax_inclusive": false,
"default": true,
"supported_locales": [
"en",
"es"
],
"countries": [
{
"iso": "US",
"iso3": "USA",
"name": "United States of America",
"states_required": true,
"zipcode_required": true
}
]
},
{
"id": "mkt_gbHJdmfrXB",
"name": "Europe",
"currency": "EUR",
"default_locale": "de",
"tax_inclusive": true,
"default": false,
"supported_locales": [
"de",
"en",
"fr"
],
"countries": [
{
"iso": "DE",
"iso3": "IS40",
"name": "Germany",
"states_required": false,
"zipcode_required": true
},
{
"iso": "FR",
"iso3": "IS41",
"name": "France",
"states_required": false,
"zipcode_required": true
}
]
}
]
}Was this page helpful?
import { createSpreeClient } from '@spree/sdk'
const client = createSpreeClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
const markets = await client.store.markets.list(){
"data": [
{
"id": "mkt_UkLWZg9DAJ",
"name": "North America",
"currency": "USD",
"default_locale": "en",
"tax_inclusive": false,
"default": true,
"supported_locales": [
"en",
"es"
],
"countries": [
{
"iso": "US",
"iso3": "USA",
"name": "United States of America",
"states_required": true,
"zipcode_required": true
}
]
},
{
"id": "mkt_gbHJdmfrXB",
"name": "Europe",
"currency": "EUR",
"default_locale": "de",
"tax_inclusive": true,
"default": false,
"supported_locales": [
"de",
"en",
"fr"
],
"countries": [
{
"iso": "DE",
"iso3": "IS40",
"name": "Germany",
"states_required": false,
"zipcode_required": true
},
{
"iso": "FR",
"iso3": "IS41",
"name": "France",
"states_required": false,
"zipcode_required": true
}
]
}
]
}