Back to Spree

Stores

docs/developer/core-concepts/stores.mdx

5.5.05.1 KB
Original Source

Overview

The Store is the top-level tenant in Spree. Every resource — products, orders, channels, markets, taxonomies — belongs to exactly one store. A store owns its branding (logo, custom domain, mail-from address), its channels (online, POS, wholesale, …), its markets (region/currency/locale), and its catalog.

Store Attributes

AttributeDescription
nameStore name, displayed in the browser title and throughout the site
codeUnique identifier for the store
urlPrimary URL of the store
meta_descriptionSEO description
meta_keywordsSEO keywords
seo_titleCustom SEO title
customer_support_emailEmail for customer support inquiries
mail_from_addressSender address for transactional emails
logo_urlURL to the store's logo
facebook, twitter, instagramSocial media links

Fetching Store Information

Store configuration is exposed through the Admin API. Use the store endpoint to read the current store's settings — name, URL, branding, and email addresses:

<CodeGroup>
typescript
const store = await adminClient.store.get()
// {
//   name: "My Store",
//   url: "https://mystore.com",
//   logo_url: "https://cdn.mystore.com/logo.png",
//   mailer_logo_url: "https://cdn.mystore.com/mailer-logo.png",
//   customer_support_email: "[email protected]",
//   ...
// }
bash
curl 'https://api.mystore.com/api/v3/admin/store' \
  -H 'X-Spree-API-Key: sk_xxx'
</CodeGroup>

This is an admin endpoint, so it requires a secret API key (sk_xxx) or a Bearer JWT — a publishable key cannot reach it.

Channels vs. Markets

Two different ways to split a store, often confused:

  • Sales Channels segment selling surfaces — Online Store, POS, Wholesale, marketplace integrations. They control product visibility, order attribution, and per-channel routing rules.
  • Markets segment geography and currency — North America (USD/en), Europe (EUR/de), UK (GBP/en). They control which currency, locale, and tax rules apply to a given customer.

A single Online Store channel can serve multiple markets (one storefront → many regions). Conversely, POS and Online channels can share the same market (same currency/locale, different selling surfaces).

Store Resources

Each store owns its own resources. Products, orders, channels, markets, and taxonomies in one store are independent from another.

ResourceRelationship
ChannelsA store has many channels (Online Store, POS, Wholesale, …). One is the default.
MarketsA store has many markets, each defining a geographic region with its own currency and locale
OrdersAn order belongs to one store and one channel
ProductsA product belongs to one store. Its visibility across channels is controlled by publications.
TaxonomiesA taxonomy belongs to one store
Payment MethodsA payment method belongs to one store
Shipping MethodsA shipping method belongs to one store
PromotionsA promotion belongs to one store

Running Multiple Storefronts

If you need one Spree backend to serve multiple distinct merchant brands — different domains, different catalogs, different admin teams — there are two patterns:

  • Multiple channels under one store (recommended for most cases) — model each storefront as a Sales Channel. Products are scoped per-channel via publications, orders carry the channel that originated them, and routing/pricing can differ per channel. This is the supported pattern in core Spree 5.5+.
  • Multiple stores in one app — the legacy multi-store pattern, where each store is fully independent (catalog, admin, branding). In Spree 5.5+ this requires the spree_multi_store extension. Core Spree treats each product as belonging to a single store.

For most multi-brand operations, the channel pattern is simpler and more flexible. Reach for spree_multi_store only when stores need genuinely independent catalogs, branding, and admin teams.

  • Channels — Selling surfaces (Online, POS, Wholesale, …)
  • Markets — Multi-region commerce within a store
  • Products — Product catalog
  • Orders — Order management and checkout
  • Admin SDK — TypeScript client for the Admin API used to read and update store configuration