Listings in Trash
POST /content/v2/get/cards/trashBase URL: https://content-api.wildberries.ru · Module: items · Section: Listings · Specification doc ↗
Returns the listings in trash. To get **more than 100** listings, use pagination.
- Make the first request:
{
"settings": {
"sort": {
"ascending": true
},
"cursor": {
"limit": 100
}
}
}To get only listings that were transferred to the trash after data export, use ascending sorting: "sort":{"ascending":true}. 2. Copy "trashedAt":"\*\*\*","nmID":\*\*\* from the cursor in the response and insert into the cursor of your next request. 3. Make the next request. 4. Repeat 2 and 3 until total value in the response is less than the limit value in the request. This will mean you got all listings. To get only listings that were transferred to the trash after the previous data export:
- Save
"trashedAt":"\*\*\*","nmID":\*\*\*from thecursorof the previous data export. When data export, use ascending sorting:"sort":{"ascending":true}. - Specify the
"cursor":{"trashedAt":"\*\*\*","nmID":"\*\*\*"}saved fields in the first request. Keep using ascending sorting. - Save the
"cursor":{"trashedAt":"\*\*\*","nmID":"\*\*\*"}fields from the last response of the current data export.
Request limit per one seller account for all methods in the Content category:
| Period | Limit | Interval | Burst |
|---|---|---|---|
| 1 min | 100 requests | 600 ms | 5 requests |
| Exceptions are the methods: |
- creating listings
- creating listings with merge
- editing listings
- recovering product card from trash
- getting item recommendation list
- setting item recommendations
In Sandbox — maximum of 1 request per second for all Content methods in total.
Parameters
| Name | In | Type | Req. | Description |
|---|---|---|---|---|
locale | query | string | no | Language for response of the name, value and object fields: - ru — Russian - en — English - zh — Chinese Not used in the sandbox. The sandbox data is returned only in Russian |
Request body
application/json — schema object, required
settingsobject— Settingssortobject— Sorting bytrashedAt— date and time listings were transferred to the trashascendingboolean— Sorting order: -true— ascending -false— descending
cursorobject— Paginatorlimitinteger<int64>— Number of listings in the responsetrashedAtstring— Date and time the listing was transferred to the trashnmIDinteger<int64>— WB item number for the next listing page
filterobject— FilterstextSearchstring— Seller item number, WB item number or SKU to search
Responses
| Code | Description | Schema |
|---|---|---|
200 | Success | PostV2GetCardsTrashResponse200 |
400 | Bad request | responseBodyContentError400 |
401 | Unauthorized | object |
402 | Payment required | object |
403 | Access denied | responseBodyContentError403 |
429 | Too many requests | object |
Structure 200:
cardsobject[]— Requested listingsnmIDinteger<int64>— WB item numbervendorCodestring— Seller item numberkizMarkedboolean— Confirmation that required labeling code Chestny ZNAK is specified: -true— the seller confirms that required labeling code is applied to the item. -false— the seller does not confirm that required labeling code is applied to the item. Passtruein the request to confirm that the item has required labeling code. The item will not pass validation if there is no confirmation from the seller that required labeling code is applied to the item. To check if labeling code Chestny ZNAK is required, use the Listings method, the response fieldneedKizsubjectIDinteger<int64>— Subcategory IDsubjectNamestring— Subcategory namephotosobject[]— Photo arraybigstring— URL of900x1200photoc246x328string— URL of248x328photoc516x688string— URL of516x688photosquarestring— URL of600x600phototmstring— URL of75x100photo
videostring— Video URLwholesaleobject— B2B saleenabledboolean— Is the item intended for sale only to B2B buyers: -true— the item is intended for sale only to B2B buyers -false— the item is intended for sale to B2B and B2C buyersquantumnumber<uint64>— Minimum number of items in one cart of B2B buyer. Only when"enable":true
sizesobject[]— Item sizeschrtIDinteger<int64>— Size IDtechSizestring— Item size (eg S, M, L, XL, 42, 42-43)wbSizestring— Russian item sizeskusstring[]— Array of SKUs
dimensionsobject— Dimensions and weight of packed item in cm and kglengthinteger<int64>— Length, cmwidthinteger<int64>— Width, cmheightinteger<int64>— Height, cmweightBruttonumber— Weight, kg Number of decimal places <=3isValidboolean— Potential inaccuracy of item dimensions: -true— not detected."isValid": truedoes not guarantee that the dimensions are correct. In some cases (for example, when creating a new item category),"isValid": truewill be returned for any values except zero. -false— the specified dimensions significantly differ from the average for the category (subcategory). it is recommended to double-check whether the item dimensions in the packaging are correctly specified incentimeters. The functionality of the listing, including the calculation of logistics and storage, will not be limited. Logistics and storage will continue to be calculated based on the current dimensions. Also,"isValid": falseis returned when there are missing values or any dimension is zero.
characteristicsobject[]— Characteristicsidinteger<int64>— Characteristic IDnamestring— Characteristic namevalueobject— Characteristic value
createdAtstring— CharacteristicstrashedAtstring— Date and time the listing was transferred to the trash
cursorobject— PaginatortrashedAtstring— Date and time for the next listing pagenmIDinteger<int64>— WB item number for the next listing pagetotalinteger<int64>— Number of listings
Structure 400:
dataobject— Error dataerrorboolean— Error flagerrorTextstring— Error descriptionadditionalErrorsobject— Additional errors
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 402:
titlestring— Error titledetailstring— Error details. The error is only returned to services from the Solutions for business Catalog
Structure 403:
dataobject— Error dataerrorboolean— Error flagerrorTextstring— Error descriptionadditionalErrorsstring— Additional errors
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.
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_v2_get_cards_trash(post_v2_get_cards_trash_request=..., locale=...)
print(result)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.postV2GetCardsTrash(postV2GetCardsTrashRequest, locale);
console.log(data);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.PostV2GetCardsTrash(context.Background()).PostV2GetCardsTrashRequest(postV2GetCardsTrashRequest).Locale(locale).Execute()
if err != nil {
panic(err)
}
fmt.Printf("%+v\n", result)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.postV2GetCardsTrash(postV2GetCardsTrashRequest, locale));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->postV2GetCardsTrash($post_v2_get_cards_trash_request));#Использовать "wb-api-client"
Настройки = Новый Конфигурация();
Настройки.УстановитьТокен("<your WB JWT>");
Клиент = Новый ItemsApi(Настройки);
Сообщить(Клиент.PostV2GetCardsTrash(Тело).Тело);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.PostV2GetCardsTrash(postV2GetCardsTrashRequest));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_v2_get_cards_trash(&cfg, post_v2_get_cards_trash_request, locale).await;
println!("{:#?}", result);
}