Creating a new chat with a customer
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
Creates a new chat with the customer and returns information about him or the previously created one.
Types of chats that the seller can start:
- by orders;
- for refunds (available only for FBY-, FBS- and Express-stores).
| ⚙️ Limit: 1,000 requests per hour |
|---|
Request
POST
https://api.partner.market.yandex.ru/v2/businesses/{businessId}/chats/new
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: |
Body
application/json
{
"orderId": 0,
"context": {
"type": "ORDER",
"id": 1
}
}
|
Name |
Description |
||||
|
context |
Type: object
Information about the order or refund for which the chat was started. Example
|
||||
|
orderId |
Type: integer The order ID on the Market. |
Responses
200 OK
Information about a new or previously created chat.
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 in Yandex. 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: []
headers: []
body: |-
{
"orderId": 0,
"context": {
"type": "ORDER",
"id": 1
}
}
schema:
description: |
The order for which you need to create a chat.
type: object
properties:
orderId:
description: The order ID on the Market.
type: integer
format: int64
deprecated: true
context:
description: Information about the order or refund for which the chat was started.
type: object
required:
- type
- id
properties:
type:
description: >
Chat type:
* `ORDER` — by orders.
* `RETURN` — on refunds
(FBY, FBS and Express).
For more information about chats on orders and refunds, see
[Yandex.Market Help for
sellers](https://yandex.ru/support/marketplace/ru/orders/communication/about-orders).
type: string
enum:
- ORDER
- RETURN
id:
description: The order or refund 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/new
host: https://api.partner.market.yandex.ru
No longer supported, please use an alternative and newer version.