packages/admin-sdk/README.md
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.
Developer Preview. The Admin API is in active development and may change between minor versions. Pin to a specific version of
@spree/admin-sdkin production and review the changelog before upgrading.
npm install @spree/admin-sdk
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'],
})
The full guides live on the docs site — this README intentionally stays short:
SpreeErrorThe 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.
MIT