Public vs Session
storefront.public() for anything that doesn’t require a user session (browsing products, fetching store config). Use storefront.session() for user-scoped operations (auth, cart, orders).
Available Clients
CatalogClient
Available on both accessors. The public accessor covers read operations; the session accessor adds write operations like submitting reviews. Implements: Catalog API endpointsStorefront Guide: Catalog Management
AuthClient
Accessor: Session onlyImplements: Authentication API endpoints
Storefront Guide: Authentication Best Practices
CartClient
Accessor: Session onlyImplements: Cart API endpoints
Storefront Guide: Cart Management
CustomerClient
Accessor: Session onlyImplements: Customer API endpoints
Storefront Guide: Account Management
OrderClient
Accessor: Session onlyImplements: Order API endpoints
HelpersClient
Accessor: Session onlyImplements: Common API endpoints
StoreClient
Accessor: Public onlyImplements: Store configuration endpoints
SDK vs Direct API Calls
- With SDK
- Direct API Calls
Cross-References
- Complete API Documentation: API Reference with live playground
- Business Logic & Patterns: Storefront Guides for e-commerce workflows
- Error Handling: Error Handling Guide for error codes and recovery patterns
- Type Safety: Type Safety Guide for IntelliSense and generated types