The structure and content of the reports are subject to change without prior notice.
For example, a new column may be added or the name of the sheet may be changed.
Warehouse balance report
The method is available for all models.
If you are using an API Key token, one of the accesses in the list is required to call the method
- offers-and-cards-management — Manage products and cards
- all-methods — Full account management
Starts the generation of a report on inventory balances. What kind of report is this
What information will be returned:
- For the FBY model, it is about the remaining stock in the Market warehouses.
- For other models, if you specify
businessId
— about the leftovers in all store warehouses in the cabinet, except for FBY. Use a filtercampaignIds
to specify specific stores. - For other models, if you specify
campaignId
, — about the leftovers in the store's corresponding warehouse. This type of report will soon become unavailable.
, Do not transmit at the same time campaignId
and businessId
.
You can find out the generation status and get a link to the finished report using a request. GET reports/info/{reportId}.
Explanation of the report columns:
Sheet Остатки на складе (file stocks_on_warehouses)
CSV column name |
JSON column name |
XLSX column name |
Value type |
SHOP_SKU |
shopSku |
SSKU |
string |
ARTICLE |
article |
Ваш SKU |
string |
MARKET_SKU |
marketSku |
SKU на Яндексе |
integer |
PRODUCT_NAME |
productName |
Название товара |
string |
VALID |
valid |
Годный |
integer |
RESERVED |
reserved |
Резерв |
integer |
AVAILABLE_FOR_ORDER |
availableForOrder |
Доступно для заказа |
integer |
QUARANTINE |
quarantine |
Карантин |
integer |
UTILIZATION |
utilization |
Передан на утилизацию |
integer |
DEFECT |
defect |
Брак |
integer |
EXPIRED |
expired |
Просрочен |
integer |
LENGTH |
length |
Длина, см |
integer |
WIDTH |
width |
Ширина, см |
integer |
HEIGHT |
height |
Высота, см |
integer |
WEIGHT |
weight |
Вес, кг |
number |
WAREHOUSE |
warehouse |
Склад |
string |
SELLING_STATUS |
sellingStatus |
Статус продаж |
string |
RECOMMENDATIONS |
recommendations |
Рекомендации |
string |
Explanation of the report columns:
Sheet Report (file mass_shared_stocks)
CSV column name |
JSON column name |
XLSX column name |
Value type |
ERRORS |
errors |
log-message |
string |
WARNINGS |
warnings |
info-message |
string |
SHOP_SKU |
shopSku |
id |
string |
PRODUCT_NAME |
productName |
name |
string |
COUNT |
count |
count |
integer |
Explanation of the report columns:
Sheet Report (file stocks_business)
CSV column name |
JSON column name |
XLSX column name |
Value type |
ERRORS |
errors |
log-message |
string |
SHOP_SKU |
shopSku |
id |
string |
PRODUCT_NAME |
productName |
name |
string |
PLACEMENT_TYPE |
placementType |
placement_type |
string |
WAREHOUSE_AND_SHOP |
warehouseAndShop |
warehouse_and_shop |
string |
COUNT |
count |
count |
integer |
RESERVE |
reserve |
reserve |
integer |
PRICE |
price |
price |
string |
STATUS |
status |
status |
string |
COMMENT |
comment |
comment |
string |
, Limit: 100 requests per hour |
---|
Request
POST
https://api.partner.market.yandex.ru/reports/stocks-on-warehouses/generate
Query parameters
Name |
Description |
format |
Type: ReportFormatType The format of the report or document. |
ReportFormatType
Report format:
FILE
— a spreadsheet file (XLSX).CSV
— ZIP archive with CSV files for each report sheet.JSON
— ZIP archive with JSON files for each report sheet.
Type |
Description |
Default: Enum: |
Body
application/json
{
"campaignId": 0,
"businessId": 0,
"warehouseIds": [
0
],
"reportDate": "string",
"categoryIds": [
0
],
"hasStocks": false,
"campaignIds": [
0
]
}
Name |
Description |
businessId |
Type: integer<int64> The ID of the cabinet for which the report should be generated (except for FBY stores). Do not transmit together with |
campaignId |
Type: integer<int64> The inventory report for a particular store's warehouse will soon become unavailable. The campaign ID. You can find it using a query GET campaigns or find it in the seller's office on the Market — click on the name of your business and go to the page:
, Do not send the store ID instead, which is indicated in the seller's account on the Market next to the store name and in some reports. Do not transmit together with |
campaignIds |
Type: integer<int64>[] Filter by stores for the cabinet report (except for the FBY model). Transmit along with You can find them using a query. GET campaigns or find it in the seller's office on the Market — click on the name of your business and go to the page:
Do not use store IDs instead, which are listed in the seller's account on the Market next to the store name and in some reports. Min items: Unique items |
categoryIds |
Type: integer<int64>[] Filter by category on the Market (except for the FBY model). Min items: Unique items |
hasStocks |
Type: boolean Filter by the presence of residues (except for the FBY model). |
reportDate |
Type: string<date> Filter by date (for the FBY model). The report will include data for the previous one Good afternoon. |
warehouseIds |
Type: integer<int64>[] Filter by warehouse IDs (FBY model only). To find out the ID, use the request GET warehouses. Min items: Unique items |
Responses
200 OK
In response, you receive an identifier that allows you to find out the generation status and download the finished report.
Body
application/json
{
"status": "OK",
"result": {
"reportId": "string",
"estimatedGenerationTime": 0
}
}
Name |
Description |
result |
Type: GenerateReportDTO The ID that will be needed to track the generation status and receive the finished report or document. |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
GenerateReportDTO
The ID that will be needed to track the generation status and receive the finished report or document.
Name |
Description |
estimatedGenerationTime* |
Type: integer<int64> Expected generation time in milliseconds. |
reportId* |
Type: string The ID that will be needed to track the generation status and receive the finished report or document. |
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
Type |
Description |
Enum: |
400 Bad Request
The request contains incorrect data. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ApiErrorDTO
The general error format.
Name |
Description |
code* |
Type: string The error code. |
message |
Type: string Description of the error. |
401 Unauthorized
The authorization data is not specified in the request. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
403 Forbidden
The authorization data is incorrect or access to the resource is prohibited. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
420 Method Failure
The resource access limit has been exceeded. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
500 Internal Server Error
Internal error of Yandex. Market. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.