Chat

Получить доступный чат

Changed on

Недоступный, покинутый и отсутствующий чат одинаково возвращают 404.

get/api/v1/chat/conversations/{id}

Request

  • Base URL
    https://erp.akeda.ru
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://erp.akeda.ru/oauth2/authorize
      Token URLhttps://erp.akeda.ru/oauth2/token
      Scopesakeda:delegate

Path parameters

id, string uuid required

Headers

X-Tenant, string required

Slug выбранного кабинета; кабинет не является юрлицом

Response

Чат и вычисленные server capabilities

ChatConversation required
id, string uuid required
type, 'direct' | 'group' | 'system' required
status, 'active' | 'archived' required
title, string required
description, string required
new_member_history, boolean

Новый участник группы видит прежнюю переписку

group_settings, ChatGroupSettings
last_seq, integer required
last_message_id, string uuid nullable required
preview, ChatMessage
last_message_at, string date-time nullable required
created_at, string date-time required
updated_at, string date-time required
capabilities, ChatConversationCapabilities
unread_count, integer required
first_unread_seq, integer nullable required
manual_unread_seq, integer nullable required
notification_mode, string required
notification_muted_until, string date-time nullable

До какого момента беседа молчит, если звук выключен на время: пока срок не вышел, notification_mode = muted. После срока поле пустое, а режим снова прежний

support_request, ChatSupportRequest

Заявка поддержки у беседы задачи-заявки (ERP-2152): по ней беседа относится к пространству «Поддержка», а не к «Чатам задач». У остальных бесед поля нет

support_open_requests, integer

У личного чата «Техническая поддержка»: сколько обращений человека сейчас открыто (ERP-2152). Ноль — перед отправкой выбирают тему нового обращения. У остальных бесед поля нет

support_ticket, object

У беседы обращения (ERP-2988): номер заявки, статус, тема и первая строка — шапка беседы у человека. Пока обращение не родилось, поля нет

notification_mode_after_mute, 'all' | 'mentions' | 'null' nullable

Какой режим вернётся, когда выйдет срок «без звука»; есть только пока срок идёт. По нему «Включить звук» возвращает прежний выбор

mention_count, integer required
origin, string
origin_ref, string uuid nullable
last_read_seq, integer
others_read_seq, integer
has_avatar, boolean
avatar_url, string
peer_user_id, integer nullable
peer_avatar_url, string
archived_at, string date-time nullable

Личный архив текущего участника (SUP-336): когда чат убран из его списка. Пусто — чат в списке; новое сообщение снимает отметку

Example response

{
  "preview": {
    "attachments": [
      {
        "content_url": "/api/v1/chat/attachments/00000000-0000-0000-0000-000000000001/content"
      }
    ]
  }
}

Changes

    • info

      added the optional property archived_at to the response with the status

    • info

      added the optional property capabilities/canManageGreeting to the response with the status

    • info

      added the optional property capabilities/canManageSettings to the response with the status

    3 more changes in this revision