Information about balances and turnover
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
- offers-and-cards-management:read-only — View products and cards
- all-methods — Full account management
- all-methods:read-only — View all data
Returns data on the remaining items (for all models) and about turnover products (for the FBY model).
For the FBY model: information about balances can be returned from several Market warehouses, which will have different warehouseId
. To get a list of Market warehouses, use the method GET warehouses.
By default, the turnover data is not returned.
To have them in the response, send true
in the field withTurnover
.
, Limit: 100,000 products per minute |
---|
Request
POST
https://api.partner.market.yandex.ru/campaigns/{campaignId}/offers/stocks
Path parameters
Name |
Description |
campaignId* |
Type: integer<int64> 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's ID instead, which is indicated in the seller's account on the Market next to the store's name and in some reports.
Min value: |
Query parameters
Name |
Description |
limit |
Type: integer<int32> The number of values per page.
Min value: |
page_token |
Type: string ID of the results page. If the parameter is omitted, the first page is returned. We recommend transmitting the value of the output parameter If set |
Body
application/json
{
"stocksWarehouseId": 0,
"hasStocks": false,
"withTurnover": false,
"archived": false,
"offerIds": [
"string"
]
}
Name |
Description |
archived |
Type: boolean Filter by location in the archive. Pass it on |
hasStocks |
Type: boolean Filter by product availability. Use only together with Pass it on |
offerIds |
Type: string[] Filter by your product SKUs. Information is returned about the balances of all transferred SKUs, including the items in the archive. This list is returned only in its entirety. If you are requesting information on specific SKUs, do not fill in:
SKU Usage Rules:
The SKU of the product can be changed in the seller's account on the Market. Read about how to do this. in the Help of the Market for sellers. What is a SKU and how to assign it Min length: Max length: Pattern: Min items: Max items: Unique items |
stocksWarehouseId |
Type: integer<int64> The warehouse ID. If the parameter is specified, only the goods in the transferred warehouse are returned. For the FBY model: to get a list of Market warehouses, use the method GET warehouses. Min value: |
withTurnover |
Type: boolean Only for the FBY model Whether to return the turnover information. Default value: Default: |
Responses
200 OK
Remnants of goods in warehouses.
Body
application/json
{
"status": "OK",
"result": {
"paging": {
"nextPageToken": "string",
"prevPageToken": "string"
},
"warehouses": [
{
"warehouseId": 0,
"offers": [
{
"offerId": "string",
"turnoverSummary": {
"turnover": "LOW",
"turnoverDays": 0
},
"stocks": [
{
"type": "FIT",
"count": 0
}
],
"updatedAt": "2022-12-29T18:02:01Z"
}
]
}
]
}
}
Name |
Description |
result |
Type: GetWarehouseStocksDTO A list of warehouses with information about the balances at each of them. |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
GetWarehouseStocksDTO
A list of warehouses with information about the balances at each of them.
Name |
Description |
warehouses* |
Type: WarehouseOffersDTO[] The warehouse list page. |
paging |
Type: ScrollingPagerDTO Information about the result pages. |
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
Type |
Description |
Enum: |
WarehouseOffersDTO
Information about the remaining goods in the warehouse.
Name |
Description |
offers* |
Type: WarehouseOfferDTO[] Information about balances. |
warehouseId* |
Type: integer<int64> The warehouse ID. |
ScrollingPagerDTO
Information about the result pages.
Name |
Description |
nextPageToken |
Type: string ID of the next results page. |
prevPageToken |
Type: string ID of the previous results page. |
WarehouseOfferDTO
Information about the remaining goods.
Name |
Description |
offerId* |
Type: string Your SKU is the product identifier in your system. SKU Usage Rules:
The SKU of the product can be changed in the seller's account on the Market. Read about how to do this. in the Help of the Market for sellers. What is a SKU and how to assign it Min length: Max length: Pattern: |
stocks* |
Type: WarehouseStockDTO[] Information about balances. |
turnoverSummary |
Type: TurnoverDTO Information about turnover. |
updatedAt |
Type: string<date-time> The date and time of the last update of the balance information. Date and time format: ISO 8601 with an offset relative to UTC. For example, |
WarehouseStockDTO
Information about the remaining goods.
Name |
Description |
count* |
Type: integer<int64> The value of the leftovers. |
type* |
Type: WarehouseStockType The type of leftovers. Enum: |
TurnoverDTO
Information about the turnover of the product.
Read more about the storage and turnover of goods in Yandex.Market Help for sellers.
Name |
Description |
turnover* |
Type: TurnoverType Evaluation of turnover. Enum: |
turnoverDays |
Type: number<double> The value is in days. |
WarehouseStockType
The type of remaining goods in the warehouse:
-
AVAILABLE
(corresponds to the "Available to order" type in the "Stock balances" report in the seller's office on the Market) — an item available for sale. -
DEFECT
(corresponds to the "Marriage" type) — a defective product. -
EXPIRED
(corresponds to the "Expired" type) — an expired product. -
FIT
(corresponds to the "Fit" type) — an item that is available for sale or has already been reserved. -
FREEZE
— the product that is reserved for orders. -
QUARANTINE
(corresponds to the "Quarantine" type) — a product that is temporarily unavailable for sale (for example, the product is being moved from one warehouse to another). -
UTILIZATION
— the product that will be disposed of.
Type |
Description |
Enum: |
TurnoverType
Evaluation of turnover.
enum | Turnover range | Comment |
---|---|---|
LOW |
turnoverDays ≥ 120 |
|
ALMOST_LOW |
100 ≤ turnoverDays < 120 |
|
HIGH |
45 ≤ turnoverDays < 100 |
|
VERY_HIGH |
0 ≤ turnoverDays < 45 |
|
NO_SALES |
— | There are no sales. |
FREE_STORE |
Any value. | There is no need to pay for the storage of goods in this category. |
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.
The average number of days for which the product is sold. Detailed information about turnover is provided in the Help of the Market for sellers.