Get Seller Portal News
http
GET /api/communications/v2/newsBase URL: https://common-api.wildberries.ru · Module: general · Section: Communications API · Specification doc ↗
The method allows getting news from the seller portal.
To receive a successful response, one of the parameters from or fromID must be specified.
You can get up to 100 news items per request.
Request limit per one seller account:
| Type | Period | Limit | Interval | Burst |
|---|---|---|---|---|
| Personal | 1 min | 1 request | 1 min | 10 requests |
| Service | 1 min | 1 request | 1 min | 10 requests |
| Base with secret | 1 min | 1 request | 1 min | 10 requests |
| Base | 1 h | 1 request | 1 h | 1 request |
Parameters
| Name | In | Type | Req. | Description |
|---|---|---|---|---|
from | query | string | no | Date from which to get news |
fromID | query | integer<int64> | no | The news ID, starting from which — including it — you need to get the list of news |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Success | GetV2NewsResponse200 |
400 | Bad request | — |
401 | Unauthorized | object |
429 | Too many requests | object |
Structure 200:
dataobject[]— News datacontentstring<plaintext>— News textdatestring— News publication date and timeheaderstring— News headeridinteger<int64>— News IDtypesobject[]— News tagsidinteger<int64>— Tag IDnamestring— Tag name
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 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.general import Configuration, ApiClient
from wb_api_client.general.api import GeneralApi
cfg = Configuration(access_token="<your WB JWT>")
api = GeneralApi(ApiClient(cfg))
result = api.get_v2_news(var_from=..., from_id=...)
print(result)ts
import {
Configuration,
GeneralApi,
} from "@valeryverkhoturov/wb-api-client/general";
const cfg = new Configuration({});
cfg.setAccessToken("<your WB JWT>");
const api = new GeneralApi(cfg);
const { data } = await api.getV2News(from, fromID);
console.log(data);go
import (
"context"
"fmt"
wbgeneral "github.com/ValeryVerkhoturov/wb-api-client-go/general"
)
cfg := wbgeneral.NewConfiguration()
cfg.SetAccessToken("<your WB JWT>")
client := wbgeneral.NewAPIClient(cfg)
result, _, err := client.GeneralAPI.GetV2News(context.Background()).Execute()
if err != nil {
panic(err)
}
fmt.Printf("%+v\n", result)java
import io.github.valeryverkhoturov.wbapi.general.ApiClient;
import io.github.valeryverkhoturov.wbapi.general.SecretString;
import io.github.valeryverkhoturov.wbapi.general.api.GeneralApi;
ApiClient client = new ApiClient();
client.setAccessToken(new SecretString("<your WB JWT>"));
GeneralApi api = new GeneralApi(client);
System.out.println(api.getV2News(from, fromID));php
use ValeryVerkhoturov\WbApiClient\General\Configuration;
use ValeryVerkhoturov\WbApiClient\General\SecretString;
use ValeryVerkhoturov\WbApiClient\General\Api\GeneralApi;
use GuzzleHttp\Client;
$config = (new Configuration())
->setAccessTokenSecret(new SecretString('<your WB JWT>'));
$api = new GeneralApi(new Client(), $config);
print_r($api->getV2News());bsl
#Использовать "wb-api-client"
Настройки = Новый Конфигурация();
Настройки.УстановитьТокен("<your WB JWT>");
Клиент = Новый GeneralApi(Настройки);
Сообщить(Клиент.GetV2News().Тело);csharp
using ValeryVerkhoturov.WbApiClient.General.Api;
using ValeryVerkhoturov.WbApiClient.General.Client;
var config = new Configuration();
config.AccessTokenSecret = new SecretString("<your WB JWT>");
var api = new GeneralApi(config);
Console.WriteLine(api.GetV2News());rust
use wb_api_client::general::apis::{configuration::Configuration, general_api};
#[tokio::main]
async fn main() {
let mut cfg = Configuration::new();
cfg.set_access_token("<your WB JWT>");
let result = general_api::get_v2_news(&cfg, from, from_id).await;
println!("{:#?}", result);
}