Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
@spree/seller-sdk
TypeScript client for the Spree Commerce Seller API — the marketplace branch used by sellers to manage their own products, orders, fulfillments and payouts.
npm install @spree/seller-sdk
@spree/seller-sdk is released with Spree and carries its version: @spree/[email protected] works with Spree 6.0.x.
Usage
import { createSellerClient } from '@spree/seller-sdk'
const client = createSellerClient({ baseUrl: 'https://your-store.com' })
const { token } = await client.auth.login({ email: '[email protected]', password: '…' })
client.setToken(token)
// Who is signed in, and which sellers they may act for
const { user, sellers } = await client.me.get()
client.setSeller(sellers[0].id)
const products = await client.products.list()
// The signed-in person's own account: name, photo and panel language
await client.me.update({ first_name: 'Ada', selected_locale: 'de' })
client.me() — the form in 1.0.0-beta.1 and beta.2 — still works but is deprecated and logs a one-time warning; use client.me.get().
Sellers authenticate against the seller branch (/seller/auth/*), which issues its own token audience — a seller token is never an admin token.
Documentation
- Seller API reference — endpoints, authentication, errors
- Spree developer documentation
License
MIT