{
  "openapi": "3.1.0",
  "info": {
    "title": "Эта · Бизнес — Demo API",
    "version": "1.0.0"
  },
  "paths": {
    "/api/organizers/sources": {
      "get": {
        "summary": "Organizer Sources",
        "operationId": "organizer_sources_api_organizers_sources_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update Organizer Sources",
        "operationId": "update_organizer_sources_api_organizers_sources_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Configuration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/organizers/random-company": {
      "get": {
        "summary": "Organizer Random Company",
        "operationId": "organizer_random_company_api_organizers_random_company_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "summary": "Health",
        "operationId": "health_api_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/auth/demo": {
      "post": {
        "summary": "Demo Login",
        "operationId": "demo_login_api_auth_demo_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoLogin"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/telegram": {
      "post": {
        "summary": "Telegram Login",
        "operationId": "telegram_login_api_auth_telegram_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TelegramLogin"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/staff": {
      "post": {
        "summary": "Staff Login",
        "operationId": "staff_login_api_auth_staff_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffLogin"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/me": {
      "get": {
        "summary": "Me",
        "operationId": "me_api_auth_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/auth/logout": {
      "post": {
        "summary": "Logout",
        "operationId": "logout_api_auth_logout_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/auth/link-code": {
      "post": {
        "summary": "Link Code",
        "operationId": "link_code_api_auth_link_code_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/auth/link": {
      "post": {
        "summary": "Link",
        "operationId": "link_api_auth_link_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkToken"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/companies/{inn}": {
      "get": {
        "summary": "Company Card V2",
        "description": "MOCK: look up the synthetic ЕГРЮЛ/ЕГРИП record for the client's prefilled card.",
        "operationId": "company_card_v2_api_v2_companies__inn__get",
        "parameters": [
          {
            "name": "inn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Inn"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/demo/companies": {
      "get": {
        "summary": "Demo Companies V2",
        "operationId": "demo_companies_v2_api_v2_demo_companies_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/v2/applications": {
      "post": {
        "summary": "Submit V2",
        "operationId": "submit_v2_api_v2_applications_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2Submission"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Applications V2",
        "operationId": "applications_v2_api_v2_applications_get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}": {
      "get": {
        "summary": "Application V2",
        "operationId": "application_v2_api_v2_applications__id__get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}/events": {
      "get": {
        "summary": "Application Events V2",
        "operationId": "application_events_v2_api_v2_applications__id__events_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}/accept": {
      "post": {
        "summary": "Accept V2",
        "operationId": "accept_v2_api_v2_applications__id__accept_post",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2Accept"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}/withdraw": {
      "post": {
        "summary": "Withdraw V2",
        "operationId": "withdraw_v2_api_v2_applications__id__withdraw_post",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2Revision"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}/documents/{doc_id}": {
      "get": {
        "summary": "Document V2",
        "operationId": "document_v2_api_v2_applications__id__documents__doc_id__get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          },
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}/sign/code": {
      "post": {
        "summary": "Sign Code V2",
        "operationId": "sign_code_v2_api_v2_applications__id__sign_code_post",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2Revision"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}/sign": {
      "post": {
        "summary": "Sign Documents V2",
        "operationId": "sign_documents_v2_api_v2_applications__id__sign_post",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2SignCode"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}/statements": {
      "post": {
        "summary": "Statements V2",
        "operationId": "statements_v2_api_v2_applications__id__statements_post",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_statements_v2_api_v2_applications__id__statements_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}/statements/skip": {
      "post": {
        "summary": "Skip Statements V2",
        "operationId": "skip_statements_v2_api_v2_applications__id__statements_skip_post",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2Revision"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/staff/reason-codes": {
      "get": {
        "summary": "Reason Codes V2",
        "operationId": "reason_codes_v2_api_v2_staff_reason_codes_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/v2/staff/overrides": {
      "get": {
        "summary": "Overrides V2",
        "operationId": "overrides_v2_api_v2_staff_overrides_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/v2/staff/model-validation": {
      "get": {
        "summary": "Model Validation V2",
        "operationId": "model_validation_v2_api_v2_staff_model_validation_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}/review": {
      "post": {
        "summary": "Review V2",
        "operationId": "review_v2_api_v2_applications__id__review_post",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2Review"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/applications/{id}/review/sign": {
      "post": {
        "summary": "Sign V2",
        "operationId": "sign_v2_api_v2_applications__id__review_sign_post",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2Sign"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/preapproval": {
      "get": {
        "summary": "Preapproval V2",
        "operationId": "preapproval_v2_api_v2_preapproval_get",
        "parameters": [
          {
            "name": "inn",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{10}(\\d{2})?$",
              "title": "Inn"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/staff/preapproval/run": {
      "post": {
        "summary": "Preapproval Run V2",
        "operationId": "preapproval_run_v2_api_v2_staff_preapproval_run_post",
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/assistant/messages": {
      "post": {
        "summary": "Assistant",
        "operationId": "assistant_api_assistant_messages_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Message"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/{path}": {
      "get": {
        "summary": "Frontend",
        "operationId": "frontend__path__get",
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Path"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Action": {
        "type": "string",
        "enum": [
          "approve",
          "change",
          "decline",
          "request_data",
          "rerun"
        ],
        "title": "Action"
      },
      "Body_statements_v2_api_v2_applications__id__statements_post": {
        "properties": {
          "files": {
            "items": {
              "type": "string",
              "contentMediaType": "application/octet-stream"
            },
            "type": "array",
            "title": "Files"
          },
          "revision": {
            "type": "integer",
            "title": "Revision"
          }
        },
        "type": "object",
        "required": [
          "files",
          "revision"
        ],
        "title": "Body_statements_v2_api_v2_applications__id__statements_post"
      },
      "CollateralType": {
        "type": "string",
        "enum": [
          "owner_guarantee",
          "equipment_pledge",
          "msp_guarantee"
        ],
        "title": "CollateralType"
      },
      "Configuration": {
        "properties": {
          "revision": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Revision"
          },
          "sources": {
            "additionalProperties": {
              "$ref": "#/components/schemas/SourceOverride"
            },
            "type": "object",
            "title": "Sources"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "revision",
          "sources"
        ],
        "title": "Configuration"
      },
      "DemoLogin": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "default": "Алексей"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "DemoLogin"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "LinkToken": {
        "properties": {
          "token": {
            "type": "string",
            "maxLength": 200,
            "minLength": 10,
            "title": "Token"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "token"
        ],
        "title": "LinkToken"
      },
      "Message": {
        "properties": {
          "message": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Message"
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Application Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "message"
        ],
        "title": "Message"
      },
      "Position": {
        "type": "string",
        "enum": [
          "underwriter",
          "risk_manager"
        ],
        "title": "Position"
      },
      "ProductId": {
        "type": "string",
        "enum": [
          "overdraft",
          "working_capital",
          "investment",
          "credit_line"
        ],
        "title": "ProductId"
      },
      "SourceOverride": {
        "properties": {
          "outcome": {
            "type": "string",
            "enum": [
              "default",
              "ok",
              "error",
              "timeout"
            ],
            "title": "Outcome",
            "default": "default"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 30000.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SourceOverride"
      },
      "StaffLogin": {
        "properties": {
          "password": {
            "type": "string",
            "maxLength": 200,
            "title": "Password"
          },
          "position": {
            "$ref": "#/components/schemas/Position",
            "default": "underwriter"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "password"
        ],
        "title": "StaffLogin"
      },
      "TelegramLogin": {
        "properties": {
          "init_data": {
            "type": "string",
            "maxLength": 10000,
            "title": "Init Data"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "init_data"
        ],
        "title": "TelegramLogin"
      },
      "V2Accept": {
        "properties": {
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "offer_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Offer Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "revision",
          "offer_id"
        ],
        "title": "V2Accept"
      },
      "V2OfferChange": {
        "properties": {
          "amount": {
            "type": "integer",
            "maximum": 1000000000.0,
            "exclusiveMinimum": 0.0,
            "title": "Amount"
          },
          "term_months": {
            "type": "integer",
            "maximum": 120.0,
            "minimum": 1.0,
            "title": "Term Months"
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProductId"
              },
              {
                "type": "null"
              }
            ]
          },
          "collateral": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CollateralType"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collateral"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "amount",
          "term_months"
        ],
        "title": "V2OfferChange"
      },
      "V2Review": {
        "properties": {
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "action": {
            "$ref": "#/components/schemas/Action"
          },
          "reason_code": {
            "type": "string",
            "maxLength": 100,
            "title": "Reason Code"
          },
          "comment": {
            "type": "string",
            "maxLength": 2000,
            "title": "Comment"
          },
          "offer_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 4
              },
              {
                "type": "null"
              }
            ],
            "title": "Offer Ids"
          },
          "changes": {
            "items": {
              "$ref": "#/components/schemas/V2OfferChange"
            },
            "type": "array",
            "maxItems": 3,
            "title": "Changes",
            "default": []
          },
          "documents": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Documents",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "revision",
          "action",
          "reason_code",
          "comment"
        ],
        "title": "V2Review"
      },
      "V2Revision": {
        "properties": {
          "revision": {
            "type": "integer",
            "title": "Revision"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "revision"
        ],
        "title": "V2Revision"
      },
      "V2Sign": {
        "properties": {
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "approve": {
            "type": "boolean",
            "title": "Approve"
          },
          "comment": {
            "type": "string",
            "maxLength": 2000,
            "title": "Comment"
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason Code"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "revision",
          "approve",
          "comment"
        ],
        "title": "V2Sign"
      },
      "V2SignCode": {
        "properties": {
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "code": {
            "type": "string",
            "maxLength": 20,
            "minLength": 1,
            "title": "Code"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "revision",
          "code"
        ],
        "title": "V2SignCode"
      },
      "V2Submission": {
        "properties": {
          "idempotency_key": {
            "type": "string",
            "maxLength": 200,
            "minLength": 8,
            "title": "Idempotency Key"
          },
          "request": {
            "additionalProperties": true,
            "type": "object",
            "title": "Request"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "idempotency_key",
          "request"
        ],
        "title": "V2Submission"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  }
}
