Skip to content

Список чатов ​

http
GET /api/v1/seller/chats

База: https://buyer-chat-api.wildberries.ru · Модуль: communications · Раздел: Чат с покупателями · Документация спецификации ↗

Метод возвращает список всех чатов продавца. По этим данным можно получить события чатов или отправить сообщение покупателю.

Лимит запросов на один профиль продавца:

ТипПериодЛимитИнтервалВсплеск
Персональный10 сек10 запросов1 сек10 запросов
Сервисный10 сек10 запросов1 сек10 запросов
Базовый с секретом10 сек10 запросов1 сек10 запросов
Базовый1 ч1 запрос1 ч1 запрос

Ответы ​

КодОписаниеСхема
200УспешноChatsResponse
401Не авторизованobject
402Требуется платёжobject
403Доступ запрещёнobject
429Слишком много запросовobject

Структура 200:

Структура 401:

  • title string — Заголовок ошибки
  • detail string — Детали ошибки
  • code string — Внутренний код ошибки
  • requestId string — Уникальный ID запроса
  • origin string — ID внутреннего сервиса WB
  • status number — HTTP статус-код
  • statusText string — Расшифровка HTTP статус-кода
  • timestamp string — Дата и время запроса

Структура 402:

Структура 403:

  • title string — Заголовок ошибки
  • detail string — Детали ошибки
  • code string — Внутренний код ошибки
  • requestId string — ID запроса
  • origin string — ID внутреннего сервиса WB
  • status number — HTTP статус-код
  • statusText string — Расшифровка HTTP статус-кода
  • timestamp string — Дата и время запроса

Структура 429:

  • title string — Заголовок ошибки
  • detail string — Детали ошибки
  • code string — Внутренний код ошибки
  • requestId string — Уникальный ID запроса
  • origin string — ID внутреннего сервиса WB
  • status number — HTTP статус-код
  • statusText string — Расшифровка HTTP статус-кода
  • timestamp string — Дата и время запроса

Примеры вызова ​

Аргументы показаны именами параметров — подставьте свои значения. Языки, в клиенте которых этой операции нет, не показаны.

python
from wb_api_client.communications import Configuration, ApiClient
from wb_api_client.communications.api import CommunicationsApi

cfg = Configuration(access_token="<ваш JWT WB>")
api = CommunicationsApi(ApiClient(cfg))

result = api.get_v1_seller_chats()
print(result)
ts
import {
  Configuration,
  CommunicationsApi,
} from "@valeryverkhoturov/wb-api-client/communications";

const cfg = new Configuration({});
cfg.setAccessToken("<ваш JWT WB>");
const api = new CommunicationsApi(cfg);

const { data } = await api.getV1SellerChats();
console.log(data);
go
import (
	"context"
	"fmt"

	wbcommunications "github.com/ValeryVerkhoturov/wb-api-client-go/communications"
)

cfg := wbcommunications.NewConfiguration()
cfg.SetAccessToken("<ваш JWT WB>")
client := wbcommunications.NewAPIClient(cfg)

result, _, err := client.CommunicationsAPI.GetV1SellerChats(context.Background()).Execute()
if err != nil {
    panic(err)
}
fmt.Printf("%+v\n", result)
java
import io.github.valeryverkhoturov.wbapi.communications.ApiClient;
import io.github.valeryverkhoturov.wbapi.communications.SecretString;
import io.github.valeryverkhoturov.wbapi.communications.api.CommunicationsApi;

ApiClient client = new ApiClient();
client.setAccessToken(new SecretString("<ваш JWT WB>"));
CommunicationsApi api = new CommunicationsApi(client);

System.out.println(api.getV1SellerChats());
php
use ValeryVerkhoturov\WbApiClient\Communications\Configuration;
use ValeryVerkhoturov\WbApiClient\Communications\SecretString;
use ValeryVerkhoturov\WbApiClient\Communications\Api\CommunicationsApi;
use GuzzleHttp\Client;

$config = (new Configuration())
    ->setAccessTokenSecret(new SecretString('<ваш JWT WB>'));
$api = new CommunicationsApi(new Client(), $config);

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

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

Сообщить(Клиент.GetV1SellerChats().Тело);
csharp
using ValeryVerkhoturov.WbApiClient.Communications.Api;
using ValeryVerkhoturov.WbApiClient.Communications.Client;

var config = new Configuration();
config.AccessTokenSecret = new SecretString("<ваш JWT WB>");
var api = new CommunicationsApi(config);

Console.WriteLine(api.GetV1SellerChats());
rust
use wb_api_client::communications::apis::{configuration::Configuration, communications_api};

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

    let result = communications_api::get_v1_seller_chats(&cfg).await;
    println!("{:#?}", result);
}

Распространяется под лицензией Apache 2.0.