Chat

Получить карточку вложения

Changed on

Отдаёт метаданные и статус проверки. Некорректный id вложения не отличается от отсутствующего и даёт 404.

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

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
attachmentId, string uuid required

Headers

X-Tenant, string required

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

Response

Карточка вложения

ChatForwardedAttachment required
id, string uuid required
conversation_id, string uuid required
message_id, string uuid nullable required
original_name, string required
content_type, string required
size_bytes, integer required
sha256_hex, string required
media_kind, 'voice' | 'video_circle' | 'image' | 'video' | 'file' required
duration_ms, integer nullable required
waveform, integer[] required
status, 'quarantined' | 'ready' | 'failed' | 'deleted' required
scan_status, 'pending' | 'clean' | 'infected' | 'unavailable' | 'skipped' required
scan_error_code, string
created_at, string date-time required
content_url, string required
image_width, integer

Ширина фото на экране в пикселях (с поворотом EXIF), измеренная при загрузке. Только у media_kind=image и только вместе с image_height; нет — старое вложение или HEIF/AVIF, клиент измеряет картинку сам

image_height, integer

Высота фото на экране в пикселях; пара к image_width. По пропорции клиент резервирует место под фото до загрузки картинки

Example response

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

Changes

    • info

      added the optional property image_height to the response with the status

    • info

      added the optional property image_width to the response with the status

    • info

      added the optional property field to the response with the status

    5 more changes in this revision