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<int64> 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": 0
}
}
|
Name |
Description |
|
context |
Type: ChatContextDTO Information about the order or refund for which the chat was started. |
|
orderId ⦸
|
Type: integer<int64> The order ID on the Market. |
ChatContextDTO
Information about the order or refund for which the chat was started.
|
Name |
Description |
|
id* |
Type: integer<int64> The order or refund ID. Min value: |
|
type* |
Type: ChatContextIdentifiableType Chat type:
For more information about chats on orders and refunds, see Yandex.Market Help for sellers. Enum: |
ChatContextIdentifiableType
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.
|
Type |
Description |
|
Enum: |
Responses
200 OK
Information about a new or previously created chat.
Body
application/json
{
"status": "OK",
"result": {
"chatId": 0
}
}
|
Name |
Description |
|
status* |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
|
result |
Type: CreateChatResultDTO Information about the created chat. |
ApiResponseStatusType
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
|
Type |
Description |
|
Enum: |
CreateChatResultDTO
Information about the created chat.
|
Name |
Description |
|
chatId* |
Type: integer<int64> The chat ID. Min value: |
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. Min items: |
|
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
|
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
|
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
404 Not Found
The requested resource was not found. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
|
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
|
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
500 Internal Server Error
Internal error in 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. Min items: |
|
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.