Client Overview
Overview of SDK clients with type safety and automatic token management
The Commerce Engine TypeScript SDK provides type-safe, token-managed clients for all API domains. Each client automatically handles authentication, token refresh, and provides complete TypeScript support.
Why Use SDK Clients?
Automatic Token Management
Never worry about token expiry or refresh logic - handled automatically behind the scenes.
100% Type Safety
Complete TypeScript support with IntelliSense for all parameters and responses.
Built-in Error Handling
Consistent error handling patterns with typed error responses.
Optimized Performance
Request optimization, caching, and middleware support out of the box.
Available Clients
Each client provides the same methods as the corresponding API endpoints, but with enhanced developer experience:
AuthClient
Implements: Authentication API endpoints
Key Features: Automatic token refresh, session management, passwordless flows
Storefront Guide: Authentication Best Practices
CatalogClient
Implements: Catalog API endpoints
Key Features: Product search, filtering, recommendations with full type safety
Storefront Guide: Catalog Management
CartClient
Implements: Cart API endpoints
Key Features: Cart state management, automatic price calculations, promotion handling
Storefront Guide: Cart Management
CustomerClient
Implements: Customer API endpoints
Key Features: Profile management, address book, loyalty tracking
Storefront Guide: Account Management
OrderClient
Implements: Order API endpoints
Key Features: Order creation, tracking, returns, payment status
ShippingClient
Implements: Shipping API endpoints
Key Features: Serviceability checks, shipping methods, cost calculation
HelpersClient
Implements: Common API endpoints
Key Features: Country/state data, validation utilities, location services
SDK vs Direct API Calls
Cross-References
Each SDK client method corresponds directly to API endpoints documented in the API Reference. The SDK provides the same functionality with enhanced developer experience:
- Complete API Documentation: API Reference with live playground
- Business Logic & Patterns: Storefront Guides for e-commerce workflows
- SDK-Specific Features: Type safety, automatic token management, error handling
For detailed API parameters, request/response formats, and testing, refer to the API Reference section. The SDK provides the same endpoints with additional type safety and token management.