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

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:

  • Modules and APIs → block Sending data to Yandex.Market.
  • Query log → drop-down list in the block Show logs.

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

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

  • page_token
  • limit
  • archived
  • stocksOnWarehouse


Your SKU is the product identifier in your system.

SKU Usage Rules:

  • Each product must have its own SKU.

  • An already set SKU cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.

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: 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 FBY model: to get a list of Market warehouses, use the method GET warehouses.

Min value: 1

withTurnover

Type: boolean

Only for the FBY model

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

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:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

GetWarehouseStocksDTO

A list of warehouses with information about the balances at each of them.

Name

Description

warehouses*

Type: WarehouseOffersDTO[]

The warehouse list page.
Information about the remaining goods in the warehouse.

paging

Type: ScrollingPagerDTO

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

ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Type

Description

ApiResponseStatusType

Enum: OK, ERROR

WarehouseOffersDTO

Information about the remaining goods in the warehouse.

Name

Description

offers*

Type: WarehouseOfferDTO[]

Information about balances.
Information about the remaining goods.

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:

  • Each product must have its own SKU.

  • An already set SKU cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.

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

Max length: 255

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

stocks*

Type: WarehouseStockDTO[]

Information about balances.
Information about the remaining goods.

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, 2023-11-21T00:42:42+03:00.

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: FIT, FREEZE, AVAILABLE, QUARANTINE, UTILIZATION, DEFECT, EXPIRED

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: LOW, ALMOST_LOW, HIGH, VERY_HIGH, NO_SALES, FREE_STORE

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

WarehouseStockType

Enum: FIT, FREEZE, AVAILABLE, QUARANTINE, UTILIZATION, DEFECT, EXPIRED

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

TurnoverType

Enum: LOW, ALMOST_LOW, HIGH, VERY_HIGH, NO_SALES, FREE_STORE

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

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • 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: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • 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: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • 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.