Skip to content

armgit / spree

Public Imported from GitHub
0

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.

1.9 KB
Raw Blame

@spree/admin-sdk

Official TypeScript SDK for the Spree Commerce Admin API — manage products, orders, customers, fulfillments, payments, and store configuration from server-to-server integrations or admin tooling.

@spree/admin-sdk is released with Spree and carries its version: @spree/[email protected] works with Spree 6.0.x. Review the changelog before upgrading.

Installation

npm install @spree/admin-sdk

Quick start

import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://store.example.com',
  secretKey: 'sk_xxx', // server-to-server; JWT auth for admin UIs also supported
})

const { data: orders } = await client.orders.list({
  status_eq: 'complete',
  sort: '-completed_at',
  limit: 25,
})

const customer = await client.customers.create({
  email: '[email protected]',
  first_name: 'Jane',
  last_name: 'Doe',
  tags: ['wholesale'],
})

Documentation

The full guides live on the docs site — this README intentionally stays short:

Contributing

The SDK lives in the spree/spree monorepo under packages/admin-sdk — see the repository docs for the development setup and the serializer → types → Zod generation pipeline.

License

MIT