Getting the chat message history

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
  • communication — Customer communication
  • all-methods — Full account management
  • all-methods:read-only — View all data

Returns the history of messages in the chat with the buyer.

⚙️ Limit: 10,000 requests per hour

Request

POST

https://api.partner.market.yandex.ru/v2/businesses/{businessId}/chats/history

Path parameters

Name

Description

businessId

Type: integer

Cabinet ID. To find out, use the request GET v2/campaigns.

ℹ️ What is a cabinet and a store on the Market?

Min value: 1

Query parameters

Name

Description

chatId

Type: integer

The chat ID.

Min value: 1

limit

Type: integer

The number of values per page.

Min value: 1

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
{
  "messageIdFrom": 1
}

Name

Description

messageIdFrom

Type: integer

The ID of the message to receive all subsequent messages from.

Min value: 1

Responses

200 OK

Message history.

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

404 Not Found

The requested resource was not found. 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 of the Market. More information about the error

Body

application/json
{
  "status": "OK"
}

Type: object

pathParams:
  - description: "Cabinet ID. To find out, use the request [GET\_v2/campaigns](../../reference/campaigns/getCampaigns.md).\n\nℹ️ [What is a cabinet and a store on the Market?](https://yandex.ru/support/marketplace/account/introduction.html)\n"
    name: businessId
    in: path
    required: true
    schema:
      type: integer
      format: int64
      minimum: 1
searchParams:
  - description: The chat ID.
    name: chatId
    in: query
    required: true
    schema:
      type: integer
      format: int64
      minimum: 1
  - 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: |-
  {
    "messageIdFrom": 1
  }
schema:
  description: >
    Which chat history should I get? — and starting from which
    message.
  type: object
  properties:
    messageIdFrom:
      description: The ID of the message to receive all subsequent messages from.
      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

No longer supported, please use an alternative and newer version.

For example, Please do not ask customers for contacts, do not send links to other sites. We see the correspondence and hide the goods from the showcase when the rules of communication in chat rooms are violated.