Bank Incoming Letters API
OpenAPI 1.0.0
API Входящих писем в банк
Варианты
- Public
Операции API
POST /v1/correspondences — Creating of correspondence
Метод создания переписки
{
"description": "Метод создания переписки",
"operationId": "createCorrespondence",
"parameters": [
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"docData": {
"account": "12345678901234567000",
"bic": "123456789",
"docDate": "2021-07-10",
"docNumber": "12345",
"inn": "123412341234",
"kpp": "123456789",
"orgName": "ООО Компания"
},
"docExtId": "123456",
"text": "Текст письма",
"topicId": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510"
},
"schema": {
"$ref": "#/components/schemas/CreateExternalCorrespondenceRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"example": {
"correspondenceId": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"mailId": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510"
},
"schema": {
"$ref": "#/components/schemas/CreateExternalCorrespondenceResponse"
}
}
},
"description": "Created"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"409": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Conflict"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Creating of correspondence",
"tags": [
"Correspondences"
]
}POST /v1/correspondences/query — Searching for correspondences
Метод получения списка переписок организации с фильтрацией, сортировкой и постраничной навигацией. Письма и вложения в ответе не возвращаются, статус прочтения писем не изменяется.
{
"description": "Метод получения списка переписок организации с фильтрацией, сортировкой и постраничной навигацией. Письма и вложения в ответе не возвращаются, статус прочтения писем не изменяется.",
"operationId": "searchCorrespondences",
"parameters": [
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"filter": {
"accounts": [
"12345678901234567890"
],
"createdAt": {
"from": "2026-07-01T00:00:00Z",
"to": "2026-08-01T00:00:00Z"
},
"directions": [
"TO_BANK"
],
"organization": {
"inn": "7707083893"
},
"statuses": [
"OPEN"
]
},
"paging": {
"limit": 50,
"offset": 0
},
"sort": {
"direction": "DESC",
"field": "UPDATED_AT"
}
},
"schema": {
"$ref": "#/components/schemas/SearchCorrespondencesRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"items": [
{
"account": "12345678901234567890",
"createdAt": "2026-07-10T06:53:37Z",
"direction": "TO_BANK",
"id": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"senderFirstName": "Иван",
"senderLastName": "Иванов",
"senderMiddleName": "Иванович",
"status": "OPEN",
"topic": {
"clarification": "Другие вопросы",
"product": "Торговое финансирование",
"theme": "Заявки"
},
"updatedAt": "2026-07-11T09:15:02Z"
}
],
"paging": {
"hasNext": false,
"limit": 50,
"offset": 0
}
},
"schema": {
"$ref": "#/components/schemas/SearchCorrespondencesResponse"
}
}
},
"description": "OK"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Searching for correspondences",
"tags": [
"Correspondences"
]
}GET /v1/correspondences/{id} — Getting of correspondence
Метод получения переписки из банка по идентификатору. Устарел, используйте GET /api/external/v2/correspondences/{id}
{
"deprecated": true,
"description": "Метод получения переписки из банка по идентификатору. Устарел, используйте GET /api/external/v2/correspondences/{id}",
"operationId": "getCorrespondence",
"parameters": [
{
"description": "Идентификатор переписки",
"in": "path",
"name": "id",
"required": true,
"schema": {
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
}
},
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"account": "123456789",
"correspondenceMails": [
{
"attachments": [
{
"name": "file.txt",
"number": 1
}
],
"createdAt": "2021-07-10T06:53:37Z",
"id": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"number": 1,
"senderFirstName": "Иван",
"senderLastName": "Иванов",
"senderMiddleName": "Иванович",
"text": "Текст письма",
"type": "TO_BANK",
"updatedAt": "2021-07-10T06:53:37Z"
}
],
"createdAt": "2021-07-10T06:53:37Z",
"id": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"senderFirstName": "Иван",
"senderLastName": "Иванов",
"senderMiddleName": "Иванович",
"status": "CLOSED",
"topicId": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"updatedAt": "2021-07-10T06:53:37Z"
},
"schema": {
"$ref": "#/components/schemas/GetExternalCorrespondenceResponse"
}
}
},
"description": "OK"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Not found"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Getting of correspondence",
"tags": [
"Correspondences"
]
}POST /v1/mails — Creating a mail in correspondence
Метод создания письма в переписке
{
"description": "Метод создания письма в переписке",
"operationId": "createMail",
"parameters": [
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"correspondenceId": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"docExtId": "123456",
"parentMailId": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"text": "Текст письма"
},
"schema": {
"$ref": "#/components/schemas/CreateExternalMailRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"example": {
"mailId": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510"
},
"schema": {
"$ref": "#/components/schemas/CreateExternalMailResponse"
}
}
},
"description": "Created"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Not found"
},
"409": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Conflict"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Creating a mail in correspondence",
"tags": [
"Mails"
]
}POST /v1/mails/{mailId}/attachments — Uploading attachments by mail identifier
Метод загрузки вложений по идентификатору письма (ограничение 50 MB)
{
"description": "Метод загрузки вложений по идентификатору письма (ограничение 50 MB)",
"operationId": "uploadAttachments",
"parameters": [
{
"description": "Идентификатор письма",
"in": "path",
"name": "mailId",
"required": true,
"schema": {
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
}
},
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"files": {
"description": "Список файлов для загрузки",
"items": {
"format": "binary",
"type": "string"
},
"type": "array"
}
},
"required": [
"files"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Not found"
},
"409": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Conflict"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Uploading attachments by mail identifier",
"tags": [
"Mails"
]
}GET /v1/mails/{mailId}/attachments/{fileName} — Retrieving of an attachment by mail identifier and attachment name
Метод получения вложения письма по идентификатору письма и имени файла вложения
{
"description": "Метод получения вложения письма по идентификатору письма и имени файла вложения",
"operationId": "getAttachment",
"parameters": [
{
"description": "Идентификатор письма",
"in": "path",
"name": "mailId",
"required": true,
"schema": {
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
}
},
{
"description": "Имя файла вложения",
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"example": "file.pdf",
"type": "string"
}
},
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"responses": {
"200": {
"content": {
"application/octet-stream": {
"schema": {
"format": "binary",
"type": "string"
}
}
},
"description": "OK",
"headers": {
"Content-Disposition": {
"required": true,
"schema": {
"example": "attachment; filename=example.txt",
"type": "string"
}
},
"Content-Type": {
"required": true,
"schema": {
"example": "application/pdf",
"type": "string"
}
}
}
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Not found"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Retrieving of an attachment by mail identifier and attachment name",
"tags": [
"Mails"
]
}HEAD /v1/mails/{mailId}/attachments/{fileName} — Retrieving of an attachment info
Метод получения информации о вложении без загрузки содержимого
{
"description": "Метод получения информации о вложении без загрузки содержимого",
"operationId": "getAttachmentInfo",
"parameters": [
{
"description": "Идентификатор письма",
"in": "path",
"name": "mailId",
"required": true,
"schema": {
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
}
},
{
"description": "Имя файла вложения",
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"example": "file.pdf",
"type": "string"
}
},
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"responses": {
"200": {
"description": "Файл найден, возвращены только заголовки",
"headers": {
"Content-Length": {
"description": "Размер файла в байтах",
"schema": {
"example": 1024,
"type": "integer"
}
},
"Content-Type": {
"description": "Тип файла",
"schema": {
"example": "application/pdf",
"type": "string"
}
}
}
},
"400": {
"description": "Bad Request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"description": "Not found"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Retrieving of an attachment info",
"tags": [
"Mails"
]
}POST /v1/mails/{mailId}/submit — Signing a mail
Метод отправления письма
{
"deprecated": true,
"description": "Метод отправления письма",
"operationId": "submitMail",
"parameters": [
{
"description": "Идентификатор письма",
"in": "path",
"name": "mailId",
"required": true,
"schema": {
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
}
},
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"digestName": "SHA-256",
"digestVersion": "v1",
"fio": "Иванов Иван Иванович",
"issuer": "E=IdleCA, C=RU, S=Idle CA, L=Idle CA, O=Idle CA, OU=Idle CA, CN=Idle CA",
"position": "Генеральный директор",
"serialNumber": "123456789",
"value": "SGVsbG8="
},
"schema": {
"$ref": "#/components/schemas/SubmitExternalMailRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Not found"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Signing a mail",
"tags": [
"Mails"
]
}GET /v1/topics — Retrieving a list of topics
Метод получения тем переписок
{
"description": "Метод получения тем переписок",
"operationId": "getTopics",
"parameters": [
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExternalTopicsResponse"
}
}
},
"description": "OK"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Retrieving a list of topics",
"tags": [
"Topics"
]
}GET /v2/correspondences/{id} — Getting correspondence v2
Метод получения переписки по идентификатору с поддержкой произвольной тематики и переписок без счета
{
"description": "Метод получения переписки по идентификатору с поддержкой произвольной тематики и переписок без счета",
"operationId": "getCorrespondenceV2",
"parameters": [
{
"description": "Идентификатор переписки",
"in": "path",
"name": "id",
"required": true,
"schema": {
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
}
},
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetExternalCorrespondenceV2Response"
}
}
},
"description": "OK"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Forbidden"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Not found"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Getting correspondence v2",
"tags": [
"Correspondences"
]
}POST /v2/mails/{mailId}/submit — Signing a mail
Метод отправления письма. Поддерживается только тип подписи SINGLE.
{
"description": "Метод отправления письма. Поддерживается только тип подписи SINGLE.",
"operationId": "submitMailV2",
"parameters": [
{
"description": "Идентификатор письма",
"in": "path",
"name": "mailId",
"required": true,
"schema": {
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
}
},
{
"$ref": "#/components/parameters/AuthorizationHeader"
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"digestName": "SHA-256",
"digestVersion": "v1",
"fio": "Иванов Иван Иванович",
"issuer": "E=IdleCA, C=RU, S=Idle CA, L=Idle CA, O=Idle CA, OU=Idle CA, CN=Idle CA",
"position": "Генеральный директор",
"serialNumber": "123456789",
"value": "SGVsbG8="
},
"schema": {
"$ref": "#/components/schemas/SubmitExternalMailRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Not found"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"security": [
{
"RaifApiAuthorization": [],
"RaifApiIdToken": []
}
],
"servers": [
{
"url": "https://api.raiffeisen.ru/letters"
}
],
"summary": "Signing a mail",
"tags": [
"Mails"
]
}Схемы и примеры
{
"parameters": {
"AuthorizationHeader": {
"description": "Токен доступа",
"in": "header",
"name": "Authorization",
"required": true,
"schema": {
"example": "Bearer QXV0aG9yaXphdGlvbiBIZWFkZXIgRm9yIFRlc3Rpbmc=",
"format": "byte",
"type": "string"
}
},
"IdTokenHeader": {
"description": "Идентификационный токен пользователя",
"in": "header",
"name": "Id-Token",
"required": true,
"schema": {
"example": "SUQgVE9LRU4gRk9SIFRFU1RJTkc=",
"format": "byte",
"type": "string"
}
}
},
"responses": {
"InternalError": {
"description": "Внутренняя ошибка"
},
"Unauthorized": {
"description": "Аутентификация не пройдена"
}
},
"schemas": {
"CreateExternalCorrespondenceRequest": {
"properties": {
"docData": {
"$ref": "#/components/schemas/ExternalDocData"
},
"docExtId": {
"description": "Идентификатор документа",
"example": "123456",
"type": "string"
},
"text": {
"description": "Текст письма",
"example": "Текст письма",
"maxLength": 4000,
"minLength": 1,
"pattern": ".*(\\S|\\n).*",
"type": "string"
},
"topicId": {
"description": "Идентификатор темы письма",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
}
},
"required": [
"docData",
"docExtId",
"topicId",
"text"
],
"type": "object"
},
"CreateExternalCorrespondenceResponse": {
"properties": {
"correspondenceId": {
"description": "Идентификатор переписки",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
},
"mailId": {
"description": "Идентификатор первого письма",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
}
},
"required": [
"correspondenceId",
"mailId"
]
},
"CreateExternalMailRequest": {
"properties": {
"correspondenceId": {
"description": "Идентификатор переписки",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
},
"docExtId": {
"description": "Идентификатор документа",
"example": "123456",
"type": "string"
},
"parentMailId": {
"description": "Идентификатор родительского письма",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
},
"text": {
"description": "Текст письма",
"example": "Текст письма",
"maxLength": 4000,
"minLength": 1,
"pattern": ".*(\\S|\\n).*",
"type": "string"
}
},
"required": [
"correspondenceId",
"parentMailId",
"text",
"docExtId"
],
"type": "object"
},
"CreateExternalMailResponse": {
"properties": {
"mailId": {
"description": "Идентификатор письма",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
}
},
"required": [
"mailId"
],
"type": "object"
},
"Date": {
"description": "yyyy-MM-dd",
"example": "2021-07-10",
"pattern": "([0-9]{4})-([0-9]{2})-([0-9]{2})",
"type": "string"
},
"DateTime": {
"description": "Дата и время в UTC в формате yyyy-MM-dd'T'HH:mm:ss'Z'",
"example": "2021-07-10T06:53:37Z",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
"type": "string"
},
"DateTimeRange": {
"description": "Диапазон дат. Граница from включается в выборку, граница to — исключается",
"example": {
"from": "2026-07-01T00:00:00Z",
"to": "2026-08-01T00:00:00Z"
},
"properties": {
"from": {
"$ref": "#/components/schemas/DateTimeWithOffset",
"description": "Начало диапазона (включительно)"
},
"to": {
"$ref": "#/components/schemas/DateTimeWithOffset",
"description": "Конец диапазона (исключительно)"
}
},
"type": "object"
},
"DateTimeWithOffset": {
"description": "Дата и время в формате ISO 8601 с обязательным указанием часового пояса — UTC (`Z`) или смещения (`±hh:mm`). Дробная часть секунды необязательна",
"example": "2026-07-10T09:53:37.123456+03:00",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$",
"type": "string"
},
"ErrorResponse": {
"description": "Ошибка обработки запроса",
"example": {
"error": {
"code": "BAD_REQUEST",
"message": "Validation failed"
},
"message": "Validation failed"
},
"properties": {
"error": {
"description": "Структурированная информация об ошибке",
"example": {
"code": "VALIDATION_ERROR",
"message": "Validation failed"
},
"properties": {
"code": {
"description": "Машиночитаемый код ошибки",
"example": "VALIDATION_ERROR",
"type": "string"
},
"message": {
"description": "Описание ошибки",
"example": "Validation failed",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"message": {
"description": "Текст ошибки в устаревшем формате, сохранённый для обратной совместимости",
"example": "Validation failed",
"type": "string"
}
},
"required": [
"error"
],
"type": "object"
},
"ExternalCorrespondenceCard": {
"description": "Краткая карточка переписки без писем и вложений",
"properties": {
"account": {
"description": "Номер счёта. Отсутствует, если переписка создана без привязки к счёту",
"example": "12345678901234567890",
"nullable": true,
"type": "string"
},
"createdAt": {
"$ref": "#/components/schemas/ExternalSearchDateTime",
"description": "Время создания переписки"
},
"direction": {
"$ref": "#/components/schemas/ExternalCorrespondenceDirection",
"description": "Направление переписки"
},
"id": {
"description": "Идентификатор переписки",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
},
"senderFirstName": {
"description": "Имя инициатора переписки",
"example": "Иван",
"type": "string"
},
"senderLastName": {
"description": "Фамилия инициатора переписки",
"example": "Иванов",
"type": "string"
},
"senderMiddleName": {
"description": "Отчество инициатора переписки",
"example": "Иванович",
"nullable": true,
"type": "string"
},
"status": {
"$ref": "#/components/schemas/ExternalCorrespondenceStatus",
"description": "Статус переписки"
},
"topic": {
"$ref": "#/components/schemas/ExternalCorrespondenceTopic"
},
"updatedAt": {
"$ref": "#/components/schemas/ExternalSearchDateTime",
"description": "Время последнего обновления переписки"
}
},
"required": [
"id",
"direction",
"status",
"topic",
"createdAt",
"updatedAt",
"account",
"senderFirstName",
"senderMiddleName",
"senderLastName"
],
"type": "object"
},
"ExternalCorrespondenceDirection": {
"description": "Направление переписки относительно клиента. TO_BANK — от клиента в банк, FROM_BANK — из банка клиенту",
"enum": [
"FROM_BANK",
"TO_BANK"
],
"example": "TO_BANK",
"type": "string"
},
"ExternalCorrespondenceFilter": {
"description": "Условия отбора переписок",
"example": {
"accounts": [
"12345678901234567890"
],
"directions": [
"TO_BANK"
],
"organization": {
"inn": "7707083893"
},
"statuses": [
"OPEN"
]
},
"properties": {
"accounts": {
"description": "Номера счетов. Пустой список или отсутствие поля — фильтрация по счёту не выполняется. При непустом списке переписки без счёта не возвращаются. Если хотя бы один из указанных счетов недоступен пользователю, запрос завершается с ошибкой 403",
"example": [
"12345678901234567890"
],
"items": {
"example": "12345678901234567890",
"type": "string"
},
"type": "array"
},
"createdAt": {
"$ref": "#/components/schemas/DateTimeRange",
"description": "Диапазон времени создания переписки"
},
"directions": {
"description": "Направления переписок. Пустой список или отсутствие поля — отбираются оба направления",
"example": [
"TO_BANK"
],
"items": {
"$ref": "#/components/schemas/ExternalCorrespondenceDirection"
},
"type": "array"
},
"organization": {
"$ref": "#/components/schemas/ExternalOrganizationFilter",
"description": "Идентификатор организации. Необходимо передать хотя бы одно из полей — ИНН/КИО или CNUM"
},
"statuses": {
"description": "Статусы переписок. Пустой список или отсутствие поля — фильтрация по статусу не выполняется",
"example": [
"OPEN"
],
"items": {
"$ref": "#/components/schemas/ExternalCorrespondenceStatus"
},
"type": "array"
},
"updatedAt": {
"$ref": "#/components/schemas/DateTimeRange",
"description": "Диапазон времени последнего обновления переписки"
}
},
"required": [
"organization"
],
"type": "object"
},
"ExternalCorrespondenceMail": {
"properties": {
"attachments": {
"description": "Информация о вложениях",
"items": {
"$ref": "#/components/schemas/ExternalMailAttachment"
},
"type": "array"
},
"createdAt": {
"$ref": "#/components/schemas/DateTime",
"description": "Время создания письма"
},
"id": {
"description": "Идентификатор письма",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
},
"number": {
"description": "Номер письма",
"example": 1,
"type": "integer"
},
"senderFirstName": {
"description": "Имя отправителя",
"example": "Иван",
"type": "string"
},
"senderLastName": {
"description": "Фамилия отправителя",
"example": "Иванов",
"type": "string"
},
"senderMiddleName": {
"description": "Отчетсво отправителя",
"example": "Иванович",
"type": "string"
},
"text": {
"description": "Текст письма",
"example": "Текст письма",
"type": "string"
},
"type": {
"$ref": "#/components/schemas/ExternalMailType",
"description": "Тип письма"
},
"updatedAt": {
"$ref": "#/components/schemas/DateTime",
"description": "Время обновления письма"
}
},
"required": [
"id",
"type",
"text",
"number",
"createdAt",
"updatedAt",
"senderFirstName",
"senderLastName",
"attachments"
],
"type": "object"
},
"ExternalCorrespondenceSort": {
"description": "Параметры сортировки",
"example": {
"direction": "DESC",
"field": "UPDATED_AT"
},
"properties": {
"direction": {
"default": "DESC",
"description": "Порядок сортировки",
"enum": [
"ASC",
"DESC"
],
"example": "DESC",
"type": "string"
},
"field": {
"default": "UPDATED_AT",
"description": "Поле сортировки",
"enum": [
"CREATED_AT",
"UPDATED_AT"
],
"example": "UPDATED_AT",
"type": "string"
}
},
"type": "object"
},
"ExternalCorrespondenceStatus": {
"description": "Статус переписки; промежуточные статусы закрытия относятся к OPEN",
"enum": [
"OPEN",
"CLOSED"
],
"example": "OPEN",
"type": "string"
},
"ExternalCorrespondenceTopic": {
"description": "Названия составляющих тематики переписки; null, если тематические данные не заполнены",
"example": {
"clarification": "Другие вопросы",
"product": "Торговое финансирование",
"theme": "Заявки"
},
"nullable": true,
"properties": {
"clarification": {
"description": "Уточнение",
"example": "Другие вопросы",
"nullable": true,
"type": "string"
},
"product": {
"description": "Продукт",
"example": "Торговое финансирование",
"nullable": true,
"type": "string"
},
"theme": {
"description": "Тема",
"example": "Заявки",
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"ExternalDocData": {
"description": "Общие реквизиты платёжного документа ДБО",
"example": {
"account": "12345678901234567890",
"bic": "123456789",
"docDate": "2021-07-10",
"docNumber": "12345",
"inn": "123412341234",
"kpp": "123456789",
"orgName": "ООО Компания"
},
"properties": {
"account": {
"description": "Номер счёта или корр. счёта, 20 цифр",
"example": "12345678901234567890",
"maxLength": 20,
"pattern": "([0-9]{20})",
"type": "string"
},
"bic": {
"description": "БИК, 9 цифр",
"example": "123456789",
"maxLength": 9,
"pattern": "([0-9]{9})",
"type": "string"
},
"docDate": {
"$ref": "#/components/schemas/Date",
"description": "Дата составления документа"
},
"docNumber": {
"description": "Номер документа",
"example": "12345",
"maxLength": 6,
"pattern": "([1-9][0-9]{0,5})",
"type": "string"
},
"inn": {
"description": "ИНН/КИО юридического или физического лица РФ, для КИО допустимо 5 символов, для ИНН 10 или 12 цифр",
"example": "123412341234",
"maxLength": 12,
"pattern": "(0|[0-9]{5})|([0-9]{10})|([0-9]{12})",
"type": "string"
},
"kpp": {
"description": "КПП, 9 цифр, 6-я позиция м.б. буква лат. буква 12 цифр",
"example": "123456789",
"pattern": "(.*\\S.*|)",
"type": "string"
},
"orgName": {
"description": "Наименование организации",
"example": "ООО Компания",
"maxLength": 160,
"minLength": 1,
"type": "string"
}
},
"required": [
"docNumber",
"docDate",
"account",
"bic",
"inn"
],
"type": "object"
},
"ExternalMailAttachment": {
"properties": {
"name": {
"description": "Название вложения",
"example": "file.txt",
"type": "string"
},
"number": {
"description": "Номер вложения",
"example": 1,
"type": "integer"
}
},
"required": [
"number",
"name"
],
"type": "object"
},
"ExternalMailType": {
"description": "Направление письма относительно клиента",
"enum": [
"TO_BANK",
"FROM_BANK"
],
"example": "TO_BANK",
"type": "string"
},
"ExternalOrganizationFilter": {
"description": "Идентификатор организации для поиска переписок. Необходимо передать хотя бы одно из полей `inn` или `cnum`. Если переданы оба, они должны относиться к одной организации. КПП допустим только вместе с ИНН/КИО",
"example": {
"inn": "7707083893",
"kpp": "773601001"
},
"properties": {
"cnum": {
"description": "Внутренний идентификатор организации (CNUM)",
"example": "CB1234567",
"minLength": 1,
"pattern": "(.*\\S.*|)",
"type": "string"
},
"inn": {
"description": "ИНН/КИО организации. Для КИО допустимо 5 цифр, для ИНН — 10 или 12 цифр",
"example": "7707083893",
"maxLength": 12,
"pattern": "(0|[0-9]{5})|([0-9]{10})|([0-9]{12})",
"type": "string"
},
"kpp": {
"description": "КПП организации. Необязателен, если организация однозначно определяется по ИНН/КИО",
"example": "773601001",
"minLength": 1,
"pattern": "(.*\\S.*|)",
"type": "string"
}
},
"type": "object"
},
"ExternalPagingRequest": {
"description": "Параметры постраничной навигации",
"example": {
"limit": 50,
"offset": 0
},
"properties": {
"limit": {
"default": 50,
"description": "Максимальное количество записей в ответе",
"example": 50,
"format": "int32",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"offset": {
"default": 0,
"description": "Количество пропускаемых записей",
"example": 0,
"format": "int32",
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"ExternalPagingResponse": {
"description": "Параметры постраничной навигации",
"example": {
"hasNext": false,
"limit": 50,
"offset": 0
},
"properties": {
"hasNext": {
"description": "Признак наличия следующей страницы",
"example": false,
"type": "boolean"
},
"limit": {
"description": "Максимальное количество записей в ответе",
"example": 50,
"format": "int32",
"type": "integer"
},
"offset": {
"description": "Количество пропущенных записей",
"example": 0,
"format": "int32",
"type": "integer"
},
"totalCount": {
"description": "Общее количество записей, удовлетворяющих условиям отбора",
"example": 128,
"format": "int64",
"type": "integer"
}
},
"required": [
"offset",
"limit",
"hasNext"
],
"type": "object"
},
"ExternalSearchDateTime": {
"description": "Дата и время в формате ISO 8601, строго UTC (`Z`), без дробной части",
"example": "2026-07-10T06:53:37Z",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
"type": "string"
},
"ExternalTopic": {
"properties": {
"clarification": {
"description": "Уточнение",
"example": "Другие вопросы",
"type": "string"
},
"id": {
"description": "Идентификатор темы",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
},
"product": {
"description": "Продукт",
"example": "Торговое финансирование",
"type": "string"
},
"theme": {
"description": "Тема",
"example": "Заявки",
"type": "string"
}
},
"required": [
"id",
"theme",
"product",
"clarification"
],
"type": "object"
},
"ExternalTopicsResponse": {
"description": "Список доступных тематик переписок",
"example": [
{
"clarification": "Другие вопросы",
"id": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"product": "Торговое финансирование",
"theme": "Заявки"
}
],
"items": {
"$ref": "#/components/schemas/ExternalTopic"
},
"type": "array"
},
"GetExternalCorrespondenceResponse": {
"properties": {
"account": {
"description": "Номер счета",
"example": "123456789",
"type": "string"
},
"correspondenceMails": {
"description": "Письма переписки",
"example": [],
"items": {
"$ref": "#/components/schemas/ExternalCorrespondenceMail"
},
"type": "array"
},
"createdAt": {
"$ref": "#/components/schemas/DateTime",
"description": "Время создания переписки"
},
"id": {
"description": "Идентификатор переписки",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
},
"senderFirstName": {
"description": "Имя инициатора",
"example": "Иван",
"type": "string"
},
"senderLastName": {
"description": "Фамилия инициатора",
"example": "Иванов",
"type": "string"
},
"senderMiddleName": {
"description": "Отчетсво инициатора",
"example": "Иванович",
"type": "string"
},
"status": {
"$ref": "#/components/schemas/ExternalCorrespondenceStatus",
"description": "Статус переписки"
},
"topicId": {
"description": "Идентификатор темы переписки",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
},
"updatedAt": {
"$ref": "#/components/schemas/DateTime",
"description": "Время обновления переписки"
}
},
"required": [
"id",
"topicId",
"createdAt",
"updatedAt",
"senderFirstName",
"senderLastName",
"correspondenceMails"
],
"type": "object"
},
"GetExternalCorrespondenceV2Response": {
"properties": {
"account": {
"description": "Номер счета",
"example": "123456789",
"nullable": true,
"type": "string"
},
"correspondenceMails": {
"description": "Письма переписки",
"example": [],
"items": {
"$ref": "#/components/schemas/ExternalCorrespondenceMail"
},
"type": "array"
},
"createdAt": {
"$ref": "#/components/schemas/DateTime",
"description": "Время создания переписки"
},
"direction": {
"$ref": "#/components/schemas/ExternalCorrespondenceDirection",
"description": "Направление переписки"
},
"id": {
"description": "Идентификатор переписки",
"example": "bf1d1868-a98e-4ae5-976f-0c4e21e0d510",
"format": "uuid",
"type": "string"
},
"senderFirstName": {
"description": "Имя инициатора",
"example": "Иван",
"type": "string"
},
"senderLastName": {
"description": "Фамилия инициатора",
"example": "Иванов",
"type": "string"
},
"senderMiddleName": {
"description": "Отчество инициатора",
"example": "Иванович",
"nullable": true,
"type": "string"
},
"status": {
"$ref": "#/components/schemas/ExternalCorrespondenceStatus",
"description": "Статус переписки"
},
"topic": {
"$ref": "#/components/schemas/ExternalCorrespondenceTopic"
},
"updatedAt": {
"$ref": "#/components/schemas/DateTime",
"description": "Время обновления переписки"
}
},
"required": [
"id",
"direction",
"status",
"topic",
"createdAt",
"updatedAt",
"account",
"senderFirstName",
"senderMiddleName",
"senderLastName",
"correspondenceMails"
],
"type": "object"
},
"SearchCorrespondencesRequest": {
"description": "Запрос на получение списка переписок",
"properties": {
"filter": {
"$ref": "#/components/schemas/ExternalCorrespondenceFilter",
"description": "Условия отбора переписок"
},
"paging": {
"$ref": "#/components/schemas/ExternalPagingRequest",
"description": "Параметры постраничной навигации. По умолчанию offset = 0, limit = 50"
},
"sort": {
"$ref": "#/components/schemas/ExternalCorrespondenceSort",
"description": "Параметры сортировки. По умолчанию сортировка по времени обновления по убыванию"
}
},
"required": [
"filter",
"paging"
],
"type": "object"
},
"SearchCorrespondencesResponse": {
"description": "Список переписок",
"properties": {
"items": {
"description": "Переписки, удовлетворяющие условиям отбора",
"example": [],
"items": {
"$ref": "#/components/schemas/ExternalCorrespondenceCard"
},
"type": "array"
},
"paging": {
"$ref": "#/components/schemas/ExternalPagingResponse",
"description": "Параметры постраничной навигации"
}
},
"required": [
"items",
"paging"
],
"type": "object"
},
"SubmitExternalMailRequest": {
"description": "ЭП клиента",
"properties": {
"digestName": {
"description": "Имя схемы подписи",
"example": "SHA-256",
"type": "string"
},
"digestVersion": {
"description": "Версия схемы подписи",
"example": "v1",
"type": "string"
},
"fio": {
"description": "ФИО УЛК, наложившего данную подпись",
"example": "Иванов Иван Иванович",
"type": "string"
},
"issuer": {
"description": "Идентификатор поставщика сертификата",
"example": "E=IdleCA, C=RU, S=Idle CA, L=Idle CA, O=Idle CA, OU=Idle CA, CN=Idle CA",
"maxLength": 1024,
"minLength": 1,
"type": "string"
},
"position": {
"description": "Должность УЛК, наложившего подпись",
"example": "Генеральный директор",
"type": "string"
},
"serialNumber": {
"description": "Серийный номер сертификата",
"example": "123456789",
"maxLength": 255,
"minLength": 1,
"type": "string"
},
"value": {
"description": "Значение ЭП",
"example": "SGVsbG8=",
"format": "base64",
"type": "string"
}
},
"required": [
"serialNumber",
"value"
],
"type": "object"
}
},
"securitySchemes": {
"RaifApiAuthorization": {
"scheme": "bearer",
"type": "http"
},
"RaifApiIdToken": {
"in": "header",
"name": "Id-Token",
"type": "apiKey"
}
}
}