Common questions about the Wildberries API TypeScript SDK.
The Wildberries API TypeScript SDK is a production-ready TypeScript library that provides type-safe access to all Wildberries marketplace API methods. It covers all 14 API modules (Products, Orders FBS/FBW/DBS, Finances, Analytics, Communications, Reports, Promotion, Tariffs, In-Store Pickup, User Management, Returns).
No, this is a community-developed SDK. It is built from official Wildberries OpenAPI specifications and follows their API documentation.
- β Node.js 20.x (LTS)
- β Node.js 22.x (Current)
- β Node.js 18.x (no longer supported β
engines.noderequires β₯20.0.0)
No, you can use this SDK with JavaScript. However, TypeScript is highly recommended to get full IntelliSense and type safety benefits.
JavaScript Usage:
const { WildberriesSDK } = require('daytona-wildberries-typescript-sdk');
const sdk = new WildberriesSDK({ apiKey: process.env.WB_API_KEY });
const products = await sdk.products.getParentAll();- Log in to your Wildberries seller account
- Navigate to Settings β API Keys
- Generate a new API key with required permissions
- Copy the key securely (it won't be shown again)
Documentation: https://dev.wildberries.ru/
Error:
npm ERR! 404 Not Found - GET https://registry.npmjs.org/daytona-wildberries-typescript-sdk
Solution: Check the exact package name. Make sure you're using:
npm install daytona-wildberries-typescript-sdkIf the package is not yet published to npm, install from GitHub:
npm install github:salacoste/daytona-wildberries-typescript-sdkDevelopment:
# Create .env file (add to .gitignore)
echo "WB_API_KEY=your_api_key_here" > .envimport { config } from 'dotenv';
config();
const sdk = new WildberriesSDK({
apiKey: process.env.WB_API_KEY!
});Production: Use a secret management service (AWS Secrets Manager, Azure Key Vault, etc.)
See SECURITY.md for best practices.
The SDK automatically enforces rate limits to prevent violations. When you exceed a limit:
- SDK queues your request
- Waits for rate limit window to reset
- Automatically retries the request
You don't need to handle rate limiting manually.
No, and you shouldn't. Rate limiting protects your account from being suspended by Wildberries. The SDK enforces limits automatically based on API documentation.
Default retry configuration:
- Max retries: 3
- Initial delay: 1000ms
- Exponential backoff: Yes
Retries on:
- 5xx server errors
- Network failures
- 429 rate limit errors
Does NOT retry on:
- 4xx client errors (except 429)
- Authentication errors (401)
- Validation errors (400)
const sdk = new WildberriesSDK({
apiKey: process.env.WB_API_KEY!,
retryConfig: {
maxRetries: 5, // Increase max retries
retryDelay: 2000, // 2 second initial delay
exponentialBackoff: true // Keep exponential backoff
}
});The SDK provides typed error classes:
import {
RateLimitError,
AuthenticationError,
ValidationError,
NetworkError
} from 'daytona-wildberries-typescript-sdk';
try {
const result = await sdk.products.createProduct(data);
} catch (error) {
if (error instanceof RateLimitError) {
console.error('Rate limited. Retry after:', error.retryAfter);
} else if (error instanceof AuthenticationError) {
console.error('Invalid API key');
} else if (error instanceof ValidationError) {
console.error('Invalid data:', error.message);
} else if (error instanceof NetworkError) {
console.error('Network issue:', error.message);
} else {
console.error('Unexpected error:', error);
}
}Possible causes:
- Invalid API key
- Expired API key
- API key doesn't have required permissions
- API key was revoked
Solution:
- Verify API key is correct
- Generate a new API key in Wildberries seller account
- Ensure key has necessary permissions
- Check for trailing spaces or special characters
The request data doesn't match required schema. Common issues:
Missing required fields:
// β BAD: Missing required 'brand'
await sdk.products.createProduct({
subjectID: 105,
variants: [{
vendorCode: 'SKU-001',
title: 'Product Name'
// Missing: brand
}]
});
// β
GOOD: All required fields
await sdk.products.createProduct({
subjectID: 105,
variants: [{
vendorCode: 'SKU-001',
title: 'Product Name',
brand: 'Brand Name' // Added
}]
});Check error message for specific field that failed validation.
All 11 Wildberries API modules:
| Module | Description | Status |
|---|---|---|
general |
Ping, seller info, news | β Available |
products |
Product catalog, CRUD, media, pricing | β Available |
ordersFBS |
Seller warehouse fulfillment | β Available |
ordersFBW |
WB warehouse fulfillment | β Available |
finances |
Balance, transactions, reports | β Available |
analytics |
Sales funnel, performance tracking | β Available |
reports |
Income, stock, sales reports | β Available |
communications |
Customer chat, Q&A, reviews | β Available |
promotion |
Campaigns, advertising | β Available |
tariffs |
Commission rates, storage fees | β Available |
inStorePickup |
Pickup point management | β Available |
const product = await sdk.products.createCardsUpload([{
subjectID: 105, // Category ID (get from getParentAll)
variants: [{
vendorCode: 'SKU-001', // Your internal SKU
brand: 'Brand Name',
title: 'Product Title',
description: 'Product description',
dimensions: {
length: 10, // cm
width: 5, // cm
height: 3, // cm
weightBrutto: 200 // grams
},
sizes: [{
techSize: 'M', // Size
wbSize: 'M', // WB size mapping
price: 2999, // Price in rubles
skus: ['BARCODE123456789'] // Barcode
}],
characteristics: [{
id: 1, // Characteristic ID
value: 'Red' // Value
}]
}]
}]);
console.log('Created product:', product.data);See full example: examples/complete-product-workflow.ts
// Get new orders
const newOrders = await sdk.ordersFBS.getNewOrders();
for (const order of newOrders) {
console.log('Order ID:', order.id);
console.log('Total:', order.totalPrice);
// Confirm order
await sdk.ordersFBS.confirmOrder(order.id);
// Create shipping label
const label = await sdk.ordersFBS.createShippingLabel({
orderId: order.id,
warehouseId: 123
});
}See full example: examples/orders-fbs-fulfillment.ts
const balance = await sdk.finances.getBalance();
console.log('Available balance:', balance.for_withdraw, balance.currency);
console.log('Pending:', balance.pending);
console.log('Total:', balance.total);1. Use batch operations when available:
// β
GOOD: Single batch request
await sdk.products.createCardsUpload([product1, product2, product3]);
// β BAD: Multiple individual requests
await sdk.products.createCardsUpload([product1]);
await sdk.products.createCardsUpload([product2]);
await sdk.products.createCardsUpload([product3]);2. Reuse SDK instance:
// β
GOOD: Single instance
const sdk = new WildberriesSDK({ apiKey: process.env.WB_API_KEY! });
// Use sdk throughout application
// β BAD: Multiple instances
const sdk1 = new WildberriesSDK({ apiKey: process.env.WB_API_KEY! });
const sdk2 = new WildberriesSDK({ apiKey: process.env.WB_API_KEY! });3. Set appropriate timeout:
const sdk = new WildberriesSDK({
apiKey: process.env.WB_API_KEY!,
timeout: 10000 // 10 seconds (default: 30s)
});Yes. The SDK is designed for production use with:
- Automatic rate limiting
- Exponential backoff retries
- Comprehensive error handling
- Full type safety
- 1500+ tests (100% passing)
- CI/CD validation
Possible causes:
- Network latency
- Wildberries API slowness
- Rate limiting delays
- Large data transfers
Solutions:
- Increase timeout:
const sdk = new WildberriesSDK({
apiKey: process.env.WB_API_KEY!,
timeout: 60000 // 60 seconds
});- Use batch operations to reduce number of requests
- Enable debug logging to identify bottlenecks
Some API endpoints limit date ranges (e.g., Analytics API: max 31 days).
Solution: Split into smaller date ranges:
const dates = [
{ begin: '2024-01-01', end: '2024-01-31' },
{ begin: '2024-02-01', end: '2024-02-28' },
{ begin: '2024-03-01', end: '2024-03-31' }
];
for (const period of dates) {
// v3 method (recommended, added in v2.7.0):
const data = await sdk.analytics.getSalesFunnelProducts({
selectedPeriod: {
begin: `${period.begin} 00:00:00`,
end: `${period.end} 23:59:59`
}
});
// Process data
}
// Note: The old sdk.analytics.getSalesFunnel() is deprecated as of v2.7.0.
// See docs/guides/migration-v2.7-analytics-v3.md for migration details.Error:
Cannot find module 'daytona-wildberries-typescript-sdk' or its corresponding type declarations.
Solution:
- Install TypeScript definitions:
npm install --save-dev @types/node- Ensure
tsconfig.jsonincludes:
{
"compilerOptions": {
"moduleResolution": "node",
"esModuleInterop": true
}
}Possible causes:
- Package not installed in production dependencies
- Build step missing
- Import path incorrect
Solution:
- Ensure package is in
dependencies(notdevDependencies):
{
"dependencies": {
"daytona-wildberries-typescript-sdk": "^1.0.0"
}
}- Run
npm install --productionin production - Check import syntax:
// β
GOOD: ESM
import { WildberriesSDK } from 'daytona-wildberries-typescript-sdk';
// β
GOOD: CommonJS
const { WildberriesSDK } = require('daytona-wildberries-typescript-sdk');We welcome contributions! See CONTRIBUTING.md for:
- Code contribution guidelines
- Testing requirements
- Pull request process
- Code of conduct
- Check existing Issues
- If not reported, create a new issue with:
- SDK version
- Node.js version
- Steps to reproduce
- Expected vs actual behavior
- Code snippet
Create a Feature Request on GitHub with:
- Use case and motivation
- Proposed solution
- Impact on existing functionality
- Documentation: README.md
- Examples: examples/
- GitHub Issues: Report issues
- GitHub Discussions: Ask questions
Not currently. We use GitHub Discussions for community questions and support.
This is a community project with no official commercial support. You may:
- Post job listings on relevant platforms
- Reach out to contributors (check GitHub Insights)
- Hire freelance developers familiar with TypeScript and Wildberries API
If your question isn't answered here:
- Check GitHub Discussions
- Search closed Issues
- Ask a new question in Discussions
Last Updated: 2025-10-25