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.
For the model FBS: the response may include not only the partner warehouse, but also the Market's return warehouse. This is possible if the refund was received at the return point specified by the seller and was not picked up for a long time.
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 The ID of the campaign (store) — The technical identifier that represents your store in the Yandex Market system when working through the API. It is uniquely linked to your store, but it is intended only for automated interaction. 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 confuse it with:
Min value: |
Query parameters
|
Name |
Description |
|
limit |
Type: integer 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 Example: |
Body
application/json
{
"stocksWarehouseId": 1,
"hasStocks": true,
"withTurnover": false,
"archived": true,
"offerIds": [
"example"
]
}
|
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[] | null 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:
Min items: Max items: Unique items: Example
|
|
stocksWarehouseId |
Type: integer 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"
}
Type: object
400 Bad Request
The request contains incorrect data. More information about the error
Body
application/json
{
"status": "OK"
}
Type: object
401 Unauthorized
The authorization data is not specified in the request. More information about the error
Body
application/json
{
"status": "OK"
}
Type: object
403 Forbidden
The authorization data is incorrect or access to the resource is prohibited. More information about the error
Body
application/json
{
"status": "OK"
}
Type: object
420 Method Failure
The resource access limit has been exceeded. More information about the error
Body
application/json
{
"status": "OK"
}
Type: object
500 Internal Server Error
Internal error in Yandex. Market. More information about the error
Body
application/json
{
"status": "OK"
}
Type: object
pathParams:
- description: "The ID of the campaign (store) — The technical identifier that represents your store in the Yandex Market system when working through the API. It is uniquely linked to your store, but it is intended only for automated interaction.\n\nYou can find it using a query [GET\_v2/campaigns](../../reference/campaigns/getCampaigns.md) 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**:\n\n* block **Campaign ID**;\n* tab **Query log** → drop-down list in the block **Show logs**.\n\n⚠️ Do not confuse it with:\n- the store's identifier, which is displayed in the merchant's personal account.\n- advertising campaigns.\n"
name: campaignId
in: path
required: true
schema:
type: integer
format: int64
minimum: 1
searchParams:
- name: page_token
description: >
ID of the results page.
If the parameter is omitted, the first page is returned.
We recommend transmitting the value of the output parameter
`nextPageToken`, received during the last request.
If set `page_token` and the request has parameters
`page` and `pageSize` they are ignored.
in: query
required: false
example: eyBuZXh0SWQ6IDIzNDIgfQ==
schema:
type: string
- name: limit
description: |
The number of values per page.
in: query
required: false
example: 20
schema:
type: integer
format: int32
minimum: 1
headers: []
body: |-
{
"stocksWarehouseId": 1,
"hasStocks": true,
"withTurnover": false,
"archived": true,
"offerIds": [
"example"
]
}
schema:
description: |
Filters for requesting balances.
type: object
properties:
stocksWarehouseId:
description: "The warehouse ID.\n\nIf the parameter is specified, only the goods in the transferred warehouse are returned.\n\n**For the model FBY:** to get a list of Market warehouses, use the method [GET\_v2/warehouses](../../reference/warehouses/getFulfillmentWarehouses.md).\n"
type: integer
format: int64
minimum: 1
hasStocks:
description: >
**For the model only FBY**
Filter by product availability. Use only together with
`stocksWarehouseId`.
Pass it on `false` to get information about products that
are not available. With the value `true` The data about
the goods that are in the specified warehouse is returned.
type: boolean
withTurnover:
description: >
**For the model only FBY**
Whether to return the turnover information.
Default value: `false`. If the information is needed,
pass the value `true`.
type: boolean
default: false
archived:
description: >
Filter by location in the archive.
Pass it on `true` to get information about the remaining
items that are archived. If the filter is not filled or passed
`false` the response returns information about products
that are not archived.
type: boolean
offerIds:
description: "Filter by your SKU products.\n\nInformation about the remaining amounts of all transferred funds is returned. SKU, including items in the archive.\n\n{% note warning \"This list is returned only in its entirety.\" %}\n\nIf you are requesting information on specific SKU, do not fill in:\n\n* `page_token`\n* `limit`\n* `archived`\n* `stocksOnWarehouse`\n\n{% endnote %}\n\n\_\n"
type: array
uniqueItems: true
minItems: 1
maxItems: 500
nullable: true
items:
description: "Your SKU —\_the product ID in your system.\n\nUsage rules SKU:\n\n* For each product SKU there must be one.\n\n* Already set SKU it cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.\n\nSKU 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](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku).\n\n{% note warning %}\n\nSpaces at the beginning and end of the value are automatically deleted. For example, `\" SKU123 \"` and `\"SKU123\"` they will be treated as identical values.\n\n{% endnote %}\n\n[What is SKU and how to assign it](https://yandex.ru/support/marketplace/assortment/add/index.html#fields)\n"
type: string
pattern: ^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$
x-transform: trim
minLength: 1
maxLength: 255
bodyType: application/json
method: post
security:
- type: apiKey
name: 'Api-Key'
in: header
- type: oauth2
x-inline: true
flows:
implicit:
authorizationUrl: https://oauth.yandex.ru/authorize
scopes:
market:partner-api: API Яндекс.Маркета / Поиска по товарам для партнеров
path: v2/campaigns/{campaignId}/offers/stocks
host: https://api.partner.market.yandex.ru
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.