docs/api-reference/store-api/introduction.mdx
This API reference includes Spree Store APIs, which are REST APIs exposed by the Spree application. They are used to create a storefront for your commerce store, such as a website, point of sale or a commerce mobile app.
All API Routes are prefixed with /api/v3/store. So, during development, the API Routes will be available under the path http://localhost:3000/api/v3/store. For production, replace http://localhost:3000 with your Spree application URL.
We recommend using the Spree SDK to interact with the Store API. The SDK provides a convenient way to make API requests and handle responses.
npm install @spree/sdk
# or
yarn add @spree/sdk
# or
pnpm add @spree/sdk
import { createClient } from '@spree/sdk';
// Initialize the client
const client = createClient({
baseUrl: 'http://localhost:3000',
publishableKey: 'pk_xxx'
});