Skip to content

Wildberries API TypeScript SDK v5.0.0 ​

Wildberries API TypeScript SDK Main entry point

Modules ​

ModuleDescription
<internal>-

Classes ​

ClassDescription
BaseClientBase HTTP client for all Wildberries API modules
AuthenticationErrorAuthentication error thrown when API key is invalid or lacks permissions.
WBAPIErrorBase error class for all Wildberries SDK errors.
BidOutOfRangeErrorError thrown when WB rejects a bid for being out of the accepted range.
CustomsDeclarationIsRequiredErrorError thrown when WB returns HTTP 409 with body code: 'CustomsDeclarationIsRequired' — at least one assembly order in the request lacks a required customs-declaration (ДТ, декларация на товары) number.
PickupOrderNotFoundErrorError thrown when a pickup order is not found
InvalidOrderStateErrorError thrown when an order state transition is invalid
CustomerVerificationErrorError thrown when customer identity verification fails
MetadataValidationErrorError thrown when product metadata validation fails
MetaValidationFailErrorError thrown when PATCH /api/v3/supplies/{supplyId}/deliver returns HTTP 409 with marking-code validation failures in the metaDetails response array.
NetworkErrorNetwork error thrown for connection failures, timeouts, and server errors.
CampaignNotFoundErrorError thrown when a campaign is not found by its ID.
InvalidBidErrorError thrown when bid amount is invalid or below minimum.
BudgetExceededErrorError thrown when campaign budget is exceeded or insufficient.
InvalidCampaignStateErrorError thrown when attempting invalid campaign state transitions.
RateLimitErrorRate limit error thrown when API rate limits are exceeded.
ValidationErrorValidation error thrown when request data fails validation.
WarehouseStocksUpdateBlockErrorError thrown when WB returns HTTP 406 WarehouseStocksUpdateBlock on inventory updates.
WildberriesSDKMain SDK class providing access to all Wildberries API modules.
AnalyticsModule-
CommunicationsModule-
FinancesModule-
GeneralModule-
InStorePickupModule-
OrdersDbsModuleOrders DBS Module for managing Delivery by Seller orders
OrdersFbsModule-
OrdersFbwModule-
ProductsModule-
PromotionModule-
ReportsModule-
ReturnsModuleReturns aggregator module — combines FBO, FBS, and Finance sources into a unified ReturnItem[] with full partial-failure tolerance.
TariffsModule-
UserManagementModule-

Interfaces ​

InterfaceDescription
RateLimitConfigConfiguration for rate limiting a specific endpoint.
OperationMetadataMetadata for a single SDK operation
SDKConfigConfiguration options for initializing the Wildberries SDK
RequestOptionsPer-request options that can override SDK defaults
SellerMessageRequestRequest body for CommunicationsModule.createSellerMessage.
CreateTestDbsOrderItemProduct and quantity for one test DBS assembly order.
CreateTestDbsOrdersAddressDelivery address for test DBS assembly orders.
CreateTestDbsOrdersRequestRequest body for ordersDBS.createTestOrders().
DBSClientInfoCustomer contact information for DBS orders Returned by getClientInfo
MetaValidationDetailPer-order metadata validation status returned in 409 MetaValidationFail responses. When deliverBulk() returns this for an order, the marking metadata (SGTIN/IMEI) failed WB's validation — fix the metadata before retrying.
GetClientInfoResponseResponse from getClientInfo
OrderMetaResponseResponse containing metadata for a single order
OrdersMetaResponseResponse containing metadata for multiple orders
OrderMetaItemA single order's metadata entry (used in bulk metadata responses)
MetaDetailMetadata detail item with validation status Replaces the deprecated meta object. Use with /api/marketplace/v3/orders/meta endpoint.
APIErrorAPI error response (v3 schema) Maps to swagger schema: v3.APIError
APIErrorV2WB v3 APIErrorV2 envelope -- the newer V2 error shape returned by some v3 endpoints (e.g. 400/403 responses). Maps to swagger schema: v3.APIErrorV2.
DBWDeleteMetaBulkRequestRequest body for bulk deletion of marking metadata from DBW orders. Mirrors DBS DeleteMetaBulkRequest.
DBWDeleteMetaBulkResponseResponse from bulk metadata deletion for DBW orders. Mirrors DBS DeleteMetaBulkResponse.
DBWSetSgtinBulkRequestRequest body for bulk SGTIN code assignment on DBW orders. Mirrors DBS SetSgtinBulkRequest.
DBWSetMetaBulkResponseResponse from bulk metadata set operations for DBW orders. Mirrors DBS SetMetaBulkResponse.
DBWCheckMetaValidationRequestRequest body for OrdersFbwModule.checkMetaValidation.
DBWCheckMetaValidationResponseResponse from OrdersFbwModule.checkMetaValidation. Each item in metaDetails[] reports the validation status of a single order's marking metadata. Use this before calling deliverBulk() to detect orders that would fail with 409 MetaValidationFail.
GetDirectoryTnvedAllOptionsQuery parameters for GET /api/content/v2/directory/tnved/all.
GetDirectoryOkpdOptionsQuery parameters for GET /api/content/v2/directory/okpd.
GetDirectoryOkpdAllOptionsQuery parameters for GET /api/content/v2/directory/okpd/all.
TnvedDirectoryEntryTN VED entry returned by GET /api/content/v2/directory/tnved/all.
OkpdDirectoryEntryOKPD2 entry returned by the OKPD2 directory methods.
GetDirectoryTnvedAllResponseSuccessful full TN VED directory response.
GetDirectoryOkpdResponseSuccessful OKPD2 directory response.
CardDocumentInputA single product card document in create requests. Used in createCardsUpload() (per variant), createUploadAdd() (per card to add).
CardDocumentsRequestDocuments block of a product card in create requests (createCardsUpload(), createUploadAdd()).
CardUpdateDocumentInputA single product card document in update requests (createCardsUpdate()).
CardUpdateDocumentsRequestDocuments block of a product card in update requests (createCardsUpdate()).
CardDocumentVerdictValidation verdict of a single card document. Returned in getCardsList() responses when the document validation is completed.
CardDocumentsOverallVerdictOverall validation verdict of the card listing documents. Returned in getCardsList() responses when the validation is completed.
CardDocumentA single product card document as returned by getCardsList().
CardDocumentsResponseDocuments block of a product card in getCardsList() responses.
StockItemA single stock record on a seller warehouse.
StocksRequestRequest body for ProductsModule.getStocks and ProductsModule.deleteStock.
UpdateStockRequestRequest body for ProductsModule.updateStock.
GetStocksResponseResponse from ProductsModule.getStocks.
DeleteCardsFromTrashRequestRequest body for ProductsModule.deleteCardsFromTrash.
DeleteCardsFromTrashResponseResponse from ProductsModule.deleteCardsFromTrash.
ReturnItemUnified return record across FBO and FBS sources.
ReturnsApiRequestRequest parameters for sdk.returns.getReturns().
PartialFailurePer-source failure record returned in ReturnsApiResponse.
ReturnsMetaPer-source telemetry — surfaces what was fetched/skipped.
ReturnsApiResponseResponse from sdk.returns.getReturns().
ReturnByOrderIdParamsParameters for sdk.returns.getReturnByOrderId(). Date window is required because WB API requires it.
ReturnStatsParamsParameters for sdk.returns.getReturnStats().
ReturnStatsBucketSingle bucket in a return statistics aggregation.
ReturnStatsResultAggregated return statistics returned by sdk.returns.getReturnStats(). Surfaces underlying getReturns() telemetry transparently.
AccessItemЭлемент настройки доступа к разделу профиля продавца
InviteeInfoИнформация о приглашении пользователя
UserInfoИнформация о пользователе профиля продавца
GetUsersResponseОтвет на запрос списка пользователей
GetUsersParamsПараметры запроса для получения списка пользователей
CreateInviteRequestЗапрос на создание приглашения пользователя
CreateInviteResponseОтвет на запрос создания приглашения
UserAccessНастройки доступа для конкретного пользователя
UpdateUserAccessRequestЗапрос на обновление настроек доступа пользователей
UserManagementErrorResponseОтвет с информацией об ошибке от User Management API
BidRangeEffective accepted bid range for an article, in kopecks.
SupplyCostInputInput parameters for supply cost calculation
SupplyCostResultResult of supply cost calculation
FbsStatusEventSingle FBS status event from order status history. Consumer shapes this from their order_wb_status_history table or SDK call.
CompareTariffsInputInput parameters for tariff comparison
TariffDataTariff data from a single source
TariffDifferencePercentage differences between inventory and supply tariffs
TariffComparisonComplete tariff comparison result
WbReturnUnified return record across FBO and FBS sources.
FbsReturnInputMinimal FBS return shape — what consumers should pass for FBS returns. The actual FBS return data comes from order status history; consumers shape it into this minimal record before calling enrichReturnsWithType().
MetaValidationFailPayloadParsed payload extracted from a MetaValidationFailError or a compatible plain object.
AcceptanceDeltaItemPer-nmId acceptance delta (declared vs accepted).
ReconcileAcceptanceDeltaInputInput for reconcileAcceptanceDelta.
ReconcileAcceptanceDeltaResultAggregated acceptance reconciliation result.
BuyoutInputBuyout record input — minimal shape derived from sdk.analytics getStocksReportProducts() output. Consumers shape their data into this before calling reconcileBuyoutsAndReturns().
ReconciliationAnomalyAnomaly detected during reconciliation.
ReconciliationResultPer-nmId reconciliation summary.
ReconcileOptionsOptional configuration for reconciliation.
ROASResultResult of computeROAS.
ComputeROASOptionsOptions for computeROAS.
MergedCardVariantA single product variant within a merged card.
MergedCardValidationResultResult of merged card variant validation.

Type Aliases ​

Type AliasDescription
EndpointLimitsMapping of endpoint keys to their rate limit configurations.
DbsTestDeliveryTypeDelivery model for a test DBS assembly order in the WB sandbox.
DBWBulkStatusChangeResponseResponse shape for DBW bulk status-change operations (alias for BulkStatusChangeResponse). Maintained as a DBW-prefixed alias to preserve API symmetry with DBW request types.
DBWStatusSetResponsePer-order result item in a DBW bulk status-change response (alias for StatusSetResponse).
DBWMetaValidationDetailPer-order metadata validation detail (alias for MetaValidationDetail).
TnvedDirectoryLocaleSupported response language for the full TN VED directory.
OkpdDirectoryLocaleSupported response language for the subject-specific OKPD2 directory.
OkpdFullDirectoryLocaleSupported response language for the full OKPD2 directory.
GetDirectoryOkpdAllResponseSuccessful full OKPD2 directory response.
CardDocumentTypeProduct card document type (WB register document kinds).
CardDocumentReasonReason a card document failed validation. Returned for verdict.status: 2 (validation rejected) in getCardsList() responses.
CardListingValidationReasonReason a card listing failed validation. Returned for overallVerdict.status: 2 (validation rejected) in getCardsList() responses.
ReturnStatusCurrent state of a return.
ReturnCategoryCategorized return type, derived from order fulfillment path and status history.
AccessCodeКод раздела профиля продавца, к которому пользователь получит доступ.
ReturnReasonCodeStandardized return reason codes derived from Wildberries free-text reason strings.
TariffRecommendationRecommendation based on tariff comparison

Variables ​

VariableDescription
analyticsRateLimits-
communicationsRateLimits-
financesRateLimits-
generalRateLimits-
inStorePickupRateLimits-
operationMetadataRegistry of operation metadata for all SDK operations
ordersDbsRateLimits-
ordersFbsRateLimits-
ordersFbwRateLimits-
productsRateLimits-
promotionRateLimits-
ALL_RATE_LIMITSAggregated rate limit configuration for all SDK modules.
reportsRateLimits-
tariffsRateLimits-
userManagementRateLimits-
versionSDK version
COMMUNICATIONS_LIMITSExported limits for external testability and documentation.
WITH_PHOTO_FILTERFilter values for ProductsModule.getCardsList data.settings.filter.withPhoto.

Functions ​

FunctionDescription
isOperationReadonlyCheck if an operation is readonly (safe to retry)
getOperationCategoryGet the API category for an operation
getOperationRateLimitKeyGet the rate limit key for an operation
getOperationMetadataGet full metadata for an operation
getOperationsByCategoryGet all operations for a specific category
getReadonlyOperationsGet all readonly operations
getWriteOperationsGet all write operations (not readonly)
parseBidOutOfRangeDetailParse a WB advert detail string for the bid-out-of-range format.
extractBidRangeCompute the effective bid range for an article from a recommendations response.
validateBidValidate a desired bid against an article's recommendation range.
clampBidClamp a desired bid into an article's recommendation range.
calculateSupplyCostCalculates the total supply cost including acceptance, storage, and logistics
classifyFbsReturnCategoryClassifies an FBS order's return category by analyzing its status history.
classifyReturnReasonClassifies a Wildberries return reason string into a standardized enum code.
compareTariffsCompare tariffs between inventory storage (tariffs/box) and supply (acceptance/coefficients) APIs
warnOnceEmit a deprecation warning for a method, at most once per process.
resetDeprecationWarningsReset all deprecation warning flags. Test helper only.
enrichReturnsWithTypeBuilds a unified WbReturn[] from FBO returns and optional FBS returns (derived from sdk.ordersFBS status history).
parseMetaValidationFailExtracts marking-code validation failure details from an unknown caught value.
parseMoneyAmountParse a money amount string from v1 finance reports to a JavaScript number.
reconcileAcceptanceDeltaReconciles declared vs accepted quantity per nmId for FBO acceptance.
reconcileBuyoutsAndReturnsReconciles buyouts and returns per nmId for unified analytics.
computeROASCompute ROAS (Return on Ad Spend) from WB fullstats per-day data.
validateMergedCardVariantsClient-side validator for merged product card variants.
validateRequiredCharacteristicsValidates that all mandatory characteristics are present in a card creation request. Returns the list of missing mandatory characteristics.

References ​

default ​

Renames and re-exports WildberriesSDK

Made with ❤️ for the Wildberries developer community