Orders FBW Module
The Orders FBW (Fulfillment by Wildberries) module manages supply creation and warehouse operations for sellers who ship products to Wildberries warehouses for fulfillment. It covers acceptance options, warehouse listing, transit tariffs, supply lifecycle management, and DBW buyer information retrieval.
Overview
| Property | Value |
|---|---|
| Module Name | OrdersFbwModule |
| SDK Namespace | sdk.ordersFBW.* |
| Base URL | https://supplies-api.wildberries.ru (most methods) |
| Alt Base URL | https://marketplace-api.wildberries.ru (getClientInfo only) |
| Source Swagger | wildberries_api_doc/07-orders-fbw.yaml |
| Methods | 19 |
| Authentication | API Key (Header) |
Quick Start
import { WildberriesSDK } from 'daytona-wildberries-typescript-sdk';
const sdk = new WildberriesSDK({ apiKey: process.env.WB_API_KEY! });
// List available warehouses
const warehouses = await sdk.ordersFBW.warehouses();
// Check acceptance options for a barcode
const options = await sdk.ordersFBW.createAcceptanceOption(
[{ barcode: '1234567891234', quantity: 10 }]
);
// Get transit tariffs
const tariffs = await sdk.ordersFBW.transitTariffs();
// List supplies with filters
const supplies = await sdk.ordersFBW.listSupplies({});
// Get buyer information for DBW orders
const clientInfo = await sdk.ordersFBW.getClientInfo([987654321]);Methods Reference
Acceptance and Warehouse Info (3 methods)
| Method | HTTP | Endpoint | Description |
|---|---|---|---|
createAcceptanceOption(data) | POST | /api/v1/acceptance/options | Get available warehouses and packaging types for a supply |
warehouses() | GET | /api/v1/warehouses | List all WB warehouses |
transitTariffs() | GET | /api/v1/transit-tariffs | Get available transit directions |
Supply Management (5 methods)
| Method | HTTP | Endpoint | Description |
|---|---|---|---|
listSupplies(data) | POST | /api/v1/supplies | List supplies (last 1000 by default) |
getSupply(ID) | GET | /api/v1/supplies/{ID} | Get supply details by ID |
getSuppliesGood(ID) | GET | /api/v1/supplies/{ID}/goods | Get goods in a supply |
getSuppliesPackage(ID) | GET | /api/v1/supplies/{ID}/package | Get supply packaging info |
getSupplyDiscrepancies(supplyId) | GET | /api/supplies/v1/discrepancies/{supplyId} | Get acceptance discrepancies (surplus/shortage/re-sorting) with acceptance video |
Supply Acceptance Discrepancies (1 method) - NEW
getSupplyDiscrepancies(supplyId) returns the discrepancies between the declared and the actual item quantity found at supply acceptance, per package, together with the acceptance-discrepancy video link and per-scan detail (skuScans[]).
Availability window: only for supplies accepted no more than one year ago. A 404 response means the supply was not found, has no discrepancies, or was accepted more than a year ago.
Discrepancy semantics:
| Direction | Type combination | Meaning |
|---|---|---|
| Upwards | discrepancyType: "surplus" + discrepancyLabel: "surplus" | Excess of items with the declared SKU |
| Upwards | discrepancyType: "surplus" + discrepancyLabel: "re-sorting" | Excess of items with a non-matching SKU |
| Downwards | discrepancyType: "shortage" + discrepancyLabel: "shortage" | Missing items |
| Downwards | discrepancyType: "shortage" + discrepancyLabel: "re-sorting" | Some SKUs do not match the declared ones |
const discrepancies = await sdk.ordersFBW.getSupplyDiscrepancies(2282893992);
for (const pkg of discrepancies) {
if (!pkg.videoUnavailable) {
console.log(`Acceptance video: ${pkg.videoUrl} (from ${pkg.videoStartsAt})`);
}
for (const item of pkg.items) {
console.log(
`${item.declaredSku}: declared ${item.declaredAmount}, actual ${item.actualAmount} (${item.discrepancyType})`
);
for (const scan of item.skuScans ?? []) {
console.log(` scan ${scan.scanId}: ${scan.discrepancyLabel} -> ${scan.actualSku}`);
}
}
}Rate limit: 1 request per minute
getSupplyDiscrepancies() has the strictest limit in the module — 1 request per minute, 1-minute interval, no burst. Do not loop over batches of supplies with this method.
The supply details response (getSupply()) now also includes an optional discrepancies field (integer) — the discrepancy count, present only when statusID: 5 (Accepted). Use getSupplyDiscrepancies() for the per-item breakdown.
Supply Drafts (6 methods) - NEW
Full CRUD for supply drafts — prepare the item list of a future supply before creating it. Added 2026-09 (WB news, category Supplies, Personal + Service tokens). draftId is a string UUID, not a number.
| Method | HTTP | Endpoint | Description |
|---|---|---|---|
createDraft() | POST | /api/supplies/v1/drafts | Create an empty draft (no request body) |
listDrafts(options?) | GET | /api/supplies/v1/drafts | List drafts (limit, offset, sort: createDt/updateDt, order: asc/desc) |
deleteDraft(draftId) | DELETE | /api/supplies/v1/drafts/{draftId} | Delete a draft (204 No Content on success) |
getDraftItems(draftId) | GET | /api/supplies/v1/drafts/{draftId}/items | List items in a draft with product-card info |
addDraftItems(draftId, data) | POST | /api/supplies/v1/drafts/{draftId}/items | Add items ({ quantity, sku }[], max 1000) — atomic |
deleteDraftItems(draftId, data) | DELETE | /api/supplies/v1/drafts/{draftId}/items | Remove items by SKU list (min 1) |
// Draft lifecycle
const { draftId } = await sdk.ordersFBW.createDraft();
const { results } = await sdk.ordersFBW.addDraftItems(draftId, {
items: [
{ quantity: 10, sku: '2000000512907' },
{ quantity: 5, sku: '2039395667350' },
],
});
if (results.length > 0) {
// Nothing was added — fix the SKUs and resend the whole batch
for (const { sku, error } of results) {
console.error(`${sku}: ${error.title} — ${error.detail}`);
}
}
const { skuQuantity, items } = await sdk.ordersFBW.getDraftItems(draftId);
console.log(`${skuQuantity} SKUs, first: ${items[0]?.vendorCode}`);
await sdk.ordersFBW.deleteDraftItems(draftId, { skus: ['2039395667350'] });
await sdk.ordersFBW.deleteDraft(draftId);addDraftItems is all-or-nothing
If at least one SKU fails validation, no items are added — the response results[] lists the invalid SKUs with error.title/error.detail. An empty results[] means the whole batch was added.
deleteDraftItems does not validate SKUs
Unknown SKUs are silently ignored (no error is returned); only the valid SKUs are removed from the draft.
DBW Orders (1 method)
| Method | HTTP | Endpoint | Domain | Description |
|---|---|---|---|---|
getClientInfo(orderIds) | POST | /api/marketplace/v3/dbw/orders/client | marketplace-api.wildberries.ru | Get buyer information for DBW orders |
Note:
getClientInfo()uses themarketplace-api.wildberries.rudomain, notsupplies-api.wildberries.rulike the other FBW methods.
Previously Deprecated Methods (Removed)
These methods were deprecated and have been removed from the module source.
| Method | Replacement | Notes |
|---|---|---|
getAcceptanceCoefficients(options?) | sdk.tariffs.getAcceptanceCoefficients() | Moved to Tariffs module. |
createSupply(data) | listSupplies(data) | Renamed for clarity. |
What's New (v3.4.0+)
getClientInfo() method
Retrieves buyer information (name, phone, country codes) for DBW (Delivery by Wildberries) assembly orders. Added in v3.4.0.
const result = await sdk.ordersFBW.getClientInfo([987654321, 123456789]);
for (const order of result.orders ?? []) {
console.log(`Order ${order.orderID}: ${order.firstName}`);
console.log(` Full name: ${order.fullName}`);
console.log(` Phone: +${order.phoneCode}${order.phone}`);
if (order.additionalPhoneCodes?.length) {
console.log(` Alt codes: ${order.additionalPhoneCodes.join(', ')}`);
}
}Key details:
- Throws
ValidationErroriforderIdsarray is empty - Uses
marketplace-api.wildberries.rudomain (notsupplies-api) - Returns
nullfororderswhen no matching orders are found
isBoxOnPallet and boxTypeID fields
ModelsSupply and ModelsSupplyDetails now include:
| Field | Type | Description |
|---|---|---|
boxTypeID | number | Supply type ID: 0 = no boxes, 1/2 = boxes, 5 = monopallets, 6 = supersafe, 7 = piece pallet |
isBoxOnPallet | boolean | Whether the supply is a "piece pallet" type |
canBoxOnPallet in warehouse options
When calling createAcceptanceOption(), each warehouse in the result now includes a canBoxOnPallet field indicating whether the "piece pallet" packaging type is available:
const options = await sdk.ordersFBW.createAcceptanceOption(
[{ barcode: '1234567891234', quantity: 10 }]
);
for (const item of options.result ?? []) {
for (const wh of item.warehouses ?? []) {
console.log(`Warehouse ${wh.warehouseID}:`);
console.log(` Box: ${wh.canBox}, Monopallet: ${wh.canMonopallet}`);
console.log(` Supersafe: ${wh.canSupersafe}, BoxOnPallet: ${wh.canBoxOnPallet}`);
}
}Usage Examples
Full Supply Workflow
import { WildberriesSDK } from 'daytona-wildberries-typescript-sdk';
const sdk = new WildberriesSDK({ apiKey: process.env.WB_API_KEY! });
async function fbwSupplyWorkflow() {
// 1. Check which warehouses accept your barcode
const options = await sdk.ordersFBW.createAcceptanceOption(
[{ barcode: '1234567891234', quantity: 100 }]
);
for (const item of options.result ?? []) {
if (item.isError) {
console.log(`Error for ${item.barcode}: ${item.error?.detail}`);
continue;
}
for (const wh of item.warehouses ?? []) {
console.log(`Warehouse ${wh.warehouseID}:`);
console.log(` Box: ${wh.canBox}, Monopallet: ${wh.canMonopallet}`);
console.log(` Supersafe: ${wh.canSupersafe}, BoxOnPallet: ${wh.canBoxOnPallet}`);
}
}
// 2. List existing supplies filtered by status
const supplies = await sdk.ordersFBW.listSupplies({
statusIDs: [1, 2], // Not planned + Planned
});
console.log(`Found ${supplies.length} supplies`);
// 3. Get supply details
if (supplies.length > 0) {
const supplyID = supplies[0].supplyID!;
const details = await sdk.ordersFBW.getSupply(supplyID);
console.log(`Supply ${supplyID}: ${details.statusName}`);
console.log(` Box type: ${details.boxTypeName} (ID: ${details.boxTypeID})`);
console.log(` Is box-on-pallet: ${details.isBoxOnPallet}`);
console.log(` Acceptance cost: ${details.acceptanceCost} RUB`);
// 4. Get goods in supply
const goods = await sdk.ordersFBW.getSuppliesGood(supplyID);
for (const good of goods) {
console.log(` ${good.vendorCode}: ${good.quantity} pcs`);
}
// 5. Get packaging info
const packages = await sdk.ordersFBW.getSuppliesPackage(supplyID);
for (const pkg of packages) {
console.log(` Package ${pkg.packageCode}: ${pkg.quantity} items`);
}
}
}Listing Warehouses and Transit Tariffs
async function exploreWarehouses() {
// List all WB warehouses
const warehouses = await sdk.ordersFBW.warehouses();
for (const wh of warehouses) {
console.log(`${wh.name} (ID: ${wh.ID})`);
console.log(` Address: ${wh.address}`);
console.log(` Hours: ${wh.workTime}`);
console.log(` Accepts QR: ${wh.acceptsQR}`);
console.log(` Active: ${wh.isActive}, Transit: ${wh.isTransitActive}`);
}
// Get transit tariffs
const tariffs = await sdk.ordersFBW.transitTariffs();
for (const tariff of tariffs) {
console.log(`${tariff.transitWarehouseName} -> ${tariff.destinationWarehouseName}`);
console.log(` Available from: ${tariff.activeFrom}`);
console.log(` Pallet tariff: ${tariff.palletTariff} RUB`);
}
}Getting DBW Buyer Information
async function getDBWBuyerInfo(orderIds: number[]) {
try {
const result = await sdk.ordersFBW.getClientInfo(orderIds);
if (!result.orders) {
console.log('No matching orders found');
return;
}
for (const order of result.orders) {
console.log(`Order ${order.orderID}:`);
console.log(` Name: ${order.firstName}`);
console.log(` Full name: ${order.fullName}`);
console.log(` Phone: +${order.phoneCode}${order.phone}`);
if (order.additionalPhoneCodes?.length) {
console.log(` Additional phone codes: ${order.additionalPhoneCodes.join(', ')}`);
}
}
} catch (error) {
if (error instanceof ValidationError) {
console.log('Validation error:', error.message);
}
throw error;
}
}Filtering Supplies by Date and Status
async function getRecentSupplies() {
const thirtyDaysAgo = new Date();
thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);
const supplies = await sdk.ordersFBW.listSupplies({
dates: [{
from: thirtyDaysAgo.toISOString(),
till: new Date().toISOString(),
type: 'createDate'
}],
statusIDs: [4, 5] // In acceptance + Accepted
});
for (const supply of supplies) {
const id = supply.supplyID ?? supply.preorderID;
console.log(`Supply ${id}: ${supply.statusName}`);
console.log(` Box type: ${supply.boxTypeName} (ID: ${supply.boxTypeID})`);
console.log(` Is box-on-pallet: ${supply.isBoxOnPallet}`);
console.log(` Created: ${supply.createDate}`);
}
}Types
Key Entity Types
// Supply list item
interface ModelsSupply {
phone?: string;
supplyID?: number;
preorderID?: number;
createDate?: string;
supplyDate?: string;
factDate?: string;
updatedDate?: string;
statusID?: 1 | 2 | 3 | 4 | 5 | 6;
statusName?: string;
boxTypeID?: number; // 0=no boxes, 1/2=boxes, 5=monopallets, 6=supersafe, 7=piece pallet
isBoxOnPallet?: boolean; // true if piece pallet type
}
// Supply details (extended)
interface ModelsSupplyDetails {
phone?: string;
statusID?: 1 | 2 | 3 | 4 | 5 | 6;
statusName?: string;
boxTypeID?: number;
boxTypeName?: string;
isBoxOnPallet?: boolean; // true if piece pallet type
virtualTypeID?: number;
virtualTypeName?: string;
createDate?: string;
supplyDate?: string;
factDate?: string;
updatedDate?: string;
warehouseID?: number;
warehouseName?: string;
actualWarehouseID?: number;
actualWarehouseName?: string;
transitWarehouseID?: number;
transitWarehouseName?: string;
acceptanceCost?: number;
paidAcceptanceCoefficient?: number;
rejectReason?: string;
supplierAssignName?: string;
storageCoef?: string;
deliveryCoef?: string;
quantity?: number;
readyForSaleQuantity?: number;
acceptedQuantity?: number;
unloadingQuantity?: number;
depersonalizedQuantity?: number;
discrepancies?: number; // discrepancy count — only when statusID=5 (Accepted)
}
// Supply acceptance discrepancy package (since 2026-09)
interface ModelsItemDiscrepancyResponse {
packageCode: string; // package ID
videoUrl: string; // acceptance discrepancy video
videoStartsAt: string; // video recording start (date-time)
videoUnavailable: boolean; // false means the video IS available
items: ModelsDiscrepancyResponseItem[];
}
// Per-item discrepancy row
interface ModelsDiscrepancyResponseItem {
declaredSku: string; // SKU declared when creating the supply
discrepancyType: 'surplus' | 'shortage' | 're-sorting'; // overall box-level type
declaredAmount: number; // declared quantity
actualAmount: number; // actual quantity
discrepancyQuantity: number; // difference
actualSku: string; // actual SKU
skuScans: ModelsItemScans[] | null; // scan results, null when none
}
// Single acceptance scan
interface ModelsItemScans {
scanId: number;
declaredSku: string;
scanTime: string; // date-time
discrepancyLabel: 'surplus' | 'shortage' | 're-sorting';
actualSku: string;
}
// Supply draft (since 2026-09, task-193) — list item
interface ModelsDraftItem {
draftId: string; // UUID
phone: string; // creator phone
createdAt: string; // ISO 8601
updatedAt: string; // ISO 8601
skuQuantity: number;
itemQuantity: number;
}
// Supply draft item — product-card enriched
interface ModelsDraftItemItem {
sku: string;
color: string;
quantity: number;
brandName: string;
imgSrc: string;
nmId: number;
subjectName: string;
techSize: string;
title: string;
vendorCode: string;
}
// Item to add to a draft ({ quantity, sku }, max 1000 per request)
interface ModelsItem {
quantity: number; // 1-999999
sku: string;
}
// addDraftItems() response: results[] lists INVALID skus; [] = all added
interface ModelsDraftAddItemsErrorResponse {
results: { sku: string; error: { title: string; detail: string } }[];
}
// Acceptance options result (with canBoxOnPallet)
interface ModelsOptionsResultModel {
result?: {
barcode?: string;
error?: { title?: string; detail?: string };
isError?: boolean;
warehouses?: {
warehouseID?: number;
canBox?: boolean;
canMonopallet?: boolean;
canSupersafe?: boolean;
canBoxOnPallet?: boolean; // piece pallet availability
}[];
}[];
requestId?: string;
}
// Warehouse info
interface ModelsWarehousesResultItems {
ID?: number;
name?: string;
address?: string;
workTime?: string;
acceptsQR?: boolean;
isActive?: boolean;
isTransitActive?: boolean;
}
// DBW buyer information (since v3.4.0)
interface DBWClientInfo {
orderID?: number;
firstName?: string;
fullName?: string;
phone?: string;
phoneCode?: number;
additionalPhoneCodes?: number[];
}
// DBW client info response
interface GetDBWClientInfoResponse {
orders?: DBWClientInfo[] | null;
}
// Good in supply
interface ModelsGoodInSupply {
barcode?: string;
vendorCode?: string;
nmID?: number;
needKiz?: boolean;
tnved?: string;
techSize?: string;
color?: string;
supplierBoxAmount?: number;
quantity?: number;
readyForSaleQuantity?: number;
acceptedQuantity?: number;
unloadingQuantity?: number;
}
// Transit tariff
interface ModelsTransitTariff {
transitWarehouseName?: string;
destinationWarehouseName?: string;
activeFrom?: string;
boxTariff?: ModelsVolumeTariff[];
palletTariff?: number;
}
// API error model
interface ModelsErrorModel {
status?: number;
title?: string;
detail?: string;
requestId?: string;
origin?: string;
}Supply Status IDs
| ID | Status |
|---|---|
| 1 | Not planned |
| 2 | Planned |
| 3 | Shipment allowed |
| 4 | Acceptance in progress |
| 5 | Accepted |
| 6 | Shipped at gates |
Box Type IDs
| ID | Type |
|---|---|
| 0 | No boxes (virtual supply) |
| 1, 2 | Boxes |
| 5 | Monopallets |
| 6 | Supersafe |
| 7 | Piece pallet (isBoxOnPallet: true) |
Rate Limits
| Rate Limit Key | Operations | Limit | Interval | Burst | Penalty |
|---|---|---|---|---|---|
orders-fbw.acceptanceCoefficients | Acceptance coefficients (deprecated) | 6 req/min | 10s | 6 | -- |
orders-fbw.postAcceptanceOptions | Create acceptance option | 6 req/min | 10s | 6 | -- |
orders-fbw.warehouses | List warehouses | 6 req/min | 10s | 6 | -- |
orders-fbw.transitTariffs | Transit tariffs | 6 req/min | 10s | 10 | -- |
orders-fbw.postSupplies | List supplies | 30 req/min | 2s | 10 | -- |
orders-fbw.supplies | Get supply details | 30 req/min | 2s | 10 | -- |
orders-fbw.suppliesGoods | Get supply goods | 30 req/min | 2s | 10 | -- |
orders-fbw.suppliesPackage | Get supply packaging | 30 req/min | 2s | 10 | -- |
orders-fbw.supplyDiscrepancies | Get supply acceptance discrepancies | 1 req/min | 60s | 1 | -- |
orders-fbw.draftCreate | Create supply draft | 30 req/min | 2s | 10 | -- |
orders-fbw.draftsList | List supply drafts | 30 req/min | 2s | 10 | -- |
orders-fbw.draftDelete | Delete supply draft | 30 req/min | 2s | 10 | -- |
orders-fbw.draftItemsAdd | Add items to supply draft | 30 req/min | 2s | 10 | -- |
orders-fbw.draftItemsList | List supply draft items | 30 req/min | 2s | 10 | -- |
orders-fbw.draftItemsDelete | Delete supply draft items | 30 req/min | 2s | 10 | -- |
orders-fbw.getClientInfo | Get DBW buyer info | 300 req/min | 200ms | 20 | 10x on 409 |
409 Penalty: A single 409 response from
getClientInfo()counts as 10 requests against the rate limit quota due topenaltyMultiplier: 10.
Error Handling
import { ValidationError, RateLimitError, WBAPIError } from 'daytona-wildberries-typescript-sdk';
try {
const result = await sdk.ordersFBW.getClientInfo([987654321]);
} catch (error) {
if (error instanceof ValidationError) {
// Empty orderIds array
console.log('Validation:', error.message);
} else if (error instanceof RateLimitError) {
console.log(`Rate limited. Retry after ${error.retryAfter}ms`);
} else if (error instanceof WBAPIError) {
console.log(`API error ${error.statusCode}: ${error.message}`);
}
}Related Resources
Changelog
| Version | Date | Changes |
|---|---|---|
| Unreleased | 2026-09 | Added six supply-drafts methods (createDraft, listDrafts, deleteDraft, getDraftItems, addDraftItems, deleteDraftItems) on /api/supplies/v1/drafts (30 req/min each); added ModelsDraft*/ModelsItem types; method count 13 -> 19 |
| Unreleased | 2026-09 | Added getSupplyDiscrepancies() (GET /api/supplies/v1/discrepancies/{supplyId}, 1 req/min); added optional discrepancies to ModelsSupplyDetails (only when statusID=5); added ModelsItemDiscrepancyResponse, ModelsDiscrepancyResponseItem, ModelsItemScans types |
| 3.5.0 | 2026-03 | Added isBoxOnPallet and boxTypeID to ModelsSupply and ModelsSupplyDetails; added canBoxOnPallet to warehouse options |
| 3.4.0 | 2026-03 | Added getClientInfo() method (DBW buyer info, 300 req/min, marketplace-api domain); added DBWClientInfo and GetDBWClientInfoResponse types; method count 8 -> 9 active |
| 3.0.0 | 2026-02 | Renamed createSupply to listSupplies; deprecated getAcceptanceCoefficients |
| 2.0.0 | 2025-10 | Initial Orders FBW module with 8 methods |