Information about balances and turnover
The method is available for models: FBY, FBS, Express and DBS.
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 product balances (for all models) and on turnover products (for the model FBY).
By default, the turnover data is not returned.
To have them in the response, send true in the field withTurnover.
For the model FBY: information about balances may be returned from several Market warehouses, which will have different warehouseId. To get a list of Market warehouses, use the method GET v2/warehouses.
Restriction for the parameter limit
Do not pass a value greater than 200.
| ⚙️ Limit: 100,000 products per minute |
|---|
Request
POST
https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/offers/stocks
Path parameters
|
Name |
Description |
|
campaignId* |
Type: integer<int64> The campaign ID. You can find it using a query GET v2/campaigns or find it in the seller's office on the Market — click on your account icon → Settings and in the menu on the left, select APIs and modules:
⚠️ 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.
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 For the model only FBY Filter by product availability. Use only together with Pass it on |
|
offerIds |
Type: string[] Filter by your SKU products. Information about the remaining amounts of all transferred funds is returned. SKU, including items in the archive. This list is returned only in its entirety. If you are requesting information on specific SKU, do not fill in:
Usage rules SKU:
SKU 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 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 model FBY: to get a list of Market warehouses, use the method GET v2/warehouses. Min value: |
|
withTurnover |
Type: boolean For the model only FBY 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 |
||||||||
|
status* |
Type: string The type of response. Possible values:
Enum: |
||||||||
|
result |
Type: object
A list of warehouses with information about the balances on each of them. |
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: object[] A list of errors. Min items: |
|
status |
Type: string The type of response. Possible values:
Enum: |
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: object[] A list of errors. Min items: |
|
status |
Type: string 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: object[] A list of errors. Min items: |
|
status |
Type: string 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: object[] A list of errors. Min items: |
|
status |
Type: string The type of response. Possible values:
Enum: |
500 Internal Server Error
Internal error of the Market. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] A list of errors. Min items: |
|
status |
Type: string 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.