Installation & Quick Start
Get started with the CommerceEngine TypeScript SDK in minutes
TypeScript SDK
A powerful, 100% type-safe TypeScript SDK for the CommerceEngine Storefront API. Built with modern JavaScript patterns, automatic token management, and comprehensive error handling.
✨ Key Features
100% Type Safe
Every API endpoint is fully typed with TypeScript for complete IntelliSense support
Automatic Token Management
Built-in refresh token logic for seamless authentication across all environments
Universal Compatibility
Works in browser, Node.js, and hybrid rendering environments (Next.js, Nuxt, etc.)
Production Ready
Implements all API best practices with zero configuration required
Installation
Quick Start
Basic Setup
Import and initialize the SDK
Get anonymous authentication
Make your first API call
Complete E-commerce Example
Here’s a complete example showing authentication, product browsing, and cart management:
Core Concepts
Client Architecture
The SDK uses a client-per-domain architecture for optimal organization:
Type Safety
Every method is fully typed with complete IntelliSense support:
Error Handling
All API calls return a consistent ApiResult<T>
structure:
Next Steps
Token Management
Learn about automatic token management and authentication patterns
Configuration
Explore all configuration options and environment setup
Client Guides
Detailed guides for each API client
Best Practices
Production-ready patterns and optimization techniques
The SDK automatically handles API best practices like token refresh, automatic retries on authentication failure, and proper error handling. You can focus on building your application logic while the SDK manages the infrastructure concerns.