CRM inbox

Завершить загрузку файла для сообщения диалога

Changed on

Проверяет, что файл лёг по выданному адресу: размер, контрольную сумму (если заявлена) и антивирус; подменённый после проверки файл отклоняется. Затем заводит загрузку с номером сессии — её id передаётся в upload_ids при отправке crmSendInboxMessage. Загрузка живёт сутки. Повтор возвращает ту же загрузку. 409 transfer.not_uploaded — байтов ещё нет; 422 transfer.infected — найдена угроза, файл удалён; 503 transfer.scanner_unavailable — антивирус недоступен, повторите позже.

post/api/v1/crm/inbox/upload-sessions/{id}/finish

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

Загрузка для сообщения

CRMInboxOutboundUpload required
id, string uuid required
conversation_id, string uuid required
filename, string required
content_type, string required
size_bytes, integer required
sha256, string

Контрольная сумма, посчитанная на завершении сессии; у загрузки формой её нет

scan_status, 'pending' | 'clean' | 'infected' | 'skipped' required

Вердикт антивируса: clean — файл прошёл сессию загрузки; skipped — антивирус его не проверял (форма или файл до проверок). Ссылку на скачивание получают только clean и skipped

expires_at, string date-time required

Changes

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    11 more changes in this revision