{
  "openapi": "3.0.0",
  "info": {
    "title": "api/doki/rnf",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/"
    },
    {
      "url": "https://api.ati.su"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/gw/atidocs/api/2.0/documents": {
      "post": {
        "tags": [
          "Document"
        ],
        "summary": "Создание и/или сохранение документа",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ID документа"
          },
          {
            "in": "query",
            "name": "doc_sender_contact",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID контакта отправителя"
          },
          {
            "in": "query",
            "name": "doc_recipient_contact",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID контакта получателя"
          },
          {
            "in": "query",
            "name": "doc_recipient_id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID фирмы получателя"
          },
          {
            "in": "query",
            "name": "doc_request",
            "required": true,
            "schema": {
              "type": "boolean"
            },
            "description": "Флаг, требуется ли запрос решения по документу"
          },
          {
            "in": "query",
            "name": "doctype",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "акт",
                "доверенность",
                "договор",
                "заказ",
                "заказ (табличный вид)",
                "заявка (к договору)",
                "заявка к договору (табличный вид)",
                "поручение экспедитору",
                "счет",
                "другой"
              ]
            },
            "description": "Тип документа"
          },
          {
            "in": "query",
            "name": "is_formal",
            "required": true,
            "schema": {
              "type": "boolean"
            },
            "description": "Флаг, является ли документ формализованным"
          },
          {
            "in": "query",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Версия формата документа"
          },
          {
            "in": "query",
            "name": "contract_number",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Номер договора, к которому привязан документ"
          },
          {
            "in": "query",
            "name": "contract_date",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Дата договора, к которому привязан документ в формате `YYYY-MM-DD`"
          },
          {
            "in": "query",
            "name": "number",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Номер документа"
          },
          {
            "in": "query",
            "name": "date",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Дата документа в формате `YYYY-MM-DD`"
          },
          {
            "in": "query",
            "name": "description",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Описание"
          },
          {
            "in": "query",
            "name": "body",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Формализованная часть документа"
          }
        ],
        "responses": {
          "200": {
            "description": "Документ отправлен",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "string",
                      "description": "id документа"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос"
          },
          "404": {
            "description": "Документ не найден"
          }
        }
      }
    },
    "/gw/native_informal_documents/v4/documents/{document_id}/roaming-participants": {
      "put": {
        "tags": [
          "Документы (public)"
        ],
        "summary": "Обновление роуминговых участников документооборота",
        "description": "Обновляет данные о роуминговых участниках документооборота.\n\nТребования:<br>• Документ должен существовать в системе.<br>• Авторизация от лица отправителя (sender) документа.",
        "operationId": "update_roaming_participants_v4_documents__document_id__roaming_participants_put",
        "security": [
          {
            "api-secret": []
          },
          {
            "user-id": []
          },
          {
            "client-name": []
          }
        ],
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документа",
              "title": "Document Id"
            },
            "description": "ID документа"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoamingParticipantsSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ID документа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentIDSchema"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Документы (public)"
        ],
        "summary": "Получение информации о роуминговых участниках документооборота",
        "description": "Возвращает данные об участниках документооборота, задействованных в роуминговом документообороте.\n\nТребования:<br>• Документ должен существовать в системе и быть доступен авторизованному пользователю.<br>• В зависимости от статуса документа к нему применяются следующие правила авторизации:\n    - Если документ находится в статусе «Черновик», то вызов метода доступен только отправителю (sender)\n    этого документа.\n    - Если документ находится в любом другом статусе, то вызов метода доступен как отправителю (sender),\n    так и получателю (receiver) документа.",
        "operationId": "get_roaming_participants_v4_documents__document_id__roaming_participants_get",
        "security": [
          {
            "api-secret": []
          },
          {
            "user-id": []
          },
          {
            "client-name": []
          }
        ],
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документа",
              "title": "Document Id"
            },
            "description": "ID документа"
          }
        ],
        "responses": {
          "200": {
            "description": "Информация о роуминговых участниках документооборота",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoamingParticipantsSchema"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/native_informal_documents/v4/documents/{document_id}/convert-to-roaming": {
      "post": {
        "tags": [
          "Документы (public)"
        ],
        "summary": "Конвертация документа в формат роуминга",
        "description": "Конвертирует документ в формат роуминга и регистрирует его в системе роуминговых документов.\n\nТребования:<br>• Исходный документ должен существовать и находиться в статусе, доступном для конвертации.<br>• Документ должен быть доступен авторизованному пользователю.<br>• Авторизация от лица отправителя (sender) исходного документа.",
        "operationId": "convert_to_roaming_v4_documents__document_id__convert_to_roaming_post",
        "security": [
          {
            "api-secret": []
          },
          {
            "user-id": []
          },
          {
            "client-name": []
          }
        ],
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документа",
              "title": "Document Id"
            },
            "description": "ID документа"
          }
        ],
        "responses": {
          "200": {
            "description": "ID документооборота в системе роуминговых документов",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentIDSchema"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/roaming_informal_documents/v4/docflows/{docflow_id}/body": {
      "get": {
        "tags": [
          "Документообороты РНФ (public)"
        ],
        "summary": "Получение файла РНФ документа",
        "description": "Возвращает файл РНФ документа.\n\nТребования:<br>• Документооборот должен существовать и быть доступен авторизованному пользователю.",
        "operationId": "get_docflow_body_v4_docflows__docflow_id__body_get",
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "edo-id": []
          },
          {
            "baggage": []
          }
        ],
        "parameters": [
          {
            "name": "docflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документооборота",
              "title": "Docflow Id"
            },
            "description": "ID документооборота"
          }
        ],
        "responses": {
          "200": {
            "description": "Файл РНФ документа",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/edo_orchestrator/v4/docflow-types/nf/docflows/{docflow_id}/documents/title-1/send": {
      "post": {
        "tags": [
          "Отправка документов (public)"
        ],
        "summary": "Отправка роумингового неформализованного документа",
        "description": "Отправляет роуминговый неформализованный документ в рамках документооборота.\n\nТребования:<br>• Документооборот должен существовать и быть доступен авторизованному пользователю.<br>• Авторизация от лица отправителя документа (sender).",
        "operationId": "send_rnf_title_1_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_send_post",
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "baggage": []
          }
        ],
        "parameters": [
          {
            "name": "docflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документооборота",
              "title": "Docflow Id"
            },
            "description": "ID документооборота"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_send_rnf_title_1_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_send_post"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Успешная отправка роумингового неформализованного документа"
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/roaming_informal_documents/v4/docflows": {
      "post": {
        "tags": [
          "Документообороты РНФ (public)"
        ],
        "summary": "Создание документооборота",
        "description": "Создает новый документооборот",
        "operationId": "create_docflow_v4_docflows_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_docflow_v4_docflows_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "ID документооборота",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocflowIDSchema"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "edo-id": []
          },
          {
            "baggage": []
          }
        ]
      }
    },
    "/gw/roaming_informal_documents/v4/docflows/{docflow_id}/meta": {
      "get": {
        "tags": [
          "Документообороты РНФ (public)"
        ],
        "summary": "Получение метаданных документооборота",
        "description": "Возвращает обогащенные метаданные документооборота.\n\nТребования:<br>• Документооборот должен существовать и быть доступен авторизованному пользователю.<br>• Если документ в статусе черновика, то авторизация должна быть от лица отправителя документа (sender).<br>• Если документ в любом другом статусе, то вызов метода доступен как отправителю документа (sender), так и получателю (receiver).",
        "operationId": "get_docflow_meta_v4_docflows__docflow_id__meta_get",
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "edo-id": []
          },
          {
            "baggage": []
          }
        ],
        "parameters": [
          {
            "name": "docflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документооборота",
              "title": "Docflow Id"
            },
            "description": "ID документооборота"
          }
        ],
        "responses": {
          "200": {
            "description": "Обогащенные метаданные документооборота",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrichedDocflowMetaSchema"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/roaming_informal_documents/v4/docflows/{docflow_id}/title-1-read-confirmation": {
      "post": {
        "tags": [
          "Документообороты РНФ (public)"
        ],
        "summary": "Создание извещения о получении документа",
        "description": "Создает извещение о получении (ИОП) документа.\nГенерация выполняется в системе служебных документов.\n\nТребования:<br>• Документооборот должен существовать и документ должен быть подписан отправителем.<br>• Авторизация от лица получателя документа (receiver).",
        "operationId": "create_first_title_read_confirmation_v4_docflows__docflow_id__title_1_read_confirmation_post",
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "edo-id": []
          },
          {
            "baggage": []
          }
        ],
        "parameters": [
          {
            "name": "docflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документооборота",
              "title": "Docflow Id"
            },
            "description": "ID документооборота"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuxDocumentInputSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Файл Извещения о получении документа",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/edo_orchestrator/v4/docflow-types/nf/docflows/{docflow_id}/documents/title-1-read-confirmation/send": {
      "post": {
        "tags": [
          "Отправка документов (public)"
        ],
        "summary": "Отправка извещения о получении роумингового неформализованного документа",
        "description": "Отправляет извещение о получении роумингового неформализованного документа.\n\nТребования:<br>• Документооборот должен существовать и быть доступен авторизованному пользователю.<br>• Авторизация от лица получателя документа (receiver).",
        "operationId": "send_rnf_title_1_read_confirmation_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_read_confirmation_send_post",
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "baggage": []
          }
        ],
        "parameters": [
          {
            "name": "docflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документооборота",
              "title": "Docflow Id"
            },
            "description": "ID документооборота"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_send_rnf_title_1_read_confirmation_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_read_confirmation_send_post"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Успешная отправка извещения о получении роумингового неформализованного документа"
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/edo_orchestrator/v4/docflow-types/nf/docflows/{docflow_id}/documents/title-2/send": {
      "post": {
        "tags": [
          "Отправка документов (public)"
        ],
        "summary": "Подписание роумингового неформализованного документа получателем с использованием открепленной подписи",
        "description": "Подписывает роуминговый неформализованный документ от лица получателя с использованием открепленной подписи в рамках документооборота.\n\nТребования:<br>• Документооборот должен существовать и быть доступен авторизованному пользователю.<br>• Авторизация от лица получателя документа (receiver).",
        "operationId": "send_rnf_title_2_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_2_send_post",
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "baggage": []
          }
        ],
        "parameters": [
          {
            "name": "docflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документооборота",
              "title": "Docflow Id"
            },
            "description": "ID документооборота"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_send_rnf_title_2_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_2_send_post"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Успешное подписание роумингового неформализованного документа от лица получателя с использованием открепленной подписи"
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/roaming_informal_documents/v4/docflows/{docflow_id}/clarification-notification": {
      "post": {
        "tags": [
          "Документообороты РНФ (public)"
        ],
        "summary": "Создание Уведомления об уточнении документа",
        "description": "Создает Уведомление об уточнении (УОУ) документа.\nГенерация выполняется в системе служебных документов.\n\nТребования:<br>• Документооборот должен существовать и документ должен быть подписан отправителем.<br>• Авторизация от лица получателя документа (receiver).",
        "operationId": "create_clarification_notification_v4_docflows__docflow_id__clarification_notification_post",
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "edo-id": []
          },
          {
            "baggage": []
          }
        ],
        "parameters": [
          {
            "name": "docflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документооборота",
              "title": "Docflow Id"
            },
            "description": "ID документооборота"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuxDocumentInputSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Файл Уведомления об уточнении документа",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/edo_orchestrator/v4/docflow-types/nf/docflows/{docflow_id}/documents/title-1-clarification-notification/send": {
      "post": {
        "tags": [
          "Отправка документов (public)"
        ],
        "summary": "Отправка уведомления об уточнении роумингового неформализованного документа",
        "description": "Отправляет уведомление об уточнении роумингового неформализованного документа.\n\nТребования:<br>• Документооборот должен существовать и быть доступен авторизованному пользователю.<br>• Авторизация от лица получателя документа (receiver).",
        "operationId": "send_rnf_title_1_clarification_notification_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_clarification_notification_send_post",
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "baggage": []
          }
        ],
        "parameters": [
          {
            "name": "docflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документооборота",
              "title": "Docflow Id"
            },
            "description": "ID документооборота"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_send_rnf_title_1_clarification_notification_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_clarification_notification_send_post"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Успешная отправка уведомления об уточнении роумингового неформализованного документа"
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/roaming_informal_documents/v4/docflows/{docflow_id}/history": {
      "get": {
        "tags": [
          "Документообороты РНФ (public)"
        ],
        "summary": "Получение истории документооборота",
        "description": "Возвращает историю изменения статусов документооборота.\n\nТребования:<br>• Документооборот должен существовать и быть доступен авторизованному пользователю.",
        "operationId": "get_docflow_history_v4_docflows__docflow_id__history_get",
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "edo-id": []
          },
          {
            "baggage": []
          }
        ],
        "parameters": [
          {
            "name": "docflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документооборота",
              "title": "Docflow Id"
            },
            "description": "ID документооборота"
          }
        ],
        "responses": {
          "200": {
            "description": "История изменений статусов документооборота",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/HistoryRecordData"
                      },
                      {
                        "$ref": "#/components/schemas/HadesHistoryRecordData"
                      }
                    ]
                  },
                  "title": "Response Get Docflow History V4 Docflows  Docflow Id  History Get"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gw/roaming_informal_documents/v4/docflows/{docflow_id}/preview": {
      "get": {
        "tags": [
          "Документообороты РНФ (public)"
        ],
        "summary": "Получение списка ID превью",
        "description": "Возвращает список ID превью.\n\nТребования:<br>• Расширение файла должно быть поддерживаемым для превью",
        "operationId": "get_docflow_preview_v4_docflows__docflow_id__preview_get",
        "security": [
          {
            "api-secret": []
          },
          {
            "client-name": []
          },
          {
            "user-id": []
          },
          {
            "edo-id": []
          },
          {
            "baggage": []
          }
        ],
        "parameters": [
          {
            "name": "docflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID документооборота",
              "title": "Docflow Id"
            },
            "description": "ID документооборота"
          }
        ],
        "responses": {
          "200": {
            "description": "Список ID превью",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewResponseSchema"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка валидации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "SignerSchema": {
        "properties": {
          "first_name": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1,
            "title": "First Name",
            "description": "Имя подписанта"
          },
          "last_name": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1,
            "title": "Last Name",
            "description": "Фамилия подписанта"
          },
          "patronymic": {
            "type": "string",
            "maxLength": 60,
            "nullable": true,
            "title": "Patronymic"
          },
          "position": {
            "type": "string",
            "maxLength": 255,
            "nullable": true,
            "title": "Position"
          }
        },
        "type": "object",
        "required": [
          "first_name",
          "last_name"
        ],
        "title": "SignerSchema"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "enum": [
                "string",
                "integer"
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "ActionTypeEnum": {
        "type": "string",
        "enum": [
          "start_sending",
          "confirm_sending",
          "start_receiving",
          "confirm_receiving",
          "roaming_error"
        ],
        "title": "ActionTypeEnum"
      },
      "ActorTypeEnum": {
        "type": "string",
        "enum": [
          "sender_user",
          "sender_operator",
          "receiver_user",
          "receiver_operator"
        ],
        "title": "ActorTypeEnum"
      },
      "AuxDocumentInputSchema": {
        "properties": {
          "signer_info": {
            "$ref": "#/components/schemas/SignerSchema",
            "description": "Данные подписанта"
          },
          "mchd_info": {
            "$ref": "#/components/schemas/MCHDSchema",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "signer_info"
        ],
        "title": "AuxDocumentInputSchema"
      },
      "CombinedDocflowStateEnum": {
        "type": "string",
        "enum": [
          "draft",
          "waiting_for_roaming_provider_confirmation",
          "waiting_for_roaming_user_response",
          "waiting_for_read_confirmation",
          "waiting_for_title_2",
          "clarification_notification_requested",
          "done",
          "roaming_error",
          "receiver_refused_to_sign",
          "annulment_requested",
          "annulment_done"
        ],
        "title": "CombinedDocflowStateEnum",
        "description": "Статусы ДО, нужные для вывода на фронте (левый сайдбар) и в списке документов\n\nМногие совпадают с `DocflowStateEnum`, но в некоторых случаях учитывается не только\nстатус самого ДО, но и статус документов внутри ДО"
      },
      "DocflowFlagEnum": {
        "type": "string",
        "enum": [
          "can_be_archived",
          "can_be_deleted",
          "can_be_unarchived",
          "can_be_undeleted",
          "can_be_annulled",
          "needs_read_confirmation",
          "edo_can_be_signed"
        ],
        "title": "DocflowFlagEnum",
        "description": "Флаги доступности действий над документооборотом"
      },
      "DocflowIDSchema": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "ID документооборота"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "DocflowIDSchema"
      },
      "EnrichedDocflowMetaSchema": {
        "properties": {
          "doctype": {
            "$ref": "#/components/schemas/SargonDoctypeEnum",
            "description": "Тип документа"
          },
          "number": {
            "type": "string",
            "nullable": true,
            "title": "Number",
            "description": "Номер документа"
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "title": "Date",
            "description": "Дата документа"
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "ID документооборота"
          },
          "state": {
            "$ref": "#/components/schemas/CombinedDocflowStateEnum",
            "description": "Статус документооборота"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Дата создания документооборота"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Дата обновления документооборота"
          },
          "sender": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EnrichedNativeParticipantData"
              },
              {
                "$ref": "#/components/schemas/EnrichedRoamingParticipantData"
              }
            ],
            "title": "Sender",
            "description": "Информация об отправителе",
            "discriminator": {
              "propertyName": "user_type",
              "mapping": {
                "native": "#/components/schemas/EnrichedNativeParticipantData",
                "roaming": "#/components/schemas/EnrichedRoamingParticipantData"
              }
            }
          },
          "receiver": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EnrichedNativeParticipantData"
              },
              {
                "$ref": "#/components/schemas/EnrichedRoamingParticipantData"
              }
            ],
            "discriminator": {
              "propertyName": "user_type",
              "mapping": {
                "native": "#/components/schemas/EnrichedNativeParticipantData",
                "roaming": "#/components/schemas/EnrichedRoamingParticipantData"
              }
            },
            "nullable": true,
            "title": "Receiver",
            "description": "Информация о получателе"
          },
          "flags": {
            "items": {
              "$ref": "#/components/schemas/DocflowFlagEnum"
            },
            "type": "array",
            "title": "Flags",
            "description": "Флаги доступности действий над документооборотом"
          }
        },
        "type": "object",
        "required": [
          "doctype",
          "id",
          "state",
          "created_at",
          "updated_at",
          "sender",
          "flags"
        ],
        "title": "EnrichedDocflowMetaSchema"
      },
      "DocumentTypeEnum": {
        "type": "string",
        "enum": [
          "title-1",
          "title-1-read-confirmation",
          "title-1-clarification-notification",
          "title-1-signature-rejection",
          "title-2",
          "title-2-read-confirmation"
        ],
        "title": "DocumentTypeEnum"
      },
      "EnrichedNativeParticipantData": {
        "properties": {
          "signature": {
            "$ref": "#/components/schemas/EnrichedSignatureSchema",
            "nullable": true
          },
          "user_type": {
            "type": "string",
            "const": "native",
            "title": "User Type",
            "description": "Тип пользователя",
            "default": "native"
          },
          "ati_id": {
            "type": "string",
            "nullable": true,
            "title": "Ati Id",
            "description": "Алиас фирмы участника"
          },
          "firm_name": {
            "type": "string",
            "nullable": true,
            "title": "Firm Name",
            "description": "Название фирмы участника"
          },
          "contact_id": {
            "type": "integer",
            "title": "Contact Id",
            "description": "ID контакта"
          },
          "contact_name": {
            "type": "string",
            "nullable": true,
            "title": "Contact Name",
            "description": "Название контакта участника"
          },
          "edo_user_id": {
            "type": "string",
            "nullable": true,
            "title": "Edo User Id",
            "description": "ID участника ЭДО"
          }
        },
        "type": "object",
        "required": [
          "ati_id",
          "firm_name",
          "contact_id",
          "contact_name",
          "edo_user_id"
        ],
        "title": "EnrichedNativeParticipantData"
      },
      "EnrichedRoamingParticipantData": {
        "properties": {
          "signature": {
            "$ref": "#/components/schemas/EnrichedSignatureSchema",
            "nullable": true
          },
          "user_type": {
            "type": "string",
            "const": "roaming",
            "title": "User Type",
            "description": "Тип пользователя",
            "default": "roaming"
          },
          "agent_name": {
            "type": "string",
            "title": "Agent Name",
            "description": "Название роуминговой фирмы"
          },
          "edo_user_id": {
            "type": "string",
            "title": "Edo User Id",
            "description": "ID участника ЭДО"
          },
          "roaming_provider_id": {
            "type": "string",
            "title": "Roaming Provider Id",
            "description": "ID роумингового оператора"
          },
          "roaming_provider_name": {
            "type": "string",
            "title": "Roaming Provider Name",
            "description": "Название роумингового оператора"
          }
        },
        "type": "object",
        "required": [
          "agent_name",
          "edo_user_id",
          "roaming_provider_id",
          "roaming_provider_name"
        ],
        "title": "EnrichedRoamingParticipantData"
      },
      "EnrichedSignatureSchema": {
        "properties": {
          "certificate_id": {
            "type": "string",
            "title": "Certificate Id",
            "description": "ID сертификата в sign_checker-е"
          },
          "mchd_id": {
            "type": "string",
            "nullable": true,
            "title": "Mchd Id",
            "description": "ID машиночитаемой доверенности"
          }
        },
        "type": "object",
        "required": [
          "certificate_id"
        ],
        "title": "EnrichedSignatureSchema"
      },
      "HadesHistoryRecordData": {
        "properties": {
          "document_type": {
            "$ref": "#/components/schemas/DocumentTypeEnum",
            "description": "Какой документ изменялся"
          },
          "action_type": {
            "$ref": "#/components/schemas/ActionTypeEnum",
            "description": "Какое действие было совершено"
          },
          "actor_type": {
            "$ref": "#/components/schemas/ActorTypeEnum",
            "description": "Кто совершил действие"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Временная отметка события"
          },
          "is_annulment": {
            "type": "boolean",
            "title": "Is Annulment",
            "description": "Признак, который указывает на предложение об аннулировании",
            "default": true
          },
          "comment": {
            "type": "string",
            "nullable": true,
            "title": "Comment"
          }
        },
        "type": "object",
        "required": [
          "document_type",
          "action_type",
          "actor_type"
        ],
        "title": "HadesHistoryRecordData"
      },
      "HistoryRecordData": {
        "properties": {
          "document_type": {
            "$ref": "#/components/schemas/DocumentTypeEnum",
            "description": "Какой документ изменялся"
          },
          "action_type": {
            "$ref": "#/components/schemas/ActionTypeEnum",
            "description": "Какое действие было совершено"
          },
          "actor_type": {
            "$ref": "#/components/schemas/ActorTypeEnum",
            "description": "Кто совершил действие"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Временная отметка события"
          }
        },
        "type": "object",
        "required": [
          "document_type",
          "action_type",
          "actor_type"
        ],
        "title": "HistoryRecordData"
      },
      "MCHDSchema": {
        "properties": {
          "mchd_id": {
            "type": "string",
            "maxLength": 36,
            "minLength": 36,
            "title": "Mchd Id",
            "description": "ID машиночитаемой доверенности"
          },
          "mchd_issued_at": {
            "type": "string",
            "format": "date-time",
            "title": "Mchd Issued At",
            "description": "Дата выдачи доверенности"
          }
        },
        "type": "object",
        "required": [
          "mchd_id",
          "mchd_issued_at"
        ],
        "title": "MCHDSchema"
      },
      "SargonDoctypeEnum": {
        "type": "string",
        "enum": [
          "upd_dop",
          "upd_schf",
          "upd_schfdop"
        ],
        "title": "SargonDoctypeEnum"
      },
      "Body_send_rnf_title_1_clarification_notification_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_clarification_notification_send_post": {
        "properties": {
          "signature": {
            "type": "string",
            "format": "binary",
            "nullable": true,
            "title": "Signature"
          },
          "mchd_id": {
            "type": "string",
            "nullable": true,
            "title": "Mchd Id",
            "description": "ID машиночитаемой доверенности"
          }
        },
        "type": "object",
        "title": "Body_send_rnf_title_1_clarification_notification_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_clarification_notification_send_post"
      },
      "Body_send_rnf_title_1_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_send_post": {
        "properties": {
          "signature": {
            "type": "string",
            "format": "binary",
            "title": "Signature",
            "description": " Подпись документа в формате base64"
          },
          "mchd_id": {
            "type": "string",
            "nullable": true,
            "title": "Mchd Id",
            "description": "ID машиночитаемой доверенности"
          }
        },
        "type": "object",
        "required": [
          "signature"
        ],
        "title": "Body_send_rnf_title_1_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_send_post"
      },
      "Body_send_rnf_title_1_read_confirmation_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_read_confirmation_send_post": {
        "properties": {
          "signature": {
            "type": "string",
            "format": "binary",
            "nullable": true,
            "title": "Signature"
          },
          "mchd_id": {
            "type": "string",
            "nullable": true,
            "title": "Mchd Id",
            "description": "ID машиночитаемой доверенности"
          }
        },
        "type": "object",
        "title": "Body_send_rnf_title_1_read_confirmation_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_1_read_confirmation_send_post"
      },
      "Body_send_rnf_title_2_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_2_send_post": {
        "properties": {
          "signature": {
            "type": "string",
            "format": "binary",
            "title": "Signature",
            "description": " Подпись документа в формате base64"
          },
          "mchd_id": {
            "type": "string",
            "nullable": true,
            "title": "Mchd Id",
            "description": "ID машиночитаемой доверенности"
          }
        },
        "type": "object",
        "required": [
          "signature"
        ],
        "title": "Body_send_rnf_title_2_document_v4_docflow_types_nf_docflows__docflow_id__documents_title_2_send_post"
      },
      "Body_create_docflow_v4_docflows_post": {
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "title": "File",
            "description": "Файл документа"
          },
          "doctype": {
            "$ref": "#/components/schemas/VoyagerDoctypeEnum",
            "description": "Тип документа"
          },
          "number": {
            "type": "string",
            "nullable": true,
            "title": "Number",
            "description": "Номер документа"
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "title": "Date",
            "description": "Дата документа"
          },
          "is_receiver_signature_expected": {
            "type": "boolean",
            "title": "Is Receiver Signature Expected",
            "description": "Требуется ли ответная подпись"
          },
          "receiver_edo_id": {
            "type": "string",
            "title": "Receiver Edo Id",
            "description": "ID ЭДО пользователя получателя документа"
          },
          "ati_admin_id": {
            "type": "string",
            "nullable": true,
            "title": "Ati Admin Id",
            "description": "Идентификатор ДО, если документ был создан через АтиАдмин"
          }
        },
        "type": "object",
        "required": [
          "file",
          "doctype",
          "is_receiver_signature_expected",
          "receiver_edo_id"
        ],
        "title": "Body_create_docflow_v4_docflows_post"
      },
      "PreviewResponseSchema": {
        "properties": {
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Количество страниц"
          },
          "pattern": {
            "type": "string",
            "title": "Pattern",
            "description": "Шаблон URL для запроса изображения страницы, например '/folder/page_%PAGE%.png'"
          }
        },
        "type": "object",
        "required": [
          "pages",
          "pattern"
        ],
        "title": "PreviewResponseSchema"
      },
      "VoyagerDoctypeEnum": {
        "type": "string",
        "enum": [
          "акт",
          "акт сверки",
          "счет",
          "счет-фактура",
          "договор",
          "доверенность",
          "доп. соглашение (к договору)",
          "информационное письмо",
          "уведомление об отказе от исполнения",
          "заказ",
          "заказ (табличный вид)",
          "заявка (к договору)",
          "заявка к договору (табличный вид)",
          "накладная",
          "товарная накладная",
          "товарно-транспортная накладная",
          "транспортная накладная",
          "поручение экспедитору",
          "СЧФДОППродавец",
          "ДОППродавец",
          "СЧФ",
          "ДокументОПередачеРезультатовРаботИсполнитель",
          "другой"
        ],
        "title": "VoyagerDoctypeEnum"
      },
      "DocumentIDSchema": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "DocumentIDSchema"
      },
      "RoamingParticipantsSchema": {
        "properties": {
          "sender_edo_id": {
            "type": "string",
            "nullable": true,
            "title": "Sender Edo Id",
            "description": "ID ЭДО пользователя отправителя документа"
          },
          "receiver_edo_id": {
            "type": "string",
            "nullable": true,
            "title": "Receiver Edo Id",
            "description": "ID ЭДО пользователя получателя документа"
          },
          "receiver_edo_name": {
            "type": "string",
            "nullable": true,
            "title": "Receiver Edo Name",
            "description": "Имя получателя документооборота"
          }
        },
        "type": "object",
        "title": "RoamingParticipantsSchema"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Authorization: Bearer {authorizationToken}"
      }
    }
  }
}