---
metadata:
  - name: generator
    content: Diplodoc Platform v5.55.0
alternate:
  - https://yandex.com/dev/market/partner-api/doc/en/reference/chats/getChatHistory.md
  - https://yandex.com/dev/market/partner-api/doc/ru/reference/chats/getChatHistory.md
  - https://yandex.com/dev/market/partner-api/doc/zh/reference/chats/getChatHistory.md
  - href: zh/reference/chats/getChatHistory.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/chats/getChatHistory.md -->
<div class="openapi">

# 获取聊天消息历史记录

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

{% list tabs %}

- Info

  
  <!-- source: zh/_auto/method_scopes/getChatHistory.md -->
  **方法适用于模式：[FBY, FBS, Express 和 DBS](https://yandex.com/dev/market/partner-api/doc/zh/overview/business.md).**

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

  * communication — [与买家沟通](https://yandex.com/dev/market/partner-api/doc/zh/_auto/scopes_summary/pages/communication.md)
  * all-methods — 全面管理账户
  * all-methods:read-only — 查看所有数据

  {% endcut %}
  <!-- endsource: zh/_auto/method_scopes/getChatHistory.md -->
  
  
  返回与买家聊天中消息的历史记录。
  
  
  <!-- source: zh/_auto/method_limits/getChatHistory.md -->
  |<div style="text-align: left;">**⚙️ 限额:** 10 000 请求 每小时</div>|
  |-|
  <!-- endsource: zh/_auto/method_limits/getChatHistory.md -->
  
  
  
  ## 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/businesses/{businessId}/chats/history
  ```
  
  </div>
  
  </div>
  
  </div>
  
  ### Path parameters
  
  #|
  || **Name** | **Description** ||
  ||
  
  _businessId_{.json-schema-reset .json-schema-property .json-schema-required}
  {.table-cell}|
  **Type**: integer
  
  内阁ID。
  
  
  
  
  
  _Min value:_{.json-schema-reset .json-schema-assertion} `1`
  {.table-cell}
  ||
  |#{.json-schema-properties}
  
  ### Query parameters
  
  #|
  || **Name** | **Description** ||
  ||
  
  _chatId_{.json-schema-reset .json-schema-property .json-schema-required}
  {.table-cell}|
  **Type**: integer
  
  的聊天ID。
  
  _Min value:_{.json-schema-reset .json-schema-assertion} `1`
  {.table-cell}
  ||
  ||
  
  _limit_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer
  
  每页的值数。
  
  
  _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
  {
    "messageIdFrom": 1
  }
  ```
  
  {% endcut %}
  
  #|
  || **Name** | **Description** ||
  ||
  
  _messageIdFrom_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer
  
  从接收所有后续消息的消息的ID。
  
  _Min value:_{.json-schema-reset .json-schema-assertion} `1`
  {.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": {
      "orderId": 0,
      "context": {
        "type": "ORDER",
        "customer": {
          "name": "example",
          "publicId": "example"
        },
        "campaignId": 1,
        "orderId": 1,
        "returnId": 1
      },
      "messages": [
        {
          "messageId": 1,
          "createdAt": "2017-11-21T00:00:00+03:00",
          "sender": "PARTNER",
          "message": "example",
          "payload": [
            null
          ]
        }
      ],
      "paging": {
        "nextPageToken": "example"
      }
    }
  }
  ```
  
  {% 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" %}
  
    #|
    ||
  
    _context_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    {% cut "**Type**: object" %}
  
    #|
    ||
  
    _type_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: string
  
    上下文类型:
  
    * `ORDER` — 根据要求聊天。 [关于订单和退款的聊天](https://yandex.ru/support/marketplace/ru/orders/communication/about-orders)
    * `RETURN` — 退款聊天(FBY, FBS 和 Express). [关于订单和退款的聊天](https://yandex.ru/support/marketplace/ru/orders/communication/about-orders)
    * `DIRECT` — 客户开始的聊天。 [来自客户的信息](https://yandex.ru/support/marketplace/ru/orders/communication/with-users)
  
  
    _Enum:_{.json-schema-reset .json-schema-value} `ORDER`, `RETURN`, `DIRECT`
    {.table-cell}
    ||
    ||
  
    _campaignId_{.json-schema-reset .json-schema-property}
    {.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}
    ||
    ||
  
    _customer_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    {% cut "**Type**: object" %}
  
    #|
    ||
  
    _name_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    **Type**: string
  
    买方在Yandex Passport中的公开名称，显示在Yandex服务中。
  
  
    _Min length:_{.json-schema-reset .json-schema-assertion} `1`
  
    _Example:_{.json-schema-reset .json-schema-example} `example`
    {.table-cell}
    ||
    ||
  
    _publicId_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    **Type**: string
  
    Yandex Passport中的公共用户ID。
  
  
    {% cut "Примеры, где используется" %}
  
  
    * 市场: `https://market.yandex.ru/user/{public-id}/reviews`
    * 禅宗: `https://zen.yandex.ru/user/{public-id}`
    * 检讨报告: `https://yandex.ru/user/{public-id}`
  
  
    {% endcut %}
  
  
    阅读更多关于公共数据的信息 [Yandex ID文档](https://yandex.ru/support/id/ru/data/public-data).
  
  
    _Min length:_{.json-schema-reset .json-schema-assertion} `1`
  
    _Example:_{.json-schema-reset .json-schema-example} `example`
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    聊天中有关买家的信息。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "name": "example",
      "publicId": "example"
    }
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    ||
  
    _orderId_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    **Type**: integer
  
    的订单ID。
  
    它被退回的订单和退款。
  
  
    _Min value:_{.json-schema-reset .json-schema-assertion} `1`
    {.table-cell}
    ||
    ||
  
    _returnId_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    **Type**: integer
  
    退款ID。
  
    它仅用于退款。
  
  
    _Min value:_{.json-schema-reset .json-schema-assertion} `1`
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    有关开始聊天的订单或退款的信息。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "type": "ORDER",
      "customer": {
        "name": "example",
        "publicId": "example"
      },
      "campaignId": 1,
      "orderId": 1,
      "returnId": 1
    }
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    ||
  
    _messages_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    {% cut "**Type**: object[]" %}
  
    #|
    ||
  
    _createdAt_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: string&lt;date-time&gt;
  
    创建消息的日期和时间。
  
    日期格式: ISO 8601 具有相对于 UTC.
  
  
    _Example:_{.json-schema-reset .json-schema-example} `2017-11-21T00:00:00+03:00`
    {.table-cell}
    ||
    ||
  
    _messageId_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: integer
  
    消息的ID。
  
    _Min value:_{.json-schema-reset .json-schema-assertion} `1`
    {.table-cell}
    ||
    ||
  
    _sender_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: string
  
    谁发的消息:
  
    * `PARTNER` — 商店。
    * `CUSTOMER` — 买方。
    * `MARKET` — 燕基科斯. 市场（[自动消息](*market-notification)).
    * `SUPPORT` — Yandex的员工。市场支持服务。
  
  
    _Enum:_{.json-schema-reset .json-schema-value} `PARTNER`, `CUSTOMER`, `MARKET`, `SUPPORT`
    {.table-cell}
    ||
    ||
  
    _message_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    **Type**: string
  
    消息的文本。
  
    如果返回参数，可选参数 `payload`.
  
  
    _Example:_{.json-schema-reset .json-schema-example} `example`
    {.table-cell}
    ||
    ||
  
    _payload_{.json-schema-reset .json-schema-property}
    {.table-cell}|
    {% cut "**Type**: object[]" %}
  
    #|
    ||
  
    _name_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: string
  
    的文件名。
  
    _Example:_{.json-schema-reset .json-schema-example} `example`
    {.table-cell}
    ||
    ||
  
    _size_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: integer
  
    以字节为单位的文件大小。
    {.table-cell}
    ||
    ||
  
    _url_{.json-schema-reset .json-schema-property .json-schema-required}
    {.table-cell}|
    **Type**: string
  
    _Min length:_{.json-schema-reset .json-schema-assertion} `1`
  
    _Max length:_{.json-schema-reset .json-schema-assertion} `2000`
  
    _Example:_{.json-schema-reset .json-schema-example} `example`
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    附加到消息的文件的信息。
  
    如果返回参数，可选参数 `message`.
  
  
    _Min items:_{.json-schema-reset .json-schema-assertion} `1`
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    [
      {
        "name": "example",
        "url": "example",
        "size": 0
      }
    ]
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    消息的信息。
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    [
      {
        "messageId": 1,
        "createdAt": "2017-11-21T00:00:00+03:00",
        "sender": "PARTNER",
        "message": "example",
        "payload": [
          {
            "name": "example",
            "url": "example",
            "size": 0
          }
        ]
      }
    ]
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    ||
  
    _orderId_{.json-schema-reset .json-schema-property .json-schema-deprecated}_[ ](*Deprecated)_{.openapi-deprecated .openapi-deprecated-compact}
    {.table-cell}|
    **Type**: integer
  
  
    {% note warning "Параметр устарел и будет отключен 12.10.2026." %}
  
  
    相反，使用 `context`.
  
  
    {% endnote %}
  
  
    的订单ID。
  
    {.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
    {
      "orderId": 0,
      "context": {
        "type": "ORDER",
        "customer": {
          "name": "example",
          "publicId": "example"
        },
        "campaignId": 1,
        "orderId": 1,
        "returnId": 1
      },
      "messages": [
        {
          "messageId": 1,
          "createdAt": "2017-11-21T00:00:00+03:00",
          "sender": "PARTNER",
          "message": "example",
          "payload": [
            {
              "name": "example",
              "url": "example",
              "size": 0
            }
          ]
        }
      ],
      "paging": {
        "nextPageToken": "example"
      }
    }
    ```
  
    {% endcut %}
    {.table-cell}
    ||
    |#{.json-schema-properties}
  
    {% endcut %}
  
    {% cut "**Example**" %}{.json-schema-example}
  
    ```json translate=no
    {
      "result": {
        "orderId": 0,
        "context": {
          "type": "ORDER",
          "customer": {
            "name": "example",
            "publicId": "example"
          },
          "campaignId": 1,
          "orderId": 1,
          "returnId": 1
        },
        "messages": [
          {
            "messageId": 1,
            "createdAt": "2017-11-21T00:00:00+03:00",
            "sender": "PARTNER",
            "message": "example",
            "payload": [
              {}
            ]
          }
        ],
        "paging": {
          "nextPageToken": "example"
        }
      }
    }
    ```
  
    {% 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#400)
  
  <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__404">
  
  ## 404 Not Found
  
  找不到请求的资源。 [有关错误的更多信息](https://yandex.com/dev/market/partner-api/doc/zh/concepts/error-codes.md#404)
  
  <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。\n\n\n:::no-translate\n{% if audience == \"partner\" %}\n:::\n\n\n要找到答案，请使用请求 [GET\_v2/campaigns](../../reference/campaigns/getCampaigns.md).\n\nℹ️ [什么是市场上的橱柜和商店？](https://yandex.ru/support/marketplace/account/introduction.html)\n\n\n:::no-translate\n{% endif %}\n:::\n\n"
      name: businessId
      in: path
      required: true
      schema:
        type: integer
        format: int64
        minimum: 1
  searchParams:
    - description: 的聊天ID。
      name: chatId
      in: query
      required: true
      schema:
        type: integer
        format: int64
        minimum: 1
    - name: pageToken
      description: |
        结果页面的ID。
  
        如果省略该参数，则返回第一页。
  
        传递输出参数的值 `nextPageToken`，在最后一次请求期间接收。
      in: query
      required: false
      x-transform: token
      x-aliases:
        - pageToken
        - page_token
      schema:
        type: string
    - name: limit
      description: |
        每页的值数。
      in: query
      required: false
      schema:
        type: integer
        format: int32
        minimum: 1
        default: 50
        maximum: 100
  headers: []
  body: |-
    {
      "messageIdFrom": 1
    }
  schema:
    description: |
      我应该获得哪些聊天记录？ — 并从哪个消息开始。
    type: object
    properties:
      messageIdFrom:
        description: 从接收所有后续消息的消息的ID。
        type: integer
        format: int64
        minimum: 1
  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/businesses/{businessId}/chats/history
  host: https://api.partner.market.yandex.ru
  
  ```
        

{% endlist %}


</div>
<!-- endsource: zh/api/chats/getChatHistory.md -->

[*market-notification]: 
例如, `请不要向客户询问联系人，不要发送链接到其他网站。 当聊天室的通信规则被违反时，我们会看到通信并将商品隐藏在展示柜中。`

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