Skip to content

Set Item Recommendations ​

http
POST /api/content/v1/recommendations/set

Base URL: https://content-api.wildberries.ru · Module: items · Section: Recommendations · Specification doc ↗

Method is available by Personal token, Service token

The method updates, adds or delete item recommendations.

Request limit per one seller account:

PeriodLimitIntervalBurst
1 min100 requests600 ms5 requests

Request body ​

application/json — schema SetRecomReq, required

  • recList object[] (required) — Item recommendations list
    • nmId integer<int64> — WB item number
    • recommendations object[] — Recommended items. Specify the recomNm of the items to add them to the recommendations for the specified nmId. Sending an empty array [] will delete all current recommendations for the specified nmId.
      • recomNm integer<int64> — Recommended item WB number
      • sort integer<int64> — Position of the item in the recommendations list. Allowed values: - 1–20 — fixed position: - when creating or replacing (replace: true) sets the display order - when adding (replace: false) inserts the item at the specified position, existing ones are shifted - 0 — automatic sorting: - when creating or replacing (replace: true) — according to the order of items in the recommendations array - when adding (replace: false) — at the end of the existing recommendations list, preserving the order from the recommendations array
  • replace boolean — Requested action: - false — add new recommendations to the current ones - true — replace current recommendations with the new ones

Responses ​

CodeDescriptionSchema
200SuccessSetRecomRes
208Already reportedresponse208SetRecom
400Bad requestresponse400SetRecom
401Unauthorizedobject
402Payment requiredobject
403Access deniedResponse4XX
429Too many requestsobject

Structure 200:

  • isError boolean — Are there any errors: - false — No errors, completely successful - true — There are errors
  • errors object[] — Errors. If "isError":true
    • mainNm string — The nmId parameter value
    • recomNm string — The recomNm parameter value
    • message string — Error message

Structure 208:

  • requestId string — Request ID
  • origin string — WB internal service ID
  • title string — Response title
  • detail string — Response details

Structure 400:

  • requestId string — Request ID
  • origin string — WB internal service ID
  • title string — Error title
  • detail string — Error details

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 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.items import Configuration, ApiClient
from wb_api_client.items.api import ItemsApi

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

result = api.post_v1_recommendations_set(set_recom_req=...)
print(result)
ts
import {
  Configuration,
  ItemsApi,
} from "@valeryverkhoturov/wb-api-client/items";

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

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

	wbitems "github.com/ValeryVerkhoturov/wb-api-client-go/items"
)

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

result, _, err := client.ItemsAPI.PostV1RecommendationsSet(context.Background()).SetRecomReq(setRecomReq).Execute()
if err != nil {
    panic(err)
}
fmt.Printf("%+v\n", result)
java
import io.github.valeryverkhoturov.wbapi.items.ApiClient;
import io.github.valeryverkhoturov.wbapi.items.SecretString;
import io.github.valeryverkhoturov.wbapi.items.api.ItemsApi;

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

System.out.println(api.postV1RecommendationsSet(setRecomReq));
php
use ValeryVerkhoturov\WbApiClient\Items\Configuration;
use ValeryVerkhoturov\WbApiClient\Items\SecretString;
use ValeryVerkhoturov\WbApiClient\Items\Api\ItemsApi;
use GuzzleHttp\Client;

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

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

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

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

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

Console.WriteLine(api.PostV1RecommendationsSet(setRecomReq));
rust
use wb_api_client::items::apis::{configuration::Configuration, items_api};

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

    let result = items_api::post_v1_recommendations_set(&cfg, set_recom_req).await;
    println!("{:#?}", result);
}