Skip to main content
PATCH
/
api
/
v3
/
admin
/
markets
/
{id}
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

// `country_isos` is a full-set update — the market is reconciled to match
// the array (adds new countries, removes ones not present). Setting
// `default: true` demotes the previous default market in the store.
const market = await client.markets.update('market_UkLWZg9DAJ', {
  name: 'European Union',
  tax_inclusive: true,
  country_isos: ['DE', 'FR'],
})
{
  "id": "mkt_UkLWZg9DAJ",
  "name": "European Union",
  "currency": "USD",
  "default_locale": "en",
  "tax_inclusive": true,
  "default": false,
  "country_isos": [
    "DE"
  ],
  "supported_locales": [
    "en"
  ],
  "created_at": "2026-06-17T13:37:00.620Z",
  "updated_at": "2026-06-17T13:37:00.901Z"
}

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Path Parameters

id
string
required

Body

application/json
name
string
currency
string
default_locale
string
supported_locales
string[]
tax_inclusive
boolean
default
boolean
position
integer
country_isos
string[]

Response

market updated

id
string
required
name
string
required
currency
string
required
default_locale
string
required
tax_inclusive
boolean
required
default
boolean
required
country_isos
string[]
required
supported_locales
string[]
required
created_at
string
required
updated_at
string
required
countries
object[]