Список товаров для участия в акции¶
GET /api/v1/calendar/promotions/nomenclatures
Метод формирует список товаров, подходящих для участия в акции. Эти товары можно добавить в акцию с помощью отдельного метода.
Данный метод неприменим для автоакций.
Лимит запросов на один профиль продавца для всех методов категории Календарь акций:
| Период | Лимит | Интервал | Всплеск |
|---|---|---|---|
| 6 сек | 10 запросов | 600 мс | 5 запросов |
Параметры¶
| Имя | Расположение | Тип | Обязательный | Описание |
|---|---|---|---|---|
| promotionID | query | integer | да | ID акции |
| inAction | query | boolean | да | Участвует в акции: - true — да - false — нет |
| limit | query | integer | нет | Количество запрашиваемых товаров |
| offset | query | integer | нет | После какого элемента выдавать данные |
Примеры вызова¶
import { Configuration, DefaultApi } from 'wildberries-sdk';
const api = new DefaultApi(new Configuration({
basePath: 'https://dp-calendar-api.wildberries.ru',
apiKey: process.env.WB_API_TOKEN,
}));
const result = await api.getV1CalendarPromotionsNomenclatures({ promotionID: ..., inAction: ... });
console.log(result);
<?php
$config = Wildberries\Sdk\Promotion\Configuration::getDefaultConfiguration()
->setApiKey('Authorization', getenv('WB_API_TOKEN'))
->setHost('https://dp-calendar-api.wildberries.ru');
$api = new Wildberries\Sdk\Promotion\Api\DefaultApi(new GuzzleHttp\Client(), $config);
$result = $api->getV1CalendarPromotionsNomenclatures(..., ...);
use wildberries_sdk_promotion::apis::{configuration::Configuration, configuration::ApiKey, default_api};
let mut config = Configuration::new();
config.base_path = "https://dp-calendar-api.wildberries.ru".to_owned();
config.api_key = Some(ApiKey { prefix: None, key: std::env::var("WB_API_TOKEN").unwrap() });
let result = default_api::get_v1_calendar_promotions_nomenclatures(&config, ...).await?;