/** * Auto-generated TypeScript types for orders-fbs module * Generated from: wildberries_api_doc/03-orders-fbs.yaml * * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation * * Generated: 2025-12-14T23:02:33.780Z */ /** Supplier-side order status */ export type OrderSupplierStatus = 'new' | 'confirm' | 'complete' | 'cancel'; /** Wildberries system order status */ export type OrderWbStatus = 'waiting' | 'sorted' | 'sold' | 'canceled' | 'canceled_by_client' | 'declined_by_client' | 'defect' | 'ready_for_pickup' | 'postponed_delivery' | 'accepted_by_carrier' | 'sent_to_carrier'; /** Cargo type: 1 = small, 2 = oversized, 3 = large */ export type CargoType = 1 | 2 | 3; /** Sticker output format */ export type StickerType = 'svg' | 'zplv' | 'zplh' | 'png'; /** Parameters for paginated order listing */ export interface GetOrdersParams { /** Maximum number of items to return (1-1000) */ limit: number; /** Pagination cursor; set to 0 for the first request */ next: number; /** Start of date range (Unix timestamp) */ dateFrom?: number; /** End of date range (Unix timestamp) */ dateTo?: number; /** Index signature for compatibility with Record */ [key: string]: unknown; } /** Request body containing an array of order IDs for status lookup */ export interface OrderStatusRequest { /** List of order IDs */ orders: number[]; } /** Request body for retrieving order stickers */ export interface StickerRequest { /** List of order IDs (max 100) */ orders?: number[]; } /** Query parameters for sticker format and dimensions */ export interface StickerParams { /** Output format */ type: StickerType; /** Sticker width in mm (58 or 40) */ width: number; /** Sticker height in mm (40 or 30) */ height: number; /** Index signature for compatibility with Record */ [key: string]: unknown; } /** Request body for cross-border order stickers */ export interface CrossBorderStickerRequest { /** List of order IDs */ orders?: number[]; } /** Request body for cross-border status history lookup */ export interface StatusHistoryRequest { /** List of order IDs */ orders?: number[]; } /** Query parameters for deleting order metadata by key */ export interface DeleteMetaParams { /** Metadata key to delete: imei, uin, gtin, sgtin, or customsDeclaration */ key?: 'imei' | 'uin' | 'gtin' | 'sgtin' | 'customsDeclaration'; } /** Request body for attaching SGTIN marking codes to an order */ export interface MetaSgtinRequest { /** List of SGTIN marking codes */ sgtins: string[]; } /** Request body for attaching a UIN to an order */ export interface MetaUinRequest { /** Unique identification number */ uin: string; } /** Request body for attaching an IMEI to an order */ export interface MetaImeiRequest { /** IMEI number */ imei: string; } /** Request body for attaching a GTIN to an order */ export interface MetaGtinRequest { /** Global Trade Item Number */ gtin: string; } /** Request body for attaching an expiration date to an order */ export interface MetaExpirationRequest { /** Expiration date string (dd.mm.yyyy) */ expiration: string; } /** Request body for attaching a customs declaration number to an order */ export interface MetaCustomsDeclarationRequest { /** Customs declaration number */ customsDeclaration: string; } /** Request body for creating a new supply */ export interface SupplyCreateRequest { /** Supply name */ name?: string; } /** Request body for adding orders to a supply */ export interface AddOrdersToSupplyRequest { /** List of order IDs to add */ orders: number[]; } /** * Request body for moving assembly orders from delivery back to assembly. * @see task-241 */ export interface TransferSupplyOrdersRequest { /** Assembly order IDs to move back to assembly */ orderIds: number[]; /** * ID of the supply the orders are moved TO. The supply must NOT be * transferred to delivery */ newSupplyId: string; } /** * Per-order result of moving an assembly order from delivery back to assembly. * Maps to swagger schema: v3.TransferOrderToAssembly * @see task-241 */ export interface TransferOrderToAssembly { /** Assembly order ID */ orderId: number; /** Sticker ID in the old (closed) supply; `0` on error */ oldStickerId: number; /** New sticker ID in the target supply; `0` on error */ newStickerId: number; /** Whether the order was moved successfully (only `true` on success entries) */ success?: boolean; /** Error details when the order could not be moved */ error?: { /** Internal error code (e.g. 409) */ code: number; /** Error details */ detail: string; }; } /** * Response for PATCH /api/marketplace/v3/fbs/supplies/{supplyId}/orders/transfer. * Maps to swagger schema: v3.TransferOrdersToAssemblyResponse * @see task-241 */ export interface TransferOrdersToAssemblyResponse { /** Per-order transfer results */ transferredOrders?: TransferOrderToAssembly[]; } /** Request body for creating boxes (trbx) in a supply */ export interface TrbxCreateRequest { /** Number of boxes to create */ amount: number; } /** Request body for deleting boxes from a supply */ export interface TrbxDeleteRequest { /** List of box IDs to delete */ trbxIds: string[]; } /** Request body for retrieving box stickers */ export interface TrbxStickerRequest { /** List of box IDs */ trbxIds: string[]; } /** Request body for creating a seller pass */ export interface PassCreateRequest { /** Driver first name */ firstName: string; /** Driver last name */ lastName: string; /** Car model */ carModel: string; /** Car number (letters and digits only) */ carNumber: string; /** Warehouse office ID */ officeId: number; } /** Response after creating a seller pass */ export interface PassCreateResponse { /** Created pass ID */ id?: number; } /** Query parameters for fetching supplies list */ export interface GetSuppliesParams { /** Maximum number of items to return */ limit: number; /** Pagination cursor; set to 0 for the first request */ next: number; /** Index signature for compatibility with Record */ [key: string]: unknown; } /** Query parameters for sticker/barcode format */ export interface BarcodeParams { /** Output format */ type: StickerType; /** Index signature for compatibility with Record */ [key: string]: unknown; } /** Request body for retrieving metadata of multiple orders (max 100) */ export interface GetMetaMultiRequest { /** List of order IDs (max 100) */ orders: number[]; } /** * Generic order IDs request body used across multiple endpoints * * @example * ```json * { * "orders": [ * 987654321, * 123456789 * ] * } * ``` */ export interface OrdersRequestAPI { /** List of order IDs */ orders?: number[]; } /** Response containing a list of new (unprocessed) orders */ export interface OrdersNewResponse { /** List of new orders */ orders?: OrderNew[]; } /** Paginated response containing orders */ export interface OrdersResponse { /** Pagination cursor for the next page */ next?: Next; /** List of orders */ orders?: Order[]; } /** Individual order status entry */ export interface OrderStatusItem { /** Order ID */ id?: number; /** Supplier-side status */ supplierStatus?: OrderSupplierStatus; /** Wildberries system status */ wbStatus?: OrderWbStatus; /** * Whether this assembly task can still be cancelled by the seller before * being transferred to Wildberries. When `true`, you can call * `sdk.ordersFBS.cancelOrder(orderId)` and it will succeed. * * Use this field as a pre-check to avoid unnecessary API calls and 4xx errors * when the task is already past the cancellation window. * * @since 3.11.0 * @see {@link https://dev.wildberries.ru/docs/openapi/orders-fbs/#tag/Sborochnye-zadaniya-FBS/paths/~1api~1v3~1orders~1status/post} * @example * ```typescript * for (const status of statuses) { * if (status.isCancellable) { * await sdk.ordersFBS.cancelOrder(status.id!); * } * } * ``` */ isCancellable?: boolean; /** * Whether this assembly task can be moved from delivery (`complete`) back * to assembly (`confirm`) via `transferSupplyOrders()`. `true` only when * all conditions hold: the task is in `complete`; the target supply is not * transferred to delivery; the task has not been moved back before. * * Use this field as a pre-check to avoid unnecessary API calls and 4xx errors. * * @since task-241 * @see {@link https://dev.wildberries.ru/docs/openapi/orders-fbs#tag/fbsSupplies/operation/patchV3FbsSuppliesSupplyIdOrdersTransfer} * @example * ```typescript * for (const status of statuses) { * if (status.isTransferable) { * await sdk.ordersFBS.transferSupplyOrders(fromSupplyId, { * orderIds: [status.id!], * newSupplyId: 'WB-GI-200', * }); * } * } * ``` */ isTransferable?: boolean; } /** Response containing order statuses */ export interface OrderStatusResponse { /** List of order status entries */ orders?: OrderStatusItem[]; } /** Response containing orders that require reshipment */ export interface ReshipmentResponse { /** List of reshipment orders */ orders?: ReshipmentOrder[]; } /** An order that requires reshipment */ export interface ReshipmentOrder { /** Supply ID the order belongs to */ supplyID?: string; /** Order ID */ orderID?: number; } /** Individual sticker data item */ export interface StickerItem { /** Order ID */ orderId?: number; /** Sticker part A value */ partA?: string; /** Sticker part B value */ partB?: string; /** Encoded barcode value */ barcode?: string; /** Base64-encoded sticker file */ file?: string; } /** Response containing order stickers */ export interface StickerResponse { /** List of sticker data */ stickers?: StickerItem[]; } /** Individual cross-border sticker data item */ export interface CrossBorderStickerItem { /** Base64-encoded sticker file */ file?: string; /** Order ID */ orderId?: number; /** Parcel ID */ parcelId?: string; /** Sticker generation status. Stickers may generate with delay — poll until 'ready'. */ status?: 'awaitingTrackNumber' | 'ready'; } /** Response containing cross-border order stickers */ export interface CrossBorderStickerResponse { /** List of cross-border sticker data */ stickers?: CrossBorderStickerItem[]; } /** Individual status entry in status history */ export interface StatusHistoryEntry { /** Status timestamp */ date?: string; /** Status code */ code?: string; } /** Individual order status history item */ export interface StatusHistoryItem { /** Delivery date */ deliveryDate?: string; /** List of status entries */ statuses?: StatusHistoryEntry[]; /** Order ID */ orderID?: number; } /** Response containing cross-border status history */ export interface StatusHistoryResponse { /** List of order status histories */ orders?: StatusHistoryItem[]; } /** Individual external sticker item (deprecated endpoint) */ export interface ExternalStickerItem { /** Order ID */ orderID?: number; /** Sticker URL */ url?: string; /** Parcel ID */ parcelID?: string; } /** Response for external sticker URLs (deprecated endpoint) */ export interface ExternalStickerResponse { /** List of external sticker data */ stickers?: ExternalStickerItem[]; } /** Response containing metadata for a single order */ export interface OrderMetaResponse { /** Metadata details with validation status */ metaDetails?: MetaDetail[]; } /** Response containing metadata for multiple orders */ export interface OrdersMetaResponse { /** List of order metadata items */ orders?: OrderMetaItem[]; } /** A single order's metadata entry (used in bulk metadata responses) */ export interface OrderMetaItem { /** Order ID */ id?: number; /** Metadata details with validation status */ metaDetails?: MetaDetail[]; } /** Response after creating a new supply */ export interface SupplyCreateResponse { /** Created supply ID */ id?: string; } /** Paginated response containing supplies */ export interface SuppliesResponse { /** Pagination cursor for the next page */ next?: Next; /** List of supplies */ supplies?: Supply[]; } /** Response containing orders within a supply (legacy format) */ export interface SupplyOrdersResponse { /** List of supply orders */ orders?: SupplyOrder[]; } /** Response containing order IDs within a supply */ export interface SupplyOrderIdsResponse { /** List of order IDs in the supply */ orderIds?: number[]; } /** Response containing a supply barcode / QR code */ export interface BarcodeResponse { /** Encoded barcode value */ barcode?: string; /** Base64-encoded barcode file */ file?: string; } /** Response containing a list of supply boxes */ export interface TrbxListResponse { /** List of boxes */ trbxes?: SupplyTrbx[]; } /** Response after creating boxes in a supply */ export interface TrbxCreateResponse { /** List of created box IDs */ trbxIds?: string[]; } /** Array of seller passes */ export type PassesResponse = Pass[]; /** * API error object returned by FBS endpoints. * Named FbsApiError to avoid shadowing the built-in Error class. */ export interface FbsApiError { /** Error code */ code?: string; /** Error description */ message?: string; /** Additional data enriching the error */ data?: Record; } /** * Pagination cursor value for retrieving the next batch of data * * @example * ```json * 13833711 * ``` */ export type Next = number; /** * Assembly order (sborochnoe zadanie) with full details */ export interface Order { /** Buyer's delivery address; some fields may be empty depending on address specifics */ address?: { /** Full delivery address */ fullAddress?: string; /** Longitude */ longitude?: number; /** Latitude */ latitude?: number; }; /** Acceptance price in kopecks; shown after actual order acceptance */ scanPrice?: number; /** Delivery type: fbs = delivery to Wildberries warehouse */ deliveryType?: 'fbs'; /** Supply ID; returned if the order is assigned to a supply */ supplyId?: string; /** Transaction ID for grouping orders from the same buyer cart */ orderUid?: string; /** Seller article */ article?: string; /** Color code (only for tintable products) */ colorCode?: string; /** Unique order ID (corresponds to srid in other report endpoints) */ rid?: string; /** Order creation date (RFC3339) */ createdAt?: string; /** List of offices where the product should be delivered */ offices?: string[]; /** List of barcodes */ skus?: string[]; /** Assembly order ID */ id?: number; /** Seller warehouse ID that received the order */ warehouseId?: number; /** WB warehouse ID linked to the seller warehouse */ officeId?: number; /** WB article number */ nmId?: number; /** Product size ID in the WB system */ chrtId?: number; /** Price in sale currency with all discounts except WB Wallet, multiplied by 100 */ price?: number; /** Price in seller's country currency with all discounts except WB Wallet, multiplied by 100 */ convertedPrice?: number; /** Sale currency code (ISO 4217) */ currencyCode?: number; /** Seller's country currency code (ISO 4217) */ convertedCurrencyCode?: number; /** Cargo type: 1 = small, 2 = oversized, 3 = large */ cargoType?: CargoType; /** Cross-border type: 0 = not cross-border, 1 = cross-border */ crossBorderType?: 0 | 1; /** Buyer comment */ comment?: string; /** Whether this is a zero-stock order (can be cancelled without penalty) */ isZeroOrder?: boolean; /** Track number for Cross-Border orders (e.g. 'NRU56565656') @since task-242 */ trackNumber?: string; /** Order options */ options?: { /** Whether this is a B2B sale */ isB2b?: boolean; }; } /** * Supply (postavka) entity representing a shipment batch */ export interface Supply { /** Supply ID */ id?: string; /** Whether the supply is closed */ done?: boolean; /** Supply creation date (RFC3339) */ createdAt?: string; /** Supply closing date (RFC3339) */ closedAt?: string; /** Supply scan date (RFC3339) */ scanDt?: string; /** Supply name */ name?: string; /** Cargo type: 0 = unset, 1 = small, 2 = oversized, 3 = large */ cargoType?: 0 | 1 | 2 | 3; /** Cross-border type: 0 = not cross-border, 1 = cross-border, null = unset */ crossBorderType?: 0 | 1 | null; /** Destination warehouse ID; null if not specified */ destinationOfficeId?: number; /** Whether this supply contains B2B orders. Once the first order is added, the supply inherits its B2B flag. Since March 19, 2026 mixing B2B and non-B2B orders in one supply is rejected. */ isB2b?: boolean; /** Whether you can dispatch the order to a pickup point */ isPickupPointShipmentAllowed?: boolean; /** ID of the recommended warehouse for acceptance of the supply for Moscow and Moscow region; 0 if not determined */ recommendedWhId?: number; /** Whether SPOT is available for this supply: `true` — SPOT data can be added via `updateSupplySpot()` and read via `getSuppliesSpotList()`; `false` — no */ spotAvailable?: boolean; } /** * New (unprocessed) assembly order with additional pricing and metadata fields */ export interface OrderNew { /** Buyer's delivery address; some fields may be empty depending on address specifics */ address?: { /** Full delivery address */ fullAddress?: string; /** Longitude */ longitude?: number; /** Latitude */ latitude?: number; }; /** Planned delivery date; shown for oversized (SGT, cargoType: 2) orders */ ddate?: string; /** Recommended delivery date for oversized items to the sorting center */ sellerDate?: string; /** Seller price in sale currency with seller discount, without WB Club discount, multiplied by 100 */ salePrice?: number; /** List of required metadata keys that must be added to the order */ requiredMeta?: string[]; /** List of optional metadata keys that can be added to the order */ optionalMeta?: string[]; /** Delivery type: fbs = delivery to Wildberries warehouse */ deliveryType?: 'fbs'; /** Buyer comment */ comment?: string; /** Acceptance price in kopecks; always null for this endpoint */ scanPrice?: number; /** Transaction ID for grouping orders from the same buyer cart */ orderUid?: string; /** Seller article */ article?: string; /** Color code (only for tintable products) */ colorCode?: string; /** Unique order ID (corresponds to srid in other report endpoints) */ rid?: string; /** Order creation date (RFC3339) */ createdAt?: string; /** List of offices where the product should be delivered */ offices?: string[]; /** List of barcodes */ skus?: string[]; /** Assembly order ID */ id?: number; /** Seller warehouse ID that received the order */ warehouseId?: number; /** WB warehouse ID linked to the seller warehouse */ officeId?: number; /** WB article number */ nmId?: number; /** Product size ID in the WB system */ chrtId?: number; /** Price in sale currency with all discounts except WB Wallet, multiplied by 100 */ price?: number; /** Amount to be paid by buyer in sale currency with all discounts, multiplied by 100 */ finalPrice?: number; /** Price in seller's country currency with all discounts except WB Wallet, multiplied by 100 */ convertedPrice?: number; /** Amount to be paid by buyer in seller's country currency with all discounts, multiplied by 100 */ convertedFinalPrice?: number; /** Sale currency code (ISO 4217) */ currencyCode?: number; /** Seller's country currency code (ISO 4217) */ convertedCurrencyCode?: number; /** Cargo type: 1 = small, 2 = oversized, 3 = large */ cargoType?: CargoType; /** Cross-border type: 0 = not cross-border, 1 = cross-border */ crossBorderType?: 0 | 1; /** Whether this is a zero-stock order (can be cancelled without penalty) */ isZeroOrder?: boolean; /** Whether you can dispatch the order to a pickup point */ isPickupPointShipmentAllowed?: boolean; /** Order options */ options?: { /** Whether this is a B2B sale */ isB2b?: boolean; }; } /** * Order within a supply (legacy response format) */ export interface SupplyOrder { /** Acceptance price in kopecks; always null for this endpoint */ scanPrice?: number; /** Transaction ID for grouping orders from the same buyer cart */ orderUid?: string; /** Seller article */ article?: string; /** Color code (only for tintable products) */ colorCode?: string; /** Unique order ID (corresponds to srid in other report endpoints) */ rid?: string; /** Order creation date (RFC3339) */ createdAt?: string; /** List of offices where the product should be delivered */ offices?: string[]; /** List of barcodes */ skus?: string[]; /** Assembly order ID */ id?: number; /** Seller warehouse ID that received the order */ warehouseId?: number; /** WB article number */ nmId?: number; /** Product size ID in the WB system */ chrtId?: number; /** Price in sale currency with all discounts except WB Wallet, multiplied by 100 */ price?: number; /** Price in seller's country currency with all discounts except WB Wallet, multiplied by 100 */ convertedPrice?: number; /** Sale currency code (ISO 4217) */ currencyCode?: number; /** Seller's country currency code (ISO 4217) */ convertedCurrencyCode?: number; /** Cargo type: 1 = small, 2 = oversized, 3 = large */ cargoType?: CargoType; /** Whether this is a zero-stock order (can be cancelled without penalty) */ isZeroOrder?: boolean; } /** * Supply box (transport box) entity */ export interface SupplyTrbx { /** Box ID */ id?: string; } /** * Box sticker data with encoded barcode and file content */ export interface TrbxStickers { /** Encoded sticker barcode value */ barcode?: string; /** Full sticker representation in the requested format (base64 encoded) */ file?: string; } /** * Metadata detail item with validation status * Replaces the deprecated `meta` object. Use with `/api/marketplace/v3/orders/meta` endpoint. * @since 3.5.0 */ export interface MetaDetail { /** Metadata type: imei, uin, sgtin, gtin, expiration, customsDeclaration */ key: string; /** Metadata value (empty string if not filled) */ value: string; /** Validation decision. Known values: 'filled' (value set), 'optional' (not required), 'required' (must fill before deliver), 'invalid' (value failed validation). * * When WB's B2C marking validation is not yet available for a seller, only 'filled'/'optional'/'required' are returned for sgtin; when available, the full status set is returned (non-exhaustive). See WB release-notes?id=513. */ decision: string; } /** * Warehouse office data for seller pass registration */ export interface PassOffice { /** Office name */ name?: string; /** Office address */ address?: string; /** Office ID */ id?: number; } /** * Seller pass for warehouse access */ export interface Pass { /** Driver first name */ firstName?: string; /** Pass expiration date */ dateEnd?: string; /** Driver last name */ lastName?: string; /** Car model */ carModel?: string; /** Car number */ carNumber?: string; /** Warehouse name */ officeName?: string; /** Warehouse address */ officeAddress?: string; /** Warehouse ID */ officeId?: number; /** Pass ID */ id?: number; } /** * Client information for cross-border orders from Turkey */ export interface CrossborderTurkeyClientInfo { /** Client first name */ firstName?: string; /** Full name (last, first, middle) */ fullName?: string; /** Client last name */ lastName?: string; /** Client middle name */ middleName?: string; /** Order ID */ orderID?: number; /** Client phone number */ phone?: string; /** Not used */ phoneCode?: string; } /** * Response wrapper for cross-border Turkey client information */ export interface CrossborderTurkeyClientInfoResp { /** Client info entries for cross-border orders from Turkey */ orders?: CrossborderTurkeyClientInfo[]; } /** * Order IDs within a supply (v3 schema) * Maps to swagger schema: v3.SupplyOrderIDsAPI */ export interface SupplyOrderIDsAPI { /** List of assembly order IDs */ orderIds?: number[]; } /** * Response containing metadata for multiple orders (v3 schema) * Maps to swagger schema: v3.OrdersMetaAPI */ export interface OrdersMetaAPI { /** List of order metadata entries */ orders?: OrderMetaAPI[]; } /** * Single order metadata entry (v3 schema) * Maps to swagger schema: v3.OrderMetaAPI */ export interface OrderMetaAPI { /** Assembly order ID */ id?: number; /** Metadata details with validation status */ metaDetails?: MetaDetail[]; } /** * API error response (v3 schema) * Maps to swagger schema: v3.APIError */ export interface APIError { /** Error code */ code?: string; /** Error description */ message?: string; /** Additional error data */ data?: Record; } /** * WB v3 APIErrorV2 envelope -- the newer V2 error shape returned by some v3 endpoints * (e.g. 400/403 responses). Maps to swagger schema: v3.APIErrorV2. * * Unlike the legacy {@link APIError} ({code,message,data}), this envelope surfaces * structured per-field errors via `errors[]` and a human-readable `title`/`detail`. */ export interface APIErrorV2 { /** Error title (required) */ title: string; /** Error details (required) */ detail: string; /** Structured per-field errors (location/message/value) */ errors?: unknown[]; /** WB internal service ID */ origin?: string; /** Unique request ID */ requestId?: string; /** HTTP status code */ status?: number; /** Error code */ code?: string; } /** * Price information for an archived FBS order * Maps to swagger schema: v3.ArchiveOrderPriceInfo */ export interface ArchiveOrderPriceInfo { /** Currency code of the converted price */ convertedCurrencyCode: number; /** Price converted into the reporting currency */ convertedPrice: number; /** Currency code of the original price */ currencyCode: number; /** Original product price */ price: number; } /** * Product details for an archived FBS order * Maps to swagger schema: v3.ArchiveOrderProduct */ export interface ArchiveOrderProduct { /** Seller's article (vendor code) */ article: string; /** Charter ID (size identifier) */ chrtId: number; /** Wildberries nomenclature ID (nmId) */ nmId: number; /** Barcodes (SKUs) of the size */ skus: string[]; } /** * Status information for an archived FBS order * Maps to swagger schema: v3.ArchiveOrderStatus */ export interface ArchiveOrderStatus { /** Supplier-side order status */ supplierStatus: string; /** Wildberries-side order status */ wbStatus: string; } /** * A single archived FBS assembly order * Maps to swagger schema: v3.ArchiveOrder */ export interface ArchiveOrder { /** Cargo type: 'mgt' (small), 'sgt' (medium), 'kgtPlus' (large+) */ cargoType: 'mgt' | 'sgt' | 'kgtPlus'; /** Color code, or null when not applicable */ colorCode: string | null; /** Order creation timestamp (ISO 8601) */ createdAt: string; /** Cross-border delivery details, or null for non-cross-border orders */ crossBorder: { parcel?: string; } | null; /** Cross-border type: 'local' (domestic) or 'crossBorder' */ crossBorderType: 'local' | 'crossBorder'; /** Numeric order identifier */ id: number; /** Whether this is a zero-price (free) order */ isZeroOrder: boolean; /** Additional metadata details */ metaDetails: unknown[]; /** Order-level options */ options: { isB2B?: boolean; }; /** Unique order UID */ orderUid: string; /** Price information for the order */ priceInfo: ArchiveOrderPriceInfo; /** Product details for the order */ product: ArchiveOrderProduct; /** Request ID (rid) for tracing */ rid: string; /** Scan price, or null when not applicable */ scanPrice: number | null; /** Supplier and WB statuses */ status: ArchiveOrderStatus; /** Sticker (label) ID assigned to the order */ stickerId: number; /** Supply ID the order is bound to, or null when not bound */ supplyId: string | null; /** Warehouse ID the order is fulfilled from */ warehouseId: number; } /** * Response for GET /api/marketplace/v3/fbs/orders/archive * Maps to swagger schema: v3.ArchiveOrdersResponse */ export interface ArchiveOrdersResponse { /** Pagination cursor for the next page, or null when the archive is exhausted */ next: number | null; /** List of archived FBS orders for the current page */ orders: ArchiveOrder[]; } /** * Query parameters for GET /api/marketplace/v3/fbs/orders/archive * Maps to swagger schema: v3.ArchiveOrdersParams */ export interface ArchiveOrdersParams { /** Year of the archive period */ year: number; /** Month of the archive period (1-12) */ month: number; /** Pagination cursor (0 for the first page) */ next: number; /** Maximum number of orders to return per page */ limit: number; /** Index signature for compatibility with Record */ [key: string]: unknown; } /** * SPOT status — stage of the DOPP (Declaration of Upcoming Supply) formation. * Maps to swagger schema: SupplySpotData.status */ export type SpotStatus = 'pending' | 'completed' | 'failed'; /** OKSM (All-Russian Classifier of World Countries) country entry */ export interface SpotCountry { /** Country code in the OKSM classifier (3 digits) */ code: string; /** Country full name */ name: string; } /** * Response for GET /api/marketplace/v3/fbs/dictionaries/countries/oksm * Maps to swagger schema: CountriesOKSMList */ export interface SpotCountriesResponse { /** OKSM countries list */ countries: SpotCountry[]; } /** * Request body for adding SPOT data to a supply. * Maps to the inline request body of PUT /api/marketplace/v3/fbs/supplies/{supplyId}/spot */ export interface SupplySpotRequest { /** Carrier name (1-1000 chars) */ carrierName: string; /** Carrier tax number (1-50 chars) */ carrierTaxNumber: string; /** Carrier country code in the OKSM classifier (exactly 3 digits) — see `getSpotCountries()` */ carrierCountryCode: string; /** Vehicle registration number (1-30 chars) */ vehicleRegistrationNumber: string; /** Trailer registration number (1-30 chars) */ trailerRegistrationNumber?: string; } /** * Request body for getting SPOT data for a list of supplies. * Maps to the inline request body of POST /api/marketplace/v3/fbs/supplies/spot/list */ export interface SuppliesSpotListRequest { /** Supply IDs list (1-100 items) */ supplyIds: string[]; } /** * Per-supply error entry returned when SPOT data cannot be provided. * Maps to swagger schema: ApiErrorV3 */ export interface SupplySpotError { /** Error title (e.g. 'NotFound', 'SpotActionNotAllowed') */ title: string; /** Error details */ detail: string; } /** * SPOT data for a single supply — echo of the data submitted via * `updateSupplySpot()` plus the DOPP formation status. * Maps to swagger schema: SupplySpotData */ export interface SupplySpotData { /** * DOPP formation status: * - `pending` — waiting for the DOPP (Declaration of Upcoming Supply) formation result * - `completed` — DOPP formed successfully; the QR code can be fetched via `getSupplySpotStickers()` * - `failed` — DOPP formation error; see `errorCode` */ status: SpotStatus; /** Carrier name */ carrierName: string; /** Carrier tax number */ carrierTaxNumber: string; /** Carrier country code in the OKSM classifier */ carrierCountryCode: string; /** Vehicle registration number */ vehicleRegistrationNumber: string; /** Trailer registration number */ trailerRegistrationNumber?: string; /** DOPP formation service error code; present when `status` is `failed`. Fix the SPOT data and re-submit via `updateSupplySpot()` */ errorCode?: 'doppFailed'; } /** * Per-supply entry in the SPOT data list response. * Maps to swagger schema: SupplySpotDataResponse.supplies items */ export interface SupplySpotItem { /** Supply ID */ id: string; /** SPOT data; absent when the request failed for this supply (see `error`) */ spot?: SupplySpotData; /** Error details when SPOT data could not be returned for this supply */ error?: SupplySpotError; } /** * Response for POST /api/marketplace/v3/fbs/supplies/spot/list * Maps to swagger schema: SupplySpotDataResponse */ export interface SuppliesSpotListResponse { /** SPOT data per requested supply */ supplies: SupplySpotItem[]; } /** * Response for GET /api/marketplace/v3/fbs/supplies/{supplyId}/stickers/spot * Maps to swagger schema: SupplySpotQRCode */ export interface SupplySpotStickerResponse { /** Supply SPOT QR code in PNG format, base64 encoded */ qrCode: string; } /** * Type of items a shipping point can accept: * - `1` — small-sized items * - `2` — over dimensional cargo (ODC) * - `3` — dimensional cargo+ (CD+) * Maps to swagger schema: ShippingPoint.cargoTypes items */ export type ShippingPointCargoType = 1 | 2 | 3; /** * Shipping point type: * - `sc` — sorting center * - `sw` — warehouse * - `pp` — pickup point * Maps to swagger schema: ShippingPoint.officeType */ export type ShippingPointOfficeType = 'sc' | 'sw' | 'pp'; /** * Supply shipping point — the point the supply is shipped to. * Maps to swagger schema: ShippingPoint */ export interface ShippingPoint { /** Shipping point ID — use as `shippingPointId` in `updateShippingMethod()` */ id: number; /** Name (e.g. 'Москва Морской') */ name: string; /** Address (e.g. 'г Москва, Морской Проспект 54') */ address: string; /** Locality */ city: string; /** Shipping point type (sorting center / warehouse / pickup point) */ officeType: ShippingPointOfficeType; /** Types of items this shipping point can accept */ cargoTypes: ShippingPointCargoType[]; /** Latitude */ latitude: number; /** Longitude */ longitude: number; /** * Whether the **Fulfillment in SC** service for FBS supplies is available * at this shipping point */ fulfillment: boolean; } /** * Query parameters for GET /api/marketplace/v3/fbs/shipping-points * Maps to the inline parameters of the shipping-points operation */ export interface ShippingPointsParams { /** Locality for shipping the supply, Cyrillic (e.g. 'Москва') */ city: string; /** Type of items the shipping point must accept: 1 small-sized, 2 ODC, 3 CD+ */ cargoType: ShippingPointCargoType; /** Index signature for compatibility with Record */ [key: string]: unknown; } /** * Response for GET /api/marketplace/v3/fbs/shipping-points * Maps to swagger schema: ShippingPointsResponse */ export interface ShippingPointsResponse { /** Shipping points list */ shippingPoints: ShippingPoint[]; } /** * Shipping point type for the per-supply shipping-points method: * - `sc` — sorting center * - `sw` — warehouse * - `pp` — pickup point * - `pfc` — partner fulfillment center * - `gpp` — items acceptance point * @see task-240 */ export type SupplyShippingPointOfficeType = 'sc' | 'sw' | 'pp' | 'pfc' | 'gpp'; /** * Supply shipping point returned by the per-supply shipping-points method — * the points available for the SPECIFIED supply. Unlike the deprecated * global {@link ShippingPoint}: no `cargoTypes` filter (per-supply availability * replaces it), `officeType` adds `pfc`/`gpp`, and each point reports whether * it is available for this supply (`available`). * Maps to swagger schema: SupplyShippingPoint * @see task-240 */ export interface SupplyShippingPoint { /** Shipping point ID — use as `shippingPointId` in `updateShippingMethod()` */ id: number; /** Name (e.g. 'Москва Морской') */ name: string; /** Address (e.g. 'г Москва, Морской Проспект 54') */ address: string; /** Locality */ city: string; /** Shipping point type (sorting center / warehouse / pickup point / partner fulfillment center / items acceptance point) */ officeType: SupplyShippingPointOfficeType; /** Latitude */ latitude: number; /** Longitude */ longitude: number; /** * Whether the **Fulfillment in SC** service for FBS supplies is available * at this shipping point */ fulfillment: boolean; /** * Whether the shipping point is available for this supply. `false` for a * pickup point overloaded on the planned supply shipping date */ available: boolean; } /** * Query parameters for GET /api/marketplace/v3/fbs/supplies/{supplyId}/shipping-points * @see task-240 */ export interface SupplyShippingPointsParams { /** Locality for shipping the supply, Cyrillic (e.g. 'Москва') */ city: string; /** * Shipping point types to return — comma-separated list of * `sc`, `sw`, `pp`, `pfc`, `gpp` (e.g. 'sc,pp') */ officeType: string; /** * Planned supply shipping date (`YYYY-MM-DD`). Required for supplies of * small-sized items (`cargoType: 1`) and dimensional cargo+ (`cargoType: 3`); * when passed, only points that can ship the supply on that date are returned */ shippingDt?: string; /** Index signature for compatibility with Record */ [key: string]: unknown; } /** * Response for GET /api/marketplace/v3/fbs/supplies/{supplyId}/shipping-points * Maps to swagger schema: SupplyShippingPointsResponse * @see task-240 */ export interface SupplyShippingPointsResponse { /** Shipping points list for the supply */ shippingPoints: SupplyShippingPoint[]; } /** * Type of shipping to the shipping point: * - `selfShipping` — shipping at the seller's expense * - `transportCompany` — delivery via a transport company. For this shipping type the * electronic waybill ID (ETrN) must also be attached to the supply — * see `updateSuppliesWaybill()` * Maps to swagger schema: UpdateSupplyShippingMethod.shippingType */ export type SupplyShippingType = 'selfShipping' | 'transportCompany'; /** * Per-supply shipping parameters entry. * Maps to swagger schema: UpdateSupplyShippingMethod */ export interface UpdateSupplyShippingMethod { /** Supply ID */ supplyId: string; /** Planned supply shipping date, format `YYYY-MM-DD` */ shippingDt: string; /** Shipping point ID — get it via `getSupplyShippingPoints()` */ shippingPointId: number; /** Type of shipping to the shipping point */ shippingType: SupplyShippingType; } /** * Request body for PATCH /api/marketplace/v3/fbs/supplies/shipping-method * Maps to swagger schema: UpdateSuppliesShippingMethodRequest */ export interface UpdateSuppliesShippingMethodRequest { /** Supply shipping parameters (1-100 items); the result is returned per supply */ data: UpdateSupplyShippingMethod[]; } /** * Per-supply error entry in the shipping-method response. * Maps to swagger schema: ReplyBatchError */ export interface SupplyShippingMethodError { /** Error code (e.g. 400, 404, 409) */ code: number; /** Additional error data (e.g. 'NotFound', 'SupplyAlreadyScanned', 'InvalidShippingDt') */ detail: string; } /** * Per-supply processing result. * Maps to swagger schema: UpdatedSupplies */ export interface UpdatedSupplies { /** Supply ID */ supplyId: string; /** Whether the request was processed successfully for this supply. Can only be `true` */ success?: boolean; /** Error details when the request failed for this supply */ error?: SupplyShippingMethodError; } /** * Response for PATCH /api/marketplace/v3/fbs/supplies/shipping-method * Maps to swagger schema: UpdateSuppliesResponse */ export interface UpdateSuppliesResponse { /** Processing result for each requested supply */ results: UpdatedSupplies[]; } /** * Per-supply electronic waybill (ETrN) entry. * Maps to swagger schema: UpdateSupplyWaybill */ export interface UpdateSupplyWaybill { /** Supply ID */ supplyId: string; /** Electronic waybill (ETrN) ID, UUID format */ waybillUuid: string; } /** * Request body for PATCH /api/marketplace/v3/fbs/supplies/waybill * Maps to swagger schema: UpdateSuppliesWaybill */ export interface UpdateSuppliesWaybillRequest { /** Electronic waybill (ETrN) data (1-100 items); the result is returned per supply */ data: UpdateSupplyWaybill[]; } //# sourceMappingURL=orders-fbs.types.d.ts.map