Supplies & Tariffs Guide
Complete guide to managing Wildberries supply acceptance coefficients, calculating supply costs, and comparing tariffs between inventory storage and supply fulfillment options.
Table of Contents
- Overview
- Acceptance Coefficients
- Acceptance Options
- Supply Cost Calculator
- Tariff Comparison
- Rate Limits
- Best Practices
Overview
The Supplies module (part of OrdersFbwModule) provides access to supply-related tariff data through the Wildberries Supplies API. This includes:
- Acceptance Coefficients: Daily coefficients affecting supply acceptance costs for the next 14 days
- Acceptance Options: Available warehouses and packaging types for specific products
- Utility Functions: Calculate supply costs and compare tariffs across different fulfillment options
When to Use This Module
| Use Case | Method/Utility |
|---|---|
| Plan optimal supply timing | getAcceptanceCoefficients() |
| Find available warehouses for products | createAcceptanceOption() |
| Estimate supply costs | calculateSupplyCost() |
| Choose between inventory vs supply | compareTariffs() |
Acceptance Coefficients
Method: getAcceptanceCoefficients()
Returns acceptance coefficients for all warehouses for the next 14 days. These coefficients directly affect your supply acceptance costs.
Signature
async getAcceptanceCoefficients(options?: {
warehouseIDs?: string;
}): Promise<ModelsAcceptanceCoefficient[]>Parameters
| Parameter | Type | Description |
|---|---|---|
warehouseIDs | string | Optional. Comma-separated list of warehouse IDs to filter results |
Response Type: ModelsAcceptanceCoefficient
interface ModelsAcceptanceCoefficient {
/** Date when coefficient is active (YYYY-MM-DD) */
date?: string;
/** Acceptance coefficient:
* -1: acceptance unavailable
* 0: free acceptance
* >0: cost multiplier */
coefficient?: number;
/** Warehouse ID */
warehouseID?: number;
/** Warehouse name */
warehouseName?: string;
/** Whether unloading is allowed */
allowUnload?: boolean;
/** Box type name: "Короба", "Монопаллеты", "Суперсейф", "QR-поставка с коробами" */
boxTypeName?: string;
/** Box type ID: 2=Boxes, 5=Monopallets, 6=Supersafe */
boxTypeID?: number;
/** Storage coefficient (percentage) */
storageCoef?: string;
/** Delivery coefficient (percentage) */
deliveryCoef?: string;
/** Base delivery cost per first liter */
deliveryBaseLiter?: string;
/** Delivery cost per additional liter */
deliveryAdditionalLiter?: string;
/** Base storage cost per first liter (or per pallet for pallets) */
storageBaseLiter?: string;
/** Storage cost per additional liter */
storageAdditionalLiter?: string;
/** Whether this is a sorting center */
isSortingCenter?: boolean;
}Example: Get All Coefficients
import { WildberriesSDK } from 'daytona-wildberries-typescript-sdk';
const sdk = new WildberriesSDK({ apiKey: 'your-api-key' });
// Get coefficients for all warehouses
const coefficients = await sdk.ordersFBW.getAcceptanceCoefficients();
console.log(`Found ${coefficients.length} coefficient entries`);
// Group by warehouse for analysis
const byWarehouse = new Map<number, typeof coefficients>();
for (const coef of coefficients) {
if (!coef.warehouseID) continue;
const existing = byWarehouse.get(coef.warehouseID) || [];
existing.push(coef);
byWarehouse.set(coef.warehouseID, existing);
}
// Find warehouses with free acceptance (coefficient = 0)
const freeAcceptance = coefficients.filter(c =>
c.coefficient === 0 && c.allowUnload === true
);
console.log('Warehouses with free acceptance:',
[...new Set(freeAcceptance.map(c => c.warehouseName))]
);Example: Filter by Specific Warehouses
// Get coefficients only for Kolomino (507) and Elektrostal (130744)
const coefficients = await sdk.ordersFBW.getAcceptanceCoefficients({
warehouseIDs: '507,130744'
});
// Find best day to supply to Kolomino
const kolominoCoefs = coefficients
.filter(c => c.warehouseID === 507 && c.boxTypeName === 'Короба')
.sort((a, b) => (a.coefficient ?? 999) - (b.coefficient ?? 999));
if (kolominoCoefs.length > 0) {
const best = kolominoCoefs[0];
console.log(`Best day for Kolomino: ${best.date}, coefficient: ${best.coefficient}`);
}Understanding Coefficient Values
| Coefficient | Meaning | Action |
|---|---|---|
-1 | Acceptance unavailable | Cannot supply on this date |
0 | Free acceptance | Optimal time to supply |
1 | Base rate | Standard pricing |
>1 | Multiplied rate | Higher cost, consider waiting |
Acceptance Availability
A supply can only be accepted when both conditions are met:
coefficientis0or1allowUnloadistrue
Critical: Number Format
Wildberries API returns numbers with comma separators (e.g., "0,13"). You MUST convert commas to dots before parsing:
function parseWBNumber(value: string | null | undefined): number {
if (!value) return 0;
return parseFloat(value.replace(',', '.')); // "0,13" → 0.13
}Failure to do this will result in storage = 0 calculations!
Acceptance Options
Method: createAcceptanceOption()
Returns available warehouses and packaging types for a specific set of products based on their barcodes and quantities.
Signature
async createAcceptanceOption(
data: ModelsGood[],
options?: { warehouseID?: string }
): Promise<ModelsOptionsResultModel>Parameters
| Parameter | Type | Description |
|---|---|---|
data | ModelsGood[] | Array of products with barcodes and quantities |
warehouseID | string | Optional. Filter results to specific warehouse |
Input Type: ModelsGood
interface ModelsGood {
/** Product barcode */
barcode: string;
/** Quantity of items */
quantity: number;
}Example: Get Acceptance Options for Products
// Define products to supply
const products = [
{ barcode: '4680075251234', quantity: 100 },
{ barcode: '4680075255678', quantity: 50 }
];
// Get available options
const options = await sdk.ordersFBW.createAcceptanceOption(products);
console.log('Available warehouses:', options.warehouses);
console.log('Available box types:', options.boxTypes);
// Filter for specific warehouse
const kolominoOptions = await sdk.ordersFBW.createAcceptanceOption(products, {
warehouseID: '507'
});Supply Cost Calculator
Utility: calculateSupplyCost()
Calculates the estimated total supply cost including acceptance, storage, and logistics costs.
Signature
async function calculateSupplyCost(
input: SupplyCostInput,
getCoefficients: () => Promise<ModelsAcceptanceCoefficient[]>
): Promise<SupplyCostResult>Input Type: SupplyCostInput
interface SupplyCostInput {
/** Volume of goods in liters */
volume: number;
/** Warehouse ID */
warehouseID: number;
/** Number of storage days */
days: number;
/** Box type: 'box' | 'pallet' | 'supersafe' */
boxType?: 'box' | 'pallet' | 'supersafe';
}Output Type: SupplyCostResult
interface SupplyCostResult {
/** Acceptance cost in rubles */
acceptanceCost: number;
/** Storage cost in rubles */
storageCost: number;
/** Logistics/delivery cost in rubles */
logisticsCost: number;
/** Total cost (acceptance + storage + logistics) */
totalCost: number;
/** Warehouse name */
warehouseName: string;
/** Applied coefficients for transparency */
appliedCoefficients: {
acceptance: number;
storage: number;
delivery: number;
};
}Example: Calculate Supply Cost
import { WildberriesSDK, calculateSupplyCost } from 'daytona-wildberries-typescript-sdk';
const sdk = new WildberriesSDK({ apiKey: 'your-api-key' });
// Calculate cost for 10 liters, 30 days storage at Kolomino
const result = await calculateSupplyCost(
{
volume: 10,
warehouseID: 507,
days: 30,
boxType: 'box'
},
() => sdk.ordersFBW.getAcceptanceCoefficients({ warehouseIDs: '507' })
);
console.log('Cost breakdown:');
console.log(` Acceptance: ${result.acceptanceCost} RUB`);
console.log(` Storage: ${result.storageCost} RUB`);
console.log(` Logistics: ${result.logisticsCost} RUB`);
console.log(` Total: ${result.totalCost} RUB`);
console.log(` Warehouse: ${result.warehouseName}`);
console.log('Applied coefficients:', result.appliedCoefficients);Cost Calculation Formulas
IMPORTANT: Parse Number Format First
// Always parse Wildberries numbers with this helper
function parseWBNumber(value: string | null | undefined): number {
if (!value) return 0;
return parseFloat(value.replace(',', '.'));
}Storage Cost:
For Boxes (BoxTypeID: 2):
storageBaseLiter: ₽ per first liter
storageAdditionalLiter: ₽ per each additional liter
storageCoef: percentage multiplier
Cost = (storageBaseLiter + (volume-1) * storageAdditionalLiter) * (storageCoef / 100) * daysFor Pallets (BoxTypeID: 5):
storageBaseLiter: ₽ per entire pallet (flat rate)
storageAdditionalLiter: null (not applicable)
storageCoef: percentage multiplier
Cost = storageBaseLiter * (storageCoef / 100) * daysFor Supersafe (BoxTypeID: 6):
Same formula as boxes:
Cost = (storageBaseLiter + (volume-1) * storageAdditionalLiter) * (storageCoef / 100) * daysLogistics Cost:
For boxes: (deliveryBaseLiter + (volume-1) * deliveryAdditionalLiter) * deliveryCoef/100
For pallets: deliveryBaseLiter * deliveryCoef/100 (flat rate)Acceptance Cost:
coefficient = 0: Free (0 RUB)
coefficient > 0: coefficient * BASE_RATE (50 RUB)Box Type Differences
| Box Type | BoxTypeID | storageBaseLiter | storageAdditionalLiter | Pricing Model |
|---|---|---|---|---|
| Короба (Boxes) | 2 | per first liter | per additional liter | Volume-based |
| Монопаллеты (Pallets) | 5 | per entire pallet | null (not used) | Flat rate |
| Суперсейф (Supersafe) | 6 | per first liter | per additional liter | Volume-based |
Real-World Example: Storage Cost Calculation
Example 1: Box Storage (BoxTypeID: 2)
import { WildberriesSDK } from 'daytona-wildberries-typescript-sdk';
// Helper function - CRITICAL for correct number parsing
function parseWBNumber(value: string | null | undefined): number {
if (!value) return 0;
return parseFloat(value.replace(',', '.')); // "0,13" → 0.13
}
// Calculate storage cost for boxes
function calculateBoxStorage(
tariff: ModelsAcceptanceCoefficient,
volume: number,
days: number
): number {
const base = parseWBNumber(tariff.storageBaseLiter);
const additional = parseWBNumber(tariff.storageAdditionalLiter);
const coef = parseWBNumber(tariff.storageCoef) || 100;
// Formula: (base + (volume-1) * additional) * (coef / 100) * days
return (base + (volume - 1) * additional) * (coef / 100) * days;
}
const sdk = new WildberriesSDK({ apiKey: 'your-api-key' });
// Get SUPPLY tariffs (for planning)
const coefficients = await sdk.ordersFBW.getAcceptanceCoefficients();
// Find warehouse and box type
const warehouse = coefficients.find(c =>
c.warehouseID === 130744 && // Краснодар (Тихорецкая)
c.boxTypeID === 2 // Короба (Boxes)
);
// Real API response values:
// storageBaseLiter: "0,13"
// storageAdditionalLiter: "0,13"
// storageCoef: "165"
const volume = 50; // liters
const days = 30;
const storageCost = calculateBoxStorage(warehouse, volume, days);
console.log(`Storage cost: ${storageCost.toFixed(2)} ₽`);
// Output: Storage cost: 643.50 ₽
// Calculation: (0.13 + (50-1) * 0.13) * (165 / 100) * 30 = 643.50Example 2: Pallet Storage (BoxTypeID: 5)
// Calculate storage cost for pallets
function calculatePalletStorage(
tariff: ModelsAcceptanceCoefficient,
palletCount: number,
days: number
): number {
const base = parseWBNumber(tariff.storageBaseLiter);
const coef = parseWBNumber(tariff.storageCoef) || 100;
// storageAdditionalLiter is null for pallets - flat rate pricing
// Formula: base * (coef / 100) * days
return base * palletCount * (coef / 100) * days;
}
const palletWarehouse = coefficients.find(c =>
c.warehouseID === 130744 &&
c.boxTypeID === 5 // Монопаллеты (Pallets)
);
// Real API response values:
// storageBaseLiter: "41.25"
// storageAdditionalLiter: null
// storageCoef: "165"
const palletCount = 2;
const palletDays = 30;
const palletStorageCost = calculatePalletStorage(
palletWarehouse,
palletCount,
palletDays
);
console.log(`Pallet storage cost: ${palletStorageCost.toFixed(2)} ₽`);
// Output: Pallet storage cost: 4083.75 ₽
// Calculation: 41.25 * 2 * (165 / 100) * 30 = 4083.75Common Mistake: Using parseFloat Directly
// ❌ WRONG - Will return 0 for comma-separated numbers
const wrong = parseFloat(tariff.storageBaseLiter); // "0,13" → NaN → 0
// ✅ CORRECT - Convert comma to dot first
const correct = parseFloat(tariff.storageBaseLiter.replace(',', '.')); // "0,13" → 0.13Tariff Comparison
Utility: compareTariffs()
Compares tariffs between inventory storage (from Tariffs API) and supply acceptance (from Supplies API) to help decide the most cost-effective fulfillment option.
Signature
async function compareTariffs(
input: CompareTariffsInput,
getBoxTariffs: () => Promise<ModelsWarehouseBoxRates[]>, // Adapter for sdk.tariffs.getTariffsBox()
getAcceptanceCoefficients: () => Promise<ModelsAcceptanceCoefficient[]>
): Promise<TariffComparison>Input Type: CompareTariffsInput
interface CompareTariffsInput {
/** Warehouse name to search for (supports partial matching) */
warehouseName: string;
/** Date for the comparison (ISO format: YYYY-MM-DD) */
date: string;
}Output Type: TariffComparison
interface TariffComparison {
/** Warehouse name used for comparison */
warehouseName: string;
/** Date used for comparison */
date: string;
/** Tariff data from inventory storage API */
inventory: TariffData;
/** Tariff data from supply API */
supply: TariffData;
/** Percentage differences between the two sources */
difference: TariffDifference;
/** Recommendation: 'SUPPLY_CHEAPER' | 'INVENTORY_CHEAPER' | 'EQUAL' */
recommendation: TariffRecommendation;
}
interface TariffData {
deliveryBase: number;
deliveryCoef: number;
storageBase: number;
storageCoef: number;
found: boolean;
}
interface TariffDifference {
/** (supply - inventory) / inventory * 100 */
deliveryBasePercent: number;
storageBasePercent: number;
}Example: Compare Tariffs
import { WildberriesSDK, compareTariffs } from 'daytona-wildberries-typescript-sdk';
const sdk = new WildberriesSDK({ apiKey: 'your-api-key' });
const comparison = await compareTariffs(
{
warehouseName: 'Коледино',
date: '2025-01-25'
},
async () => {
const response = await sdk.tariffs.getTariffsBox({ date: '2025-01-25' });
return response.response?.data?.warehouseList ?? [];
},
() => sdk.ordersFBW.getAcceptanceCoefficients()
);
console.log('Tariff Comparison for', comparison.warehouseName);
console.log('');
console.log('Inventory Storage Tariffs:');
console.log(` Delivery base: ${comparison.inventory.deliveryBase} RUB/L`);
console.log(` Storage base: ${comparison.inventory.storageBase} RUB/L/day`);
console.log('');
console.log('Supply Tariffs:');
console.log(` Delivery base: ${comparison.supply.deliveryBase} RUB/L`);
console.log(` Storage base: ${comparison.supply.storageBase} RUB/L/day`);
console.log('');
console.log('Differences:');
console.log(` Delivery: ${comparison.difference.deliveryBasePercent.toFixed(1)}%`);
console.log(` Storage: ${comparison.difference.storageBasePercent.toFixed(1)}%`);
console.log('');
console.log(`Recommendation: ${comparison.recommendation}`);
// Make decision based on recommendation
if (comparison.recommendation === 'SUPPLY_CHEAPER') {
console.log('Use FBW supply for this warehouse');
} else if (comparison.recommendation === 'INVENTORY_CHEAPER') {
console.log('Use inventory storage (FBS) for this warehouse');
} else {
console.log('Costs are approximately equal');
}Rate Limits
All supply-related methods share the same rate limits:
| Period | Limit | Interval | Burst |
|---|---|---|---|
| 1 minute | 6 requests | 10 seconds | 6 requests |
Rate Limit Enforcement
The SDK automatically enforces rate limits. If you exceed the limit, requests will be queued and delayed accordingly. For high-volume operations, consider caching coefficient data.
Optimizing API Calls
// GOOD: Cache coefficients and reuse
const coefficients = await sdk.ordersFBW.getAcceptanceCoefficients();
// Calculate costs for multiple warehouses using cached data
const warehouseIDs = [507, 130744, 211622];
const costs = await Promise.all(
warehouseIDs.map(warehouseID =>
calculateSupplyCost(
{ volume: 10, warehouseID, days: 30 },
() => Promise.resolve(coefficients) // Use cached data
)
)
);
// BAD: Making separate API calls for each calculation
// This would hit rate limits quicklyBest Practices
1. Plan Supplies During Low-Cost Periods
async function findOptimalSupplyDates(
warehouseID: number,
boxType: string = 'Короба'
) {
const coefficients = await sdk.ordersFBW.getAcceptanceCoefficients({
warehouseIDs: String(warehouseID)
});
// Filter for specific box type and available dates
const available = coefficients
.filter(c =>
c.boxTypeName === boxType &&
c.allowUnload === true &&
(c.coefficient === 0 || c.coefficient === 1)
)
.sort((a, b) => (a.coefficient ?? 999) - (b.coefficient ?? 999));
return available.map(c => ({
date: c.date,
coefficient: c.coefficient,
isFree: c.coefficient === 0
}));
}
const optimalDates = await findOptimalSupplyDates(507);
console.log('Best supply dates:', optimalDates.slice(0, 5));2. Compare Multiple Warehouses
async function compareWarehouses(volume: number, days: number) {
const coefficients = await sdk.ordersFBW.getAcceptanceCoefficients();
// Get unique warehouses
const warehouseIDs = [...new Set(
coefficients.map(c => c.warehouseID).filter(Boolean)
)] as number[];
const results = await Promise.all(
warehouseIDs.slice(0, 10).map(async warehouseID => {
try {
const cost = await calculateSupplyCost(
{ volume, warehouseID, days },
() => Promise.resolve(coefficients)
);
return { warehouseID, ...cost };
} catch {
return null;
}
})
);
return results
.filter(Boolean)
.sort((a, b) => a!.totalCost - b!.totalCost);
}
const comparison = await compareWarehouses(10, 30);
console.log('Most cost-effective warehouses:');
comparison.slice(0, 5).forEach((c, i) => {
console.log(`${i + 1}. ${c!.warehouseName}: ${c!.totalCost} RUB`);
});3. Monitor Coefficient Changes
async function alertOnCoefficientChanges(warehouseID: number) {
const coefficients = await sdk.ordersFBW.getAcceptanceCoefficients({
warehouseIDs: String(warehouseID)
});
const today = new Date().toISOString().split('T')[0];
const todayCoef = coefficients.find(c =>
c.date === today && c.boxTypeName === 'Короба'
);
if (todayCoef?.coefficient === 0) {
console.log('FREE ACCEPTANCE TODAY! Consider supplying now.');
} else if ((todayCoef?.coefficient ?? 0) > 1) {
console.log(`High coefficient (${todayCoef?.coefficient}x) - consider waiting`);
}
return todayCoef;
}Related Documentation
Support
For questions or issues: