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

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<int64>

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:

  • block Campaign ID;
  • tab Query log → drop-down list in the block Show logs.

⚠️ Do not confuse it with:

  • the store's identifier, which is displayed in the merchant's personal account.
  • advertising campaigns.

Min value: 1

Query parameters

Name

Description

limit

Type: integer<int32>

The number of values per page.

Min value: 1
Example: 20

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 nextPageToken, received during the last request.

If set page_token and the request has parameters page and pageSize they are ignored.
Example: eyBuZXh0SWQ6IDIzNDIgfQ==

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 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.

hasStocks

Type: boolean

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.

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:

  • page_token
  • limit
  • archived
  • stocksOnWarehouse


Your SKU — the product ID in your system.

Usage rules SKU:

  • For each product SKU there must be one.

  • 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.

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.

Warning

Spaces at the beginning and end of the value are automatically deleted. For example, " SKU123 " and "SKU123" they will be treated as identical values.

What is SKU and how to assign it

Min length: 1

Max length: 255

Pattern: ^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$

Min items: 1

Max items: 500

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: 1

withTurnover

Type: boolean

For the model only FBY

Whether to return the turnover information.

Default value: false. If the information is needed, pass the value true.

Default: false

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:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

result

Type: object

warehouses*

Type: object[]

The warehouse list page.

For the model FBY: may contain several Market warehouses.

For the model FBS: can contain both a partner warehouse and a Market return warehouse.
Information about the remaining goods in the warehouse.

paging

Type: object

nextPageToken

Type: string

ID of the next results page.

prevPageToken

Type: string

ID of the previous results page.

Information about the result pages.
The ID of the next page.

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.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, 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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.