|
| 1 | +--- |
| 2 | +title: API Reference |
| 3 | +description: Complete TypeScript API reference for Wildberries SDK with all 11 modules |
| 4 | +layout: doc |
| 5 | +--- |
| 6 | + |
| 7 | +# API Reference |
| 8 | + |
| 9 | +Complete TypeScript API reference for the Wildberries SDK. Browse all modules, classes, interfaces, and type definitions. |
| 10 | + |
| 11 | +## SDK Core |
| 12 | + |
| 13 | +- **[WildberriesSDK](/api/classes/WildberriesSDK)** - Main SDK class aggregating all 11 modules |
| 14 | +- **[BaseClient](/api/-internal-/classes/BaseClient)** - HTTP client with retry and timeout handling |
| 15 | +- **[RateLimiter](/api/-internal-/classes/RateLimiter)** - Per-endpoint rate limit enforcement |
| 16 | +- **[RetryHandler](/api/-internal-/classes/RetryHandler)** - Exponential backoff retry logic |
| 17 | + |
| 18 | +## SDK Modules |
| 19 | + |
| 20 | +Complete reference for all 11 API modules covering product management, orders, finances, analytics, and more. |
| 21 | + |
| 22 | +| Module | Description | API Domain | |
| 23 | +|--------|-------------|------------| |
| 24 | +| **[GeneralModule](/api/classes/GeneralModule)** | Ping, news, seller information | common-api | |
| 25 | +| **[ProductsModule](/api/classes/ProductsModule)** | Product catalog, categories, pricing, stock | content-api | |
| 26 | +| **[OrdersFBSModule](/api/classes/OrdersFBSModule)** | Seller warehouse fulfillment orders | marketplace-api | |
| 27 | +| **[OrdersFBWModule](/api/classes/OrdersFBWModule)** | Wildberries warehouse fulfillment | marketplace-api | |
| 28 | +| **[FinancesModule](/api/classes/FinancesModule)** | Balance, transactions, financial reports | finance-api, statistics-api | |
| 29 | +| **[AnalyticsModule](/api/classes/AnalyticsModule)** | Sales analytics, performance metrics, CSV reports | seller-analytics-api | |
| 30 | +| **[ReportsModule](/api/classes/ReportsModule)** | Async report generation and retrieval | - | |
| 31 | +| **[CommunicationsModule](/api/classes/CommunicationsModule)** | Customer chat, Q&A, reviews | - | |
| 32 | +| **[PromotionModule](/api/classes/PromotionModule)** | Campaigns, promo codes, advertising | - | |
| 33 | +| **[TariffsModule](/api/classes/TariffsModule)** | Commission rates, tariff info, fees | - | |
| 34 | +| **[InStorePickupModule](/api/classes/InStorePickupModule)** | Pickup point management | - | |
| 35 | + |
| 36 | +## Configuration Interfaces |
| 37 | + |
| 38 | +Configure the SDK for different environments and use cases: |
| 39 | + |
| 40 | +- **[SDKConfig](/api/interfaces/SDKConfig)** - Main SDK configuration interface |
| 41 | +- **[RetryConfig](/api/-internal-/interfaces/RetryConfig)** - Retry logic configuration |
| 42 | +- **[RateLimitConfig](/api/interfaces/RateLimitConfig)** - Rate limiting configuration |
| 43 | + |
| 44 | +## Error Classes |
| 45 | + |
| 46 | +Comprehensive error hierarchy for precise error handling: |
| 47 | + |
| 48 | +- **[WBAPIError](/api/classes/WBAPIError)** - Base error class for all SDK errors |
| 49 | +- **[AuthenticationError](/api/classes/AuthenticationError)** - 401/403 authentication errors |
| 50 | +- **[RateLimitError](/api/classes/RateLimitError)** - 429 rate limit errors |
| 51 | +- **[ValidationError](/api/classes/ValidationError)** - 400/422 validation errors |
| 52 | +- **[NetworkError](/api/classes/NetworkError)** - Network failure errors |
| 53 | + |
| 54 | +## Common Interfaces |
| 55 | + |
| 56 | +Frequently used interfaces across modules: |
| 57 | + |
| 58 | +### Product Management |
| 59 | +- **[ProductCard](/api/interfaces/ProductCard)** - Product card data structure |
| 60 | +- **[CreateProductRequest](/api/interfaces/CreateProductRequest)** - Product creation request |
| 61 | +- **[PricingUpdate](/api/interfaces/PricingUpdate)** - Pricing update request |
| 62 | +- **[StockInfo](/api/-internal-/interfaces/StockInfo)** - Stock information |
| 63 | + |
| 64 | +### Order Management |
| 65 | +- **[Order](/api/interfaces/Order)** - Order data structure |
| 66 | +- **[OrderStatus](/api/interfaces/OrderStatus)** - Order status information |
| 67 | +- **[GetOrdersResponse](/api/interfaces/GetOrdersResponse)** - Orders list response |
| 68 | + |
| 69 | +### Financial Data |
| 70 | +- **[BalanceResponse](/api/interfaces/BalanceResponse)** - Account balance response |
| 71 | +- **[Transaction](/api/interfaces/Transaction)** - Transaction data structure |
| 72 | +- **[Payout](/api/interfaces/Payout)** - Payout information |
| 73 | + |
| 74 | +### Analytics Data |
| 75 | +- **[CardStatistics](/api/interfaces/CardStatistics)** - Product card statistics |
| 76 | +- **[CategoryPerformanceResponse](/api/interfaces/CategoryPerformanceResponse)** - Category performance metrics |
| 77 | + |
| 78 | +## Type Definitions |
| 79 | + |
| 80 | +Browse complete type definitions for API requests and responses: |
| 81 | + |
| 82 | +- **[Interfaces](/api/interfaces/)** - All interface definitions (261 total) |
| 83 | +- **[Type Aliases](/api/type-aliases/)** - Type alias definitions (46 total) |
| 84 | +- **[Enumerations](/api/enumerations/)** - Enum definitions (7 total) |
| 85 | +- **[Variables](/api/variables/)** - Exported variables and constants |
| 86 | + |
| 87 | +## Quick Start Example |
| 88 | + |
| 89 | +```typescript |
| 90 | +import { WildberriesSDK } from 'daytona-wildberries-typescript-sdk'; |
| 91 | + |
| 92 | +// Initialize SDK with your API key |
| 93 | +const sdk = new WildberriesSDK({ |
| 94 | + apiKey: process.env.WB_API_KEY! |
| 95 | +}); |
| 96 | + |
| 97 | +// Access any of the 11 modules |
| 98 | +const categories = await sdk.products.getParentAll(); |
| 99 | +const orders = await sdk.ordersFBS.getOrders({ limit: 10 }); |
| 100 | +const balance = await sdk.finances.getBalance(); |
| 101 | +``` |
| 102 | + |
| 103 | +## Error Handling Example |
| 104 | + |
| 105 | +```typescript |
| 106 | +import { |
| 107 | + WBAPIError, |
| 108 | + RateLimitError, |
| 109 | + AuthenticationError, |
| 110 | + ValidationError |
| 111 | +} from 'daytona-wildberries-typescript-sdk'; |
| 112 | + |
| 113 | +try { |
| 114 | + const result = await sdk.products.getParentAll(); |
| 115 | +} catch (error) { |
| 116 | + if (error instanceof RateLimitError) { |
| 117 | + // SDK automatically retries, log for monitoring |
| 118 | + console.warn('Rate limit hit', { retryAfter: error.retryAfter }); |
| 119 | + } else if (error instanceof AuthenticationError) { |
| 120 | + // Don't retry - fix API key |
| 121 | + console.error('Invalid API key'); |
| 122 | + } else if (error instanceof ValidationError) { |
| 123 | + // Fix request data |
| 124 | + console.error('Validation error', { message: error.message }); |
| 125 | + } else if (error instanceof WBAPIError) { |
| 126 | + // Other API errors |
| 127 | + console.error('API error', { statusCode: error.statusCode }); |
| 128 | + } |
| 129 | +} |
| 130 | +``` |
| 131 | + |
| 132 | +## Getting Started |
| 133 | + |
| 134 | +New to the SDK? Check out these resources: |
| 135 | + |
| 136 | +- **[Quick Start Guide](/getting-started/quickstart)** - Get up and running in 5 minutes |
| 137 | +- **[Configuration Guide](/guides/configuration)** - Configure SDK for your environment |
| 138 | +- **[Best Practices](/guides/best-practices)** - Production-ready patterns and error handling |
| 139 | +- **[Examples](https://github.com/salacoste/daytona-wildberries-typescript-sdk/tree/main/examples)** - Working code examples |
| 140 | + |
| 141 | +## Support & Resources |
| 142 | + |
| 143 | +- **[GitHub Repository](https://github.com/salacoste/daytona-wildberries-typescript-sdk)** - Source code and issue tracking |
| 144 | +- **[Official Wildberries API Documentation](https://dev.wildberries.ru/)** - Wildberries API reference |
| 145 | +- **[npm Package](https://www.npmjs.com/package/daytona-wildberries-typescript-sdk)** - Package on npm registry |
| 146 | + |
| 147 | +--- |
| 148 | + |
| 149 | +**Tip:** Use your IDE's autocomplete with TypeScript to explore all available methods and properties. The SDK is fully typed for excellent developer experience. |
0 commit comments