π The most complete, production-ready TypeScript SDK for Shopee Open API π
Build powerful Shopee integrations with confidence using our fully-featured SDK that covers 100% of Shopee's API endpoints. Trusted by developers, built by the community.
Complete Documentation - Comprehensive guides and API references
Getting Started:
- Setup Guide - Installation and configuration
- Authentication - OAuth flow and token management
- Token Storage - Managing access tokens
- Proxy Configuration - Using HTTP/HTTPS proxies
API Managers:
- AuthManager - Authentication operations
- ProductManager - Product catalog management
- OrderManager - Order processing
- LogisticsManager - Shipping operations
- PaymentManager - Payment information
- VoucherManager - Discount management
- PushManager - Webhooks and notifications
- PublicManager - Public API endpoints
- AdsManager - Advertising campaigns
- AccountHealthManager - Performance metrics
- ShopManager - Shop information and settings
- MediaManager - Image and video upload
- MediaSpaceManager - Media uploads (images and videos)
- MerchantManager - Merchant information and warehouses
- GlobalProductManager - Global product management
- FirstMileManager - First mile logistics
- DiscountManager - Discount campaigns
- BundleDealManager - Bundle deal promotions
- AddOnDealManager - Add-on deal promotions
- ShopFlashSaleManager - Flash sale campaigns
- FollowPrizeManager - Follow prize activities
- TopPicksManager - Top picks collections
- ShopCategoryManager - Shop category management
- ReturnsManager - Return and refund management
- SbsManager - Shopee Business Services (SBS) warehouse inventory
- FbsManager - Fulfillment by Shopee operations
- LivestreamManager - Live streaming features
npm install @congminh1254/shopee-sdkRequirements: Node.js >= 18.0.0
β
Complete TypeScript definitions for all 27 API managers
β
Automatic token refresh and management
β
Built-in error handling and retry logic
β
Zero dependencies (except node-fetch)
β
Full documentation and examples
Get up and running in minutes! Here's how easy it is to integrate with Shopee:
import { ShopeeSDK, ShopeeRegion } from '@congminh1254/shopee-sdk';
// 1. Initialize the SDK with your credentials
const sdk = new ShopeeSDK({
partner_id: 123456,
partner_key: 'your-partner-key',
region: ShopeeRegion.GLOBAL,
shop_id: 789012, // Optional for shop-specific operations
});
// 2. Authenticate your shop (OAuth flow)
const authUrl = sdk.getAuthorizationUrl('https://your-app.com/callback');
console.log('Visit:', authUrl);
// After user authorizes, exchange code for token (automatic token storage!)
await sdk.authenticateWithCode('auth-code-from-callback');
// 3. Start using the API - it's that simple!
// Manage your products
const products = await sdk.product.getItemList({
offset: 0,
page_size: 20,
});
// Process orders
const orders = await sdk.order.getOrderList({
time_range_field: 'create_time',
time_from: Math.floor(Date.now() / 1000) - 86400,
time_to: Math.floor(Date.now() / 1000),
page_size: 50,
});
// Track shipments
const shipping = await sdk.logistics.getShippingParameter({
order_sn: '220615ABCDEF',
});
// Handle returns
const returns = await sdk.returns.getReturnList({
page_size: 20,
});
// And much more - all with full TypeScript support! πThat's it! The SDK handles token refresh, request signing, error handling, and more automatically.
See the Setup Guide and Authentication Guide for detailed instructions.
- 75%+ test coverage with 86 comprehensive tests - ensuring reliability in production
- Zero compromises - Every Shopee API endpoint is implemented and documented
- Type-safe - Full TypeScript definitions prevent errors before they happen
- Actively maintained - Regular updates to stay in sync with Shopee API changes
Unlike other SDKs with partial coverage, we provide complete access to every Shopee API:
Core Commerce:
- π¦ ProductManager - Full product catalog management with 55+ endpoints
- π OrderManager - Complete order processing and fulfillment workflow
- π LogisticsManager - Comprehensive shipping and tracking operations
- π³ PaymentManager - Payment and escrow information management
Marketing & Promotions:
- ποΈ VoucherManager - Discount voucher campaigns
- π₯ DiscountManager - Discount promotion campaigns
- π BundleDealManager - Bundle deal promotions
- β AddOnDealManager - Add-on deal promotions
- β‘ ShopFlashSaleManager - Flash sale campaigns
- π― FollowPrizeManager - Follow prize activities
- β TopPicksManager - Top picks product collections
Store Management:
- πͺ ShopManager - Shop information and profile management
- π’ MerchantManager - Merchant information, warehouses, and multi-shop management
- π ShopCategoryManager - Shop category organization
- πΌοΈ MediaManager & MediaSpaceManager - Image and video upload operations
Advanced Features:
- π AuthManager - OAuth flow and token lifecycle management
- π’ PushManager - Webhooks and real-time notifications
- π GlobalProductManager - Cross-border product management
- π ReturnsManager - Return and refund request handling
- π AdsManager - Advertising campaign management
- π AccountHealthManager - Performance metrics and analytics
- π PublicManager - Public API endpoints (no auth required)
- π FirstMileManager - First mile logistics operations
- π SbsManager - Shopee Business Services warehouse inventory
- π¦ FbsManager - Fulfillment by Shopee operations
- πΉ LivestreamManager - Live streaming features
- Intuitive API design - Clean, consistent interfaces across all managers
- Automatic token refresh - Built-in token management, never worry about expiration
- Flexible storage - File-based storage included, easy to implement custom solutions
- Multi-region support - Works seamlessly across all 12 Shopee regions
- Proxy support - Enterprise-ready HTTP/HTTPS proxy configuration
- Comprehensive docs - Detailed guides and real-world examples for every feature
- Full type safety - Complete TypeScript definitions for autocomplete and error prevention
This SDK is perfect for building:
- πͺ Multi-channel E-commerce Platforms - Sync inventory, orders, and products across multiple sales channels
- π Analytics Dashboards - Track sales performance, customer behavior, and business metrics
- π€ Automation Tools - Automate order processing, inventory updates, and customer communications
- π ERP Integrations - Connect Shopee with your existing business systems
- π± Mobile Apps - Build native mobile experiences for shop management
- π― Marketing Automation - Manage promotions, vouchers, and advertising campaigns programmatically
- π¦ Inventory Management Systems - Real-time stock tracking across warehouses
- π Custom Storefronts - Create unique shopping experiences powered by Shopee's infrastructure
Switching is easy! Our SDK offers:
- More complete coverage - Every endpoint is implemented, not just the basics
- Better TypeScript support - Full type safety from end to end
- Simpler API - Intuitive, well-organized manager classes
- Active maintenance - Regular updates and community support
- Production-ready - Battle-tested with comprehensive test coverage
Check our Migration Guide to get started.
We use Conventional Commits for commit messages to automate versioning and release notes.
Examples of commit messages:
feat: add support for logistics API- Minor version bumpfix: correct error handling in order API- Patch version bumpdocs: update API documentation- No version bumpfeat!: rename parameters in product APIorfeat: rename parameters in product API BREAKING CHANGE: ...- Major version bump
This project uses Release Please to automate version management and releases.
The release process follows these steps:
- Commits to the main branch are automatically analyzed
- When conventional commit messages are detected, Release Please creates or updates a release PR
- When the release PR is merged:
- A new GitHub tag and release is created
- The package is automatically published to npm
- The CHANGELOG.md is updated with the release notes
MIT