Create Campaign
http
POST /adv/v2/seacat/save-adBase URL: https://advert-api.wildberries.ru · Module: promotion · Section: Creating Campaigns · Specification doc ↗
The method creates campaign:
- with custom bid for promo items in search and/or recommendations
- with standard bid for promo items both in search and recommendations
Request limit per one seller account:
| Type | Period | Limit | Interval | Burst |
|---|---|---|---|---|
| Personal | 1 min | 5 requests | 12 s | 5 requests |
| Service | 1 min | 5 requests | 12 s | 5 requests |
| Base with secret | 1 min | 5 requests | 12 s | 5 requests |
| Base | 1 h | 5 requests | 12 min | 1 request |
Request body
application/json — schema object, optional
namestring(required) — Campaign namenmsinteger<int64>[]— Listing for this campaign. You can available listings with listings for campaigns method. Maximum of 50 items (nm)bid_typestring=manual|unified— Bid type: -unified— standard bid -manual— custom bidpayment_typestring=cpm|cpc— Payment type: -cpm— cost per mille -cpc— cost per click. When creating a campaign with this payment type, a minimum bid is automatically setplacement_typesstring[]— Placements: -search— search -recommendations— recommendations Specify for campaign with custom bid only
Responses
| Code | Description | Schema |
|---|---|---|
200 | Success | integer |
400 | Bad request | string |
401 | Unauthorized | object |
403 | Access denied | object |
429 | Too many requests | object |
Structure 401:
titlestring— Error titledetailstring— Error detailscodestring— Internal error coderequestIdstring— Unique request IDoriginstring— WB internal service IDstatusnumber— HTTP status codestatusTextstring— Text of the HTTP status codetimestampstring— Request date and time
Structure 403:
titlestring— Error titledetailstring— Error detailscodestring— Internal error coderequestIdstring— Request IDoriginstring— WB internal service IDstatusnumber— HTTP status codestatusTextstring— Text of the HTTP status codetimestampstring— Request date and time
Structure 429:
titlestring— Error titledetailstring— Error detailscodestring— Internal error coderequestIdstring— Unique request IDoriginstring— WB internal service IDstatusnumber— HTTP status codestatusTextstring— Text of the HTTP status codetimestampstring— 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.promotion import Configuration, ApiClient
from wb_api_client.promotion.api import PromotionApi
cfg = Configuration(access_token="<your WB JWT>")
api = PromotionApi(ApiClient(cfg))
result = api.post_v2_seacat_save_ad(post_v2_seacat_save_ad_request=...)
print(result)ts
import {
Configuration,
PromotionApi,
} from "@valeryverkhoturov/wb-api-client/promotion";
const cfg = new Configuration({});
cfg.setAccessToken("<your WB JWT>");
const api = new PromotionApi(cfg);
const { data } = await api.postV2SeacatSaveAd(postV2SeacatSaveAdRequest);
console.log(data);go
import (
"context"
"fmt"
wbpromotion "github.com/ValeryVerkhoturov/wb-api-client-go/promotion"
)
cfg := wbpromotion.NewConfiguration()
cfg.SetAccessToken("<your WB JWT>")
client := wbpromotion.NewAPIClient(cfg)
result, _, err := client.PromotionAPI.PostV2SeacatSaveAd(context.Background()).Execute()
if err != nil {
panic(err)
}
fmt.Printf("%+v\n", result)java
import io.github.valeryverkhoturov.wbapi.promotion.ApiClient;
import io.github.valeryverkhoturov.wbapi.promotion.SecretString;
import io.github.valeryverkhoturov.wbapi.promotion.api.PromotionApi;
ApiClient client = new ApiClient();
client.setAccessToken(new SecretString("<your WB JWT>"));
PromotionApi api = new PromotionApi(client);
System.out.println(api.postV2SeacatSaveAd(postV2SeacatSaveAdRequest));php
use ValeryVerkhoturov\WbApiClient\Promotion\Configuration;
use ValeryVerkhoturov\WbApiClient\Promotion\SecretString;
use ValeryVerkhoturov\WbApiClient\Promotion\Api\PromotionApi;
use GuzzleHttp\Client;
$config = (new Configuration())
->setAccessTokenSecret(new SecretString('<your WB JWT>'));
$api = new PromotionApi(new Client(), $config);
print_r($api->postV2SeacatSaveAd());bsl
#Использовать "wb-api-client"
Настройки = Новый Конфигурация();
Настройки.УстановитьТокен("<your WB JWT>");
Клиент = Новый PromotionApi(Настройки);
Сообщить(Клиент.PostV2SeacatSaveAd(Тело).Тело);csharp
using ValeryVerkhoturov.WbApiClient.Promotion.Api;
using ValeryVerkhoturov.WbApiClient.Promotion.Client;
var config = new Configuration();
config.AccessTokenSecret = new SecretString("<your WB JWT>");
var api = new PromotionApi(config);
Console.WriteLine(api.PostV2SeacatSaveAd());rust
use wb_api_client::promotion::apis::{configuration::Configuration, promotion_api};
#[tokio::main]
async fn main() {
let mut cfg = Configuration::new();
cfg.set_access_token("<your WB JWT>");
let result = promotion_api::post_v2_seacat_save_ad(&cfg, post_v2_seacat_save_ad_request).await;
println!("{:#?}", result);
}