Chats with customers

Yandex Market API allows you to communicate with your customers in chat rooms.

What are the types of chats:

How to check if there are new chats or messages

Via API notifications:

Yandex.Market will send you a request. POST notification when a new chat or message appears:

Through the main API:

To receive messages, use the following methods:

How to reply to a message

  1. Find the chats where your answer is needed. To do this, make a request POST v2/businesses/{businessId}/chats. In the request, send the status "Store response needed" ("statuses": ["WAITING_FOR_PARTNER"]).

  2. To get the chat message history, use a request POST v2/businesses/{businessId}/chats/history, where pass the chat ID.

  3. Send a message using a request POST v2/businesses/{businessId}/chats/message. If you need to send a file to the buyer — for example, an additional product photo — use a request POST v2/businesses/{businessId}/chats/file/send.

How to start a chat

  1. You can start a new chat and get its ID using a request. POST v2/businesses/{businessId}/chats/new. If the chat with the transmitted context already exists, the ID of this chat will be returned.

    How to start a test chat

    In the debugging interface, create a test order, and then click Create a test chat or make a request POST v2/businesses/{businessId}/chats/new.

    Learn more about working with test orders

    Please note:

    • such a chat can only be created for an order, not a refund;

    • There are no customer responses in the test chats.

  2. Send a message with a request POST v2/businesses/{businessId}/chats/message. If you need to send a file to the buyer — for example, an additional product photo — use a request POST v2/businesses/{businessId}/chats/file/send.

  3. Check new messages from the buyer. — POST v2/businesses/{businessId}/chats/history. Use a filter based on the ID of the last message in the request to receive only new messages and not re-upload those that you already have.