Skip to content

Add Items to Draft ​

http
POST /api/supplies/v1/drafts/{draftId}/items

Base URL: https://supplies-api.wildberries.ru · Module: orders-fbw · Section: Supply Drafts · Specification doc ↗

Method is available by Personal token, Service token

Adds items to the specified supply draft.

The method works on the principle of atomicity:

  • if all skus are successfully validated, all items will be added to the draft. The response will return {"results":[]}
  • if at least one sku is not validated, no items will be added to the draft. The response will return a list of invalid skus

Request limit per one seller account:

PeriodLimitIntervalBurst
1 min30 requests2 s10 requests

Parameters ​

NameInTypeReq.Description
draftIdpathstringyesDraft ID

Request body ​

application/json — schema models.DraftAdditemsRequest, required

  • items models.Item[] (required) — Items list
    • quantity integer<int64> (required) — Item quantity
    • sku string (required) — SKU specified in the listing

Responses ​

CodeDescriptionSchema
200Successmodels.DraftAddItemsErrorResponse
400Bad requesterrors.DraftError
401Unauthorizedobject
402Payment requiredobject
403Access deniedResponse4XX
404Not founderrors.DraftError
429Too many requestsobject

Structure 200:

  • results models.DraftAddItemsResultItem[] — List of invalid SKUs with errors
    • error object — Error detail
      • detail string — Error details
      • title string — Error title
    • sku string — SKU

Structure 400:

  • status integer<int64> — HTTP status code
  • title string — Error title
  • detail string — Error details
  • requestId string — Unique request ID
  • origin string — Service name

Structure 401:

  • title string — Error title
  • detail string — Error details
  • code string — Internal error code
  • requestId string — Unique request ID
  • origin string — WB internal service ID
  • status number — HTTP status code
  • statusText string — Text of the HTTP status code
  • timestamp string — Request date and time

Structure 402:

Structure 403:

  • title string — Error title
  • detail string — Error details
  • code string — Internal error code
  • requestId string — Request ID
  • origin string — WB internal service ID
  • status number — HTTP status code
  • statusText string — Text of the HTTP status code
  • timestamp string — Request date and time

Structure 404:

  • status integer<int64> — HTTP status code
  • title string — Error title
  • detail string — Error details
  • requestId string — Unique request ID
  • origin string — Service name

Structure 429:

  • title string — Error title
  • detail string — Error details
  • code string — Internal error code
  • requestId string — Unique request ID
  • origin string — WB internal service ID
  • status number — HTTP status code
  • statusText string — Text of the HTTP status code
  • timestamp string — Request date and time

Call examples ​

Arguments are shown as parameter names — substitute your own values. Languages whose client does not expose this operation are omitted.

python
from wb_api_client.orders_fbw import Configuration, ApiClient
from wb_api_client.orders_fbw.api import OrdersFbwApi

cfg = Configuration(access_token="<your WB JWT>")
api = OrdersFbwApi(ApiClient(cfg))

result = api.post_v1_drafts_draft_id_items(draft_id=..., models_draft_additems_request=...)
print(result)
ts
import {
  Configuration,
  OrdersFbwApi,
} from "@valeryverkhoturov/wb-api-client/orders-fbw";

const cfg = new Configuration({});
cfg.setAccessToken("<your WB JWT>");
const api = new OrdersFbwApi(cfg);

const { data } = await api.postV1DraftsDraftIdItems(draftId, modelsDraftAdditemsRequest);
console.log(data);
go
import (
	"context"
	"fmt"

	wbordersfbw "github.com/ValeryVerkhoturov/wb-api-client-go/orders_fbw"
)

cfg := wbordersfbw.NewConfiguration()
cfg.SetAccessToken("<your WB JWT>")
client := wbordersfbw.NewAPIClient(cfg)

result, _, err := client.OrdersFbwAPI.PostV1DraftsDraftIdItems(context.Background(), draftId).ModelsDraftAdditemsRequest(modelsDraftAdditemsRequest).Execute()
if err != nil {
    panic(err)
}
fmt.Printf("%+v\n", result)
java
import io.github.valeryverkhoturov.wbapi.orders_fbw.ApiClient;
import io.github.valeryverkhoturov.wbapi.orders_fbw.SecretString;
import io.github.valeryverkhoturov.wbapi.orders_fbw.api.OrdersFbwApi;

ApiClient client = new ApiClient();
client.setAccessToken(new SecretString("<your WB JWT>"));
OrdersFbwApi api = new OrdersFbwApi(client);

System.out.println(api.postV1DraftsDraftIdItems(draftId, modelsDraftAdditemsRequest));
php
use ValeryVerkhoturov\WbApiClient\OrdersFbw\Configuration;
use ValeryVerkhoturov\WbApiClient\OrdersFbw\SecretString;
use ValeryVerkhoturov\WbApiClient\OrdersFbw\Api\OrdersFbwApi;
use GuzzleHttp\Client;

$config = (new Configuration())
    ->setAccessTokenSecret(new SecretString('<your WB JWT>'));
$api = new OrdersFbwApi(new Client(), $config);

print_r($api->postV1DraftsDraftIdItems($draft_id, $models_draft_additems_request));
bsl
#Использовать "wb-api-client"

Настройки = Новый Конфигурация();
Настройки.УстановитьТокен("<your WB JWT>");
Клиент = Новый OrdersFbwApi(Настройки);

Сообщить(Клиент.PostV1DraftsDraftIdItems(draftId, Тело).Тело);
csharp
using ValeryVerkhoturov.WbApiClient.OrdersFbw.Api;
using ValeryVerkhoturov.WbApiClient.OrdersFbw.Client;

var config = new Configuration();
config.AccessTokenSecret = new SecretString("<your WB JWT>");
var api = new OrdersFbwApi(config);

Console.WriteLine(api.PostV1DraftsDraftIdItems(draftId, modelsDraftAdditemsRequest));
rust
use wb_api_client::orders_fbw::apis::{configuration::Configuration, orders_fbw_api};

#[tokio::main]
async fn main() {
    let mut cfg = Configuration::new();
    cfg.set_access_token("<your WB JWT>");

    let result = orders_fbw_api::post_v1_drafts_draft_id_items(&cfg, draft_id, models_period_draft_additems_request).await;
    println!("{:#?}", result);
}