---
metadata:
  - name: generator
    content: Diplodoc Platform v5.55.0
alternate:
  - https://yandex.com/dev/market/partner-api/doc/en/reference/stocks/getStocks.md
  - https://yandex.com/dev/market/partner-api/doc/ru/reference/stocks/getStocks.md
  - https://yandex.com/dev/market/partner-api/doc/zh/reference/stocks/getStocks.md
  - href: zh/reference/stocks/getStocks.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/market/partner-api/doc/zh/llms.txt

<!-- source: zh/api/stocks/getStocks.md -->
<div class="openapi">

# 有关余额和营业额的信息

<!-- markdownlint-disable-file -->

{% list tabs %}

- Info

  
  <!-- source: zh/_auto/method_scopes/getStocks.md -->
  **方法适用于[所有模式](https://yandex.com/dev/market/partner-api/doc/zh/overview/comparison.md).**

  {% cut "**如果您使用API-Key令牌，调用该方法时需要具备列表中可用权限之一**" %}

  * offers-and-cards-management — [商品和卡片管理](https://yandex.com/dev/market/partner-api/doc/zh/_auto/scopes_summary/pages/offers-and-cards-management.md)
  * offers-and-cards-management:read-only — [查看商品和卡片](https://yandex.com/dev/market/partner-api/doc/zh/_auto/scopes_summary/pages/offers-and-cards-management_read-only.md)
  * all-methods — 全面管理账户
  * all-methods:read-only — 查看所有数据

  {% endcut %}
  <!-- endsource: zh/_auto/method_scopes/getStocks.md -->
  
  
  返回其余项目的数据（对于所有模型）和关于 [营业额](*turnover) 产品（用于模型 FBY).
  
  
  {% note warning "Когда использовать этот метод" %}
  
  
  方法是相关的:
  
  * 对于模型 FBY 和LaaS;
  * 对于模型 FBS, DBS 和 Express 如果机柜中有仓库组。
  
  如果您的办公室中没有仓库组，并且您正在使用模型 FBS, DBS 或 Express，使用方法 [POST v3/businesses/{businessId}/offers/stocks](https://yandex.com/dev/market/partner-api/doc/zh/reference/stocks/getStocksOnPartnerWarehouses.md). [什么是仓库组，为什么需要它们？](https://yandex.ru/support/marketplace/assortment/operations/stocks.html#unified-stocks).
  
  
  {% endnote %}
  
  
  
  {% note info "По умолчанию данные по оборачивамости не возращаются" %}
  
  
  要让他们在响应中，请发送 `true` 在战场上 `withTurnover`.
  
  
  {% endnote %}
  
  
  **模型 FBY 和LaaS：**有关余额的信息可能会从几个市场仓库返回，这些仓库会有不同的 `warehouseId`. 要获取市场仓库列表，请使用该方法 [GET v2/warehouses](https://yandex.com/dev/market/partner-api/doc/zh/reference/warehouses/getFulfillmentWarehouses.md).
  
  **对于模型 FBS:**响应可能不仅包括合作伙伴仓库，还包括市场的退货仓库。 如果退款是在卖方指定的退货点收到的，并且很长一段时间没有收到，这是可能的。
  
  
  <!-- source: zh/_auto/method_limits/getStocks.md -->
  |<div style="text-align: left;">**⚙️ 限额:** 100 000 产品 每分钟</div>|
  |-|
  <!-- endsource: zh/_auto/method_limits/getStocks.md -->
  
  
  [//]:<>（营业额：产品销售的平均天数。 有关营业额的更多信息，请参阅市场对卖家的帮助。 https://yandex.ru/support/marketplace/analytics/turnover.html.)
  
  
  ## Request
  
  <div class="openapi__requests">
  
  <div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">
  
  <div class="openapi__request">
  
  POST {.openapi__method}
  ```text translate=no
  https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/offers/stocks
  ```
  
  </div>
  
  </div>
  
  </div>
  
  ### Path parameters
  
  #|
  || **Name** | **Description** ||
  ||
  
  _campaignId_{.json-schema-reset .json-schema-property .json-schema-required}
  {.table-cell}|
  **Type**: integer
  
  广告系列（商店）的ID — 通过API工作时，代表您在Yandex市场系统中的商店的技术标识符。 它与您的商店唯一链接，但仅用于自动交互。
  
  您可以使用查询找到它 [GET v2/campaigns](https://yandex.com/dev/market/partner-api/doc/zh/reference/campaigns/getCampaigns.md) 或者在市场上的卖家办公室找到它。 点击您的帐户图标→ **设置** 在左边的菜单中，选择 **Api和模块**:
  
  * 座 **运动ID**;
  * 标签 **查询日志** →块中的下拉列表 **显示日志**.
  
  ⚠️ 不要把它与:
  - 商店的标识符，显示在商家的个人帐户中。
  - 广告活动。
  
  
  _Min value:_{.json-schema-reset .json-schema-assertion} `1`
  {.table-cell}
  ||
  |#{.json-schema-properties}
  
  ### Query parameters
  
  #|
  || **Name** | **Description** ||
  ||
  
  _limit_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer
  
  每页的值数。 <br><br> 如果参数值超过允许的最大值，它将减少到最大值。
  
  
  _Default:_{.json-schema-reset .json-schema-value} `50`
  
  _Min value:_{.json-schema-reset .json-schema-assertion} `1`
  
  _Max value:_{.json-schema-reset .json-schema-assertion} `100`
  {.table-cell}
  ||
  ||
  
  _pageToken_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string
  
  结果页面的ID。
  
  如果省略该参数，则返回第一页。
  
  传递输出参数的值 `nextPageToken`，在最后一次请求期间接收。
  
  
  _Example:_{.json-schema-reset .json-schema-example} ``
  {.table-cell}
  ||
  |#{.json-schema-properties}
  
  <div class="openapi-entity">
  
  ### Body
  
  {% cut "application/json" %}
  
  ```json translate=no
  {
    "stocksWarehouseId": 1,
    "hasStocks": true,
    "withTurnover": false,
    "archived": true,
    "offerIds": [
      "example"
    ]
  }
  ```
  
  {% endcut %}
  
  #|
  || **Name** | **Description** ||
  ||
  
  _archived_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: boolean
  
  按存档中的位置过滤。
  
  传下去 `true` 获取有关存档的其余项目的信息。 如果过滤器未填充或通过 `false` 响应返回有关未存档的产品的信息。
  
  {.table-cell}
  ||
  ||
  
  _hasStocks_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: boolean
  
  **只适用于型号 FBY 和LaaS**
  
  按产品可用性筛选。 只与 `stocksWarehouseId`.
  
  传下去 `false` 获取有关不可用产品的信息。 与值 `true` 返回有关指定仓库中的货物的数据。
  
  {.table-cell}
  ||
  ||
  
  _offerIds_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string[] &#124; null
  
  过滤你的 SKU 产品。
  
  返回有关所有转移资金的剩余金额的信息。 SKU，包括存档中的项目。
  
  
  {% note warning "Такой список возвращается только целиком" %}
  
  
  如果你要求提供特定的资料 SKU，不填写:
  
  * `pageToken`
  * `limit`
  * `archived`
  * `stocksOnWarehouse`
  
  
  {% endnote %}
  
  
   
  
  
  _Min items:_{.json-schema-reset .json-schema-assertion} `1`
  
  _Max items:_{.json-schema-reset .json-schema-assertion} `500`
  
  _Unique items:_{.json-schema-reset .json-schema-assertion} `true`
  
  {% cut "**Example**" %}{.json-schema-example}
  
  ```json translate=no
  [
    "example"
  ]
  ```
  
  {% endcut %}
  {.table-cell}
  ||
  ||
  
  _stocksWarehouseId_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer
  
  仓库ID。
  
  如果指定了该参数，则只返回已转移仓库中的货物。
  
  **模型 FBY 和LaaS：**您可以使用该方法获得市场仓库列表 [GET v2/warehouses](https://yandex.com/dev/market/partner-api/doc/zh/reference/warehouses/getFulfillmentWarehouses.md).
  
  
  _Min value:_{.json-schema-reset .json-schema-assertion} `1`
  {.table-cell}
  ||
  ||
  
  _withTurnover_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: boolean
  
  **只适用于型号 FBY 和LaaS**
  
  是否返回成交信息。
  
  默认值: `false`. 如果需要信息，则传递值 `true`.
  
  
  _Default:_{.json-schema-reset .json-schema-value} `false`
  {.table-cell}
  ||
  |#{.json-schema-properties}
  
  </div>
  
  ## Responses
  
  <div class="openapi__response__code__200">
  
  ## 200 OK
  
  仓库中的货物残余。
  
  <div class="openapi-entity">
  
  ### Body
  
  {% cut "application/json" %}
  
  ```json translate=no
  {
    "status": "OK",
    "result": {
      "paging": {
        "nextPageToken": "example"
      },
      "warehouses": [
        {
          "warehouseId": 0,
          "offers": [
            null
          ]
        }
      ]
    }
  }
  ```
  
  {% endcut %}
  
  **Type**: object
  
  {% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}
  
  - {% cut "**Type**: object" %}
  
    #|
    ||
  
    _status_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: string
  
    响应的类型。
    可能的值:
    * `OK` — 没有错误。
    * `ERROR` — 处理请求时出错。
  
  
    _Enum:_{.json-schema-reset .json-schema-value} `OK`, `ERROR`
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    服务器响应的标准包装器。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "status": "OK"
    }
    ```
  
    {% endcut %}
  
  - {% cut "**Type**: object" %}
  
    #|
    ||
  
    _result_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    {% cut "**Type**: object" %}
  
    #|
    ||
  
    _warehouses_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    {% cut "**Type**: object[]" %}
  
    #|
    ||
  
    _offers_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    {% cut "**Type**: object[]" %}
  
    #|
    ||
  
    _offerId_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: string
  
    你的 SKU — 系统中的产品ID。
  
    使用规则 SKU:
  
    * 对于每个产品 SKU 一定有一个。
  
    * 已经设置 SKU 它不能被释放并重新用于另一个产品。 每个产品都应该收到一个以前从未在目录中使用过的新标识符。
  
    SKU 产品可以在市场上的卖方帐户中更改。 阅读如何做到这一点。 [在市场对卖家的帮助](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku).
  
  
    {% note warning %}
  
  
    值开头和结尾的空格会自动删除。 例如, `"  SKU123  "` 和 `"SKU123"` 它们将被视为相同的值。
  
  
    {% endnote %}
  
  
    [什么是 SKU 以及如何分配它](https://yandex.ru/support/marketplace/assortment/add/index.html#fields)
  
  
    _Min length:_{.json-schema-reset .json-schema-assertion} `1`
  
    _Max length:_{.json-schema-reset .json-schema-assertion} `255`
  
    _Pattern:_{.json-schema-reset .json-schema-assertion} `^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$`
  
    _Example:_{.json-schema-reset .json-schema-example} `example`
    {.table-cell}
    ||
    ||
  
    _stocks_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    {% cut "**Type**: object[]" %}
  
    #|
    ||
  
    _count_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: integer
  
    剩菜的价值。
    {.table-cell}
    ||
    ||
  
    _type_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: string
  
    仓库中剩余货物的类型:
  
    * `AVAILABLE` （对应于市场上卖方办公室"库存余额"报告中的"可供订购"类型） — 可供出售的物品。
  
    * `DEFECT` （对应于"婚姻"类型） — 有缺陷的产品。
  
    * `EXPIRED` （对应于"逾期"类型） — 过期的产品。
  
    * `FIT` （对应于"适合"类型） — 可供出售或已被保留的物品。
  
    * `FREEZE` — 为订单保留的产品。
  
    * `QUARANTINE` （对应于"隔离"类型） — 暂时不可出售的物料（例如，物料正在从一个仓库移动到另一个仓库）。
  
    * `UTILIZATION` — 将被处置的产品。
  
  
    _Enum:_{.json-schema-reset .json-schema-value} `FIT`, `FREEZE`, `AVAILABLE`, `QUARANTINE`, `UTILIZATION`, `DEFECT`, `EXPIRED`
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    有关余额的信息。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    [
      {
        "type": "FIT",
        "count": 0
      }
    ]
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    ||
  
    _turnoverSummary_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    {% cut "**Type**: object" %}
  
    #|
    ||
  
    _turnover_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: string
  
    营业额的评估。
  
    &#124;枚举&#124;营业额范围&#124;评论&#124;
    &#124;-&#124;-&#124;-&#124;
    &#124;`LOW`&#124;`turnoverDays` ≥ 120&#124;&#124;
    &#124;`ALMOST_LOW`&#124;100 ≤ `turnoverDays` < 120&#124;&#124;
    &#124;`HIGH`&#124;45 ≤ `turnoverDays` < 100&#124;&#124;
    &#124;`VERY_HIGH`&#124;0 ≤ `turnoverDays` < 45&#124;&#124;
    &#124;`NO_SALES`&#124;—&#124;没有销售。&#124;
    &#124;`FREE_STORE`&#124;任何值。&#124;没有必要支付此类货物的存储费用。&#124;
  
  
    _Enum:_{.json-schema-reset .json-schema-value} `LOW`, `ALMOST_LOW`, `HIGH`, `VERY_HIGH`, `NO_SALES`, `FREE_STORE`
    {.table-cell}
    ||
    ||
  
    _turnoverDays_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    **Type**: number
  
    值以天为单位。
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    品的营业额的信息。
  
    阅读更多有关货物储存及周转的资料 [燕基科斯.对卖家的市场帮助](https://yandex.ru/support/marketplace/ru/storage/logistics#turnover).
  
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "turnover": "LOW",
      "turnoverDays": 0.5
    }
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    ||
  
    _updatedAt_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    **Type**: string&lt;date-time&gt;
  
    余额信息上次更新的日期和时间。
  
    日期和时间格式: ISO 8601 具有相对于 UTC. 例如, `2023-11-21T00：42：42+03：00`.
  
  
    _Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    有关余额的信息。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    [
      {
        "offerId": "example",
        "turnoverSummary": {
          "turnover": "LOW",
          "turnoverDays": 0.5
        },
        "stocks": [
          {
            "type": "FIT",
            "count": 0
          }
        ],
        "updatedAt": "2025-01-01T00:00:00Z"
      }
    ]
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    ||
  
    _warehouseId_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: integer
  
    仓库ID。
  
    **模型 FBY 和LaaS:**返回市场仓库的ID。
  
    **对于模型 FBS:**合作伙伴仓库和市场退货仓库的标识符均可退回。
  
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    仓库列表页面。
  
    **模型 FBY 和LaaS：**可能包含几个市场仓库。
  
    **对于模型 FBS:**可以同时包含合作伙伴仓库和市场退货仓库。
  
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    [
      {
        "warehouseId": 0,
        "offers": [
          {
            "offerId": "example",
            "turnoverSummary": {
              "turnover": "LOW",
              "turnoverDays": 0.5
            },
            "stocks": [
              {}
            ],
            "updatedAt": "2025-01-01T00:00:00Z"
          }
        ]
      }
    ]
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    ||
  
    _paging_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    {% cut "**Type**: object" %}
  
    #|
    ||
  
    _nextPageToken_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    **Type**: string
  
    下一个结果页面的ID。
  
    _Example:_{.json-schema-reset .json-schema-example} `example`
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    下一页的ID。
  
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "nextPageToken": "example"
    }
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    仓库列表，其中包含有关每个仓库余额的信息。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "paging": {
        "nextPageToken": "example"
      },
      "warehouses": [
        {
          "warehouseId": 0,
          "offers": [
            {
              "offerId": "example",
              "turnoverSummary": {},
              "stocks": [
                null
              ],
              "updatedAt": "2025-01-01T00:00:00Z"
            }
          ]
        }
      ]
    }
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "result": {
        "paging": {
          "nextPageToken": "example"
        },
        "warehouses": [
          {
            "warehouseId": 0,
            "offers": [
              {}
            ]
          }
        ]
      }
    }
    ```
  
    {% endcut %}
  
  {% endcut %}
  
  </div>
  
  </div>
  
  <div class="openapi__response__code__400">
  
  ## 400 Bad Request
  
  请求包含不正确的数据。 [了解有关处理剩菜时的错误的更多信息](https://yandex.com/dev/market/partner-api/doc/zh/concepts/error-codes.md#stocks)
  
  
  <div class="openapi-entity">
  
  ### Body
  
  {% cut "application/json" %}
  
  ```json translate=no
  {
    "status": "OK",
    "errors": [
      {
        "code": "example",
        "message": "example"
      }
    ]
  }
  ```
  
  {% endcut %}
  
  **Type**: object
  
  {% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}
  
  - **Type**: object
  
    {% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}
  
    - **Type**: object
  
      #|
      ||
  
      _status_{.json-schema-reset .json-schema-property .json-schema-required}
      {.table-cell}|
      **Type**: string
  
      响应的类型。
      可能的值:
      * `OK` — 没有错误。
      * `ERROR` — 处理请求时出错。
  
  
      _Enum:_{.json-schema-reset .json-schema-value} `OK`, `ERROR`
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      服务器响应的标准包装器。
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      {
        "status": "OK"
      }
      ```
  
      {% endcut %}
  
    - **Type**: object
  
      #|
      ||
  
      _errors_{.json-schema-reset .json-schema-property}
      {.table-cell}|
      {% cut "**Type**: object[]" %}
  
      #|
      ||
  
      _code_{.json-schema-reset .json-schema-property .json-schema-required}
      {.table-cell}|
      **Type**: string
  
      的错误代码。
  
      _Example:_{.json-schema-reset .json-schema-example} `example`
      {.table-cell}
      ||
      ||
  
      _message_{.json-schema-reset .json-schema-property}
      {.table-cell}|
      **Type**: string
  
      错误的描述。
  
      _Example:_{.json-schema-reset .json-schema-example} `example`
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      {% endcut %}
  
      错误列表。
  
      _Min items:_{.json-schema-reset .json-schema-assertion} `1`
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      ```
  
      {% endcut %}
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      ```
  
      {% endcut %}
  
    {% endcut %}
  
    服务器错误的标准包装器。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    ```
  
    {% endcut %}
  
  {% endcut %}
  
  </div>
  
  </div>
  
  <div class="openapi__response__code__401">
  
  ## 401 Unauthorized
  
  请求中未指定授权数据。 [有关错误的更多信息](https://yandex.com/dev/market/partner-api/doc/zh/concepts/error-codes.md#401)
  
  <div class="openapi-entity">
  
  ### Body
  
  {% cut "application/json" %}
  
  ```json translate=no
  {
    "status": "OK",
    "errors": [
      {
        "code": "example",
        "message": "example"
      }
    ]
  }
  ```
  
  {% endcut %}
  
  **Type**: object
  
  {% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}
  
  - **Type**: object
  
    {% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}
  
    - **Type**: object
  
      #|
      ||
  
      _status_{.json-schema-reset .json-schema-property .json-schema-required}
      {.table-cell}|
      **Type**: string
  
      响应的类型。
      可能的值:
      * `OK` — 没有错误。
      * `ERROR` — 处理请求时出错。
  
  
      _Enum:_{.json-schema-reset .json-schema-value} `OK`, `ERROR`
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      服务器响应的标准包装器。
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      {
        "status": "OK"
      }
      ```
  
      {% endcut %}
  
    - **Type**: object
  
      #|
      ||
  
      _errors_{.json-schema-reset .json-schema-property}
      {.table-cell}|
      {% cut "**Type**: object[]" %}
  
      #|
      ||
  
      _code_{.json-schema-reset .json-schema-property .json-schema-required}
      {.table-cell}|
      **Type**: string
  
      的错误代码。
  
      _Example:_{.json-schema-reset .json-schema-example} `example`
      {.table-cell}
      ||
      ||
  
      _message_{.json-schema-reset .json-schema-property}
      {.table-cell}|
      **Type**: string
  
      错误的描述。
  
      _Example:_{.json-schema-reset .json-schema-example} `example`
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      {% endcut %}
  
      错误列表。
  
      _Min items:_{.json-schema-reset .json-schema-assertion} `1`
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      ```
  
      {% endcut %}
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      ```
  
      {% endcut %}
  
    {% endcut %}
  
    服务器错误的标准包装器。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    ```
  
    {% endcut %}
  
  {% endcut %}
  
  </div>
  
  </div>
  
  <div class="openapi__response__code__403">
  
  ## 403 Forbidden
  
  授权数据不正确或禁止访问资源。 [有关错误的更多信息](https://yandex.com/dev/market/partner-api/doc/zh/concepts/error-codes.md#403)
  
  <div class="openapi-entity">
  
  ### Body
  
  {% cut "application/json" %}
  
  ```json translate=no
  {
    "status": "OK",
    "errors": [
      {
        "code": "example",
        "message": "example"
      }
    ]
  }
  ```
  
  {% endcut %}
  
  **Type**: object
  
  {% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}
  
  - **Type**: object
  
    {% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}
  
    - **Type**: object
  
      #|
      ||
  
      _status_{.json-schema-reset .json-schema-property .json-schema-required}
      {.table-cell}|
      **Type**: string
  
      响应的类型。
      可能的值:
      * `OK` — 没有错误。
      * `ERROR` — 处理请求时出错。
  
  
      _Enum:_{.json-schema-reset .json-schema-value} `OK`, `ERROR`
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      服务器响应的标准包装器。
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      {
        "status": "OK"
      }
      ```
  
      {% endcut %}
  
    - **Type**: object
  
      #|
      ||
  
      _errors_{.json-schema-reset .json-schema-property}
      {.table-cell}|
      {% cut "**Type**: object[]" %}
  
      #|
      ||
  
      _code_{.json-schema-reset .json-schema-property .json-schema-required}
      {.table-cell}|
      **Type**: string
  
      的错误代码。
  
      _Example:_{.json-schema-reset .json-schema-example} `example`
      {.table-cell}
      ||
      ||
  
      _message_{.json-schema-reset .json-schema-property}
      {.table-cell}|
      **Type**: string
  
      错误的描述。
  
      _Example:_{.json-schema-reset .json-schema-example} `example`
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      {% endcut %}
  
      错误列表。
  
      _Min items:_{.json-schema-reset .json-schema-assertion} `1`
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      ```
  
      {% endcut %}
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      ```
  
      {% endcut %}
  
    {% endcut %}
  
    服务器错误的标准包装器。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    ```
  
    {% endcut %}
  
  {% endcut %}
  
  </div>
  
  </div>
  
  <div class="openapi__response__code__420">
  
  ## 420 Method Failure
  
  已超出资源访问限制。 [有关错误的更多信息](https://yandex.com/dev/market/partner-api/doc/zh/concepts/error-codes.md#420)
  
  <div class="openapi-entity">
  
  ### Body
  
  {% cut "application/json" %}
  
  ```json translate=no
  {
    "status": "OK",
    "errors": [
      {
        "code": "example",
        "message": "example"
      }
    ]
  }
  ```
  
  {% endcut %}
  
  **Type**: object
  
  {% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}
  
  - **Type**: object
  
    {% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}
  
    - **Type**: object
  
      #|
      ||
  
      _status_{.json-schema-reset .json-schema-property .json-schema-required}
      {.table-cell}|
      **Type**: string
  
      响应的类型。
      可能的值:
      * `OK` — 没有错误。
      * `ERROR` — 处理请求时出错。
  
  
      _Enum:_{.json-schema-reset .json-schema-value} `OK`, `ERROR`
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      服务器响应的标准包装器。
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      {
        "status": "OK"
      }
      ```
  
      {% endcut %}
  
    - **Type**: object
  
      #|
      ||
  
      _errors_{.json-schema-reset .json-schema-property}
      {.table-cell}|
      {% cut "**Type**: object[]" %}
  
      #|
      ||
  
      _code_{.json-schema-reset .json-schema-property .json-schema-required}
      {.table-cell}|
      **Type**: string
  
      的错误代码。
  
      _Example:_{.json-schema-reset .json-schema-example} `example`
      {.table-cell}
      ||
      ||
  
      _message_{.json-schema-reset .json-schema-property}
      {.table-cell}|
      **Type**: string
  
      错误的描述。
  
      _Example:_{.json-schema-reset .json-schema-example} `example`
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      {% endcut %}
  
      错误列表。
  
      _Min items:_{.json-schema-reset .json-schema-assertion} `1`
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      ```
  
      {% endcut %}
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      ```
  
      {% endcut %}
  
    {% endcut %}
  
    服务器错误的标准包装器。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    ```
  
    {% endcut %}
  
  {% endcut %}
  
  </div>
  
  </div>
  
  <div class="openapi__response__code__500">
  
  ## 500 Internal Server Error
  
  市场的内部错误。 [有关错误的更多信息](https://yandex.com/dev/market/partner-api/doc/zh/concepts/error-codes.md#500)
  
  <div class="openapi-entity">
  
  ### Body
  
  {% cut "application/json" %}
  
  ```json translate=no
  {
    "status": "OK",
    "errors": [
      {
        "code": "example",
        "message": "example"
      }
    ]
  }
  ```
  
  {% endcut %}
  
  **Type**: object
  
  {% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}
  
  - **Type**: object
  
    {% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}
  
    - **Type**: object
  
      #|
      ||
  
      _status_{.json-schema-reset .json-schema-property .json-schema-required}
      {.table-cell}|
      **Type**: string
  
      响应的类型。
      可能的值:
      * `OK` — 没有错误。
      * `ERROR` — 处理请求时出错。
  
  
      _Enum:_{.json-schema-reset .json-schema-value} `OK`, `ERROR`
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      服务器响应的标准包装器。
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      {
        "status": "OK"
      }
      ```
  
      {% endcut %}
  
    - **Type**: object
  
      #|
      ||
  
      _errors_{.json-schema-reset .json-schema-property}
      {.table-cell}|
      {% cut "**Type**: object[]" %}
  
      #|
      ||
  
      _code_{.json-schema-reset .json-schema-property .json-schema-required}
      {.table-cell}|
      **Type**: string
  
      的错误代码。
  
      _Example:_{.json-schema-reset .json-schema-example} `example`
      {.table-cell}
      ||
      ||
  
      _message_{.json-schema-reset .json-schema-property}
      {.table-cell}|
      **Type**: string
  
      错误的描述。
  
      _Example:_{.json-schema-reset .json-schema-example} `example`
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      {% endcut %}
  
      错误列表。
  
      _Min items:_{.json-schema-reset .json-schema-assertion} `1`
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      ```
  
      {% endcut %}
      {.table-cell}
      ||
      |#{.json-schema-properties}
  
      {% cut "**Example**" %}{.json-schema-example}
  
      ```json translate=no
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      ```
  
      {% endcut %}
  
    {% endcut %}
  
    服务器错误的标准包装器。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    ```
  
    {% endcut %}
  
  {% endcut %}
  
  </div>
  
  </div>
        

- Console

  ```openapi-sandbox translate=no
  pathParams:
    - description: "广告系列（商店）的ID — 通过API工作时，代表您在Yandex市场系统中的商店的技术标识符。 它与您的商店唯一链接，但仅用于自动交互。\n\n您可以使用查询找到它 [GET\_v2/campaigns](../../reference/campaigns/getCampaigns.md) 或者在市场上的卖家办公室找到它。 点击您的帐户图标→ **设置** 在左边的菜单中，选择 **Api和模块**:\n\n* 座 **运动ID**;\n* 标签 **查询日志** →块中的下拉列表 **显示日志**.\n\n⚠️ 不要把它与:\n- 商店的标识符，显示在商家的个人帐户中。\n- 广告活动。\n"
      name: campaignId
      in: path
      required: true
      schema:
        type: integer
        format: int64
        minimum: 1
  searchParams:
    - name: pageToken
      description: |
        结果页面的ID。
  
        如果省略该参数，则返回第一页。
  
        传递输出参数的值 `nextPageToken`，在最后一次请求期间接收。
      in: query
      required: false
      x-transform: token
      x-aliases:
        - pageToken
        - page_token
      schema:
        type: string
    - name: limit
      description: |
        每页的值数。 <br><br> 如果参数值超过允许的最大值，它将减少到最大值。
      in: query
      required: false
      x-transform: truncateLimit
      schema:
        type: integer
        format: int32
        minimum: 1
        default: 50
        maximum: 100
  headers: []
  body: |-
    {
      "stocksWarehouseId": 1,
      "hasStocks": true,
      "withTurnover": false,
      "archived": true,
      "offerIds": [
        "example"
      ]
    }
  schema:
    description: |
      用于请求余额的过滤器。
    type: object
    properties:
      stocksWarehouseId:
        description: "仓库ID。\n\n如果指定了该参数，则只返回已转移仓库中的货物。\n\n**模型 FBY 和LaaS：**您可以使用该方法获得市场仓库列表 [GET\_v2/warehouses](../../reference/warehouses/getFulfillmentWarehouses.md).\n"
        type: integer
        format: int64
        minimum: 1
      hasStocks:
        description: >
          **只适用于型号 FBY 和LaaS**
  
  
          按产品可用性筛选。 只与 `stocksWarehouseId`.
  
  
          传下去 `false` 获取有关不可用产品的信息。 与值 `true`
          返回有关指定仓库中的货物的数据。
        type: boolean
      withTurnover:
        description: |
          **只适用于型号 FBY 和LaaS**
  
          是否返回成交信息。
  
          默认值: `false`. 如果需要信息，则传递值 `true`.
        type: boolean
        default: false
      archived:
        description: >
          按存档中的位置过滤。
  
  
          传下去 `true` 获取有关存档的其余项目的信息。 如果过滤器未填充或通过
          `false` 响应返回有关未存档的产品的信息。
        type: boolean
      offerIds:
        description: "过滤你的 SKU 产品。\n\n返回有关所有转移资金的剩余金额的信息。 SKU，包括存档中的项目。\n\n\n:::no-translate\n{% note warning \"Такой список возвращается только целиком\" %}\n:::\n\n\n如果你要求提供特定的资料 SKU，不填写:\n\n* `pageToken`\n* `limit`\n* `archived`\n* `stocksOnWarehouse`\n\n\n:::no-translate\n{% endnote %}\n:::\n\n\n\_\n"
        type: array
        uniqueItems: true
        minItems: 1
        maxItems: 500
        nullable: true
        items:
          description: "你的 SKU —\_系统中的产品ID。\n\n使用规则 SKU:\n\n* 对于每个产品 SKU 一定有一个。\n\n* 已经设置 SKU 它不能被释放并重新用于另一个产品。 每个产品都应该收到一个以前从未在目录中使用过的新标识符。\n\nSKU 产品可以在市场上的卖方帐户中更改。 阅读如何做到这一点。 [在市场对卖家的帮助](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku).\n\n\n:::no-translate\n{% note warning %}\n:::\n\n\n值开头和结尾的空格会自动删除。 例如, `\"  SKU123  \"` 和 `\"SKU123\"` 它们将被视为相同的值。\n\n\n:::no-translate\n{% endnote %}\n:::\n\n\n[什么是 SKU 以及如何分配它](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
      fake:
        description: |
          以返回合成非零残差进行积分测试。 只适用于型号 FBY 还有拉斯。
        type: boolean
        default: false
        x-hidden: true
  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
  
  ```
        

{% endlist %}


</div>
<!-- endsource: zh/api/stocks/getStocks.md -->

[*turnover]:
产品销售的平均天数。 提供有关营业额的详细资料 [在市场对卖家的帮助](https://yandex.ru/support/marketplace/analytics/turnover.html).

[*Deprecated]: No longer supported, please use an alternative and newer version.