{
  "openapi": "3.1.1",
  "info": {
    "title": "Doculus Recognizer API",
    "description": "REST API платформы интеллектуального распознавания документов Doculus: создание пакетов, загрузка файлов, запуск распознавания и получение результатов.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.doculus.pro/",
      "description": "Production"
    }
  ],
  "paths": {
    "/facades/correct/api/Packages": {
      "post": {
        "tags": [
          "Packages"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PackageCreatedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackageCreatedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackageCreatedResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/facades/correct/api/Packages/{packageId}/start": {
      "post": {
        "tags": [
          "Packages"
        ],
        "parameters": [
          {
            "name": "packageId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/facades/correct/api/Packages/{packageId}": {
      "get": {
        "tags": [
          "Packages"
        ],
        "parameters": [
          {
            "name": "packageId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Package"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Package"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Package"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/facades/correct/api/Images/package/{packageId}": {
      "post": {
        "tags": [
          "Images"
        ],
        "parameters": [
          {
            "name": "packageId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UploadImageResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadImageResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadImageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/facades/correct/api/Images/{id}": {
      "get": {
        "tags": [
          "Images"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UploadImageResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadImageResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadImageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/facades/correct/api/Files/package/{packageId}": {
      "post": {
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "packageId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UploadFileResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadFileResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadFileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CodeFormats": {
        "enum": [
          "CODE_39",
          "CODE_128",
          "CODE_93",
          "CODABAR",
          "ITF",
          "EAN_13",
          "EAN_8",
          "UPC_A",
          "UPC_E",
          "INDUSTRIAL_25",
          "QR_CODE",
          "MICRO_QR"
        ]
      },
      "Entities": {
        "type": "object",
        "properties": {
          "periodFrom": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "periodTo": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "persons": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PersonEntity"
            }
          },
          "vin": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "FieldPosition": {
        "type": "object",
        "properties": {
          "leftOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "topOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "width": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "height": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "bottomOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rightOffset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ImageLine": {
        "type": "object",
        "properties": {
          "fromX": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "fromY": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "toX": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "toY": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ImageTextLine": {
        "required": [
          "value",
          "location"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "location": {
            "$ref": "#/components/schemas/FieldPosition"
          },
          "confidence": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "float"
          }
        }
      },
      "ImageWord": {
        "required": [
          "value",
          "location"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "location": {
            "$ref": "#/components/schemas/FieldPosition"
          },
          "confidence": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "float"
          }
        }
      },
      "NomenclatureVariant": {
        "required": [
          "id",
          "confidence"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "confidence": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "Package": {
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "$ref": "#/components/schemas/PackageRecognitionStates"
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecognizedDocument"
            }
          },
          "unrecognizedPages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnrecognizedImage"
            }
          },
          "unrecognizedFiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackageFile"
            }
          }
        }
      },
      "PackageCreatedResponse": {
        "required": [
          "packageId"
        ],
        "type": "object",
        "properties": {
          "packageId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PackageFile": {
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PackageRecognitionStates": {
        "enum": [
          "NotExists",
          "Error",
          "Recognizing",
          "Recognized",
          "ReadyForRecognizing",
          "Created",
          "Expired"
        ]
      },
      "PageProcessingDetails": {
        "type": "object",
        "properties": {
          "isTextLayerDetected": {
            "type": "boolean"
          }
        }
      },
      "PersonEntity": {
        "required": [
          "fullName"
        ],
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string"
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RecognizedCode": {
        "required": [
          "location",
          "value"
        ],
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/CodeFormats"
          },
          "imageId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "location": {
            "$ref": "#/components/schemas/FieldPosition"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "RecognizedDocument": {
        "required": [
          "docType",
          "pages",
          "signatures",
          "codes",
          "fields",
          "errors"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "docType": {
            "type": "string"
          },
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecognizedDocumentImage"
            }
          },
          "files": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PackageFile"
            }
          },
          "contractorStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecognizedStamp"
              }
            ]
          },
          "customerStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecognizedStamp"
              }
            ]
          },
          "issuerStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecognizedStamp"
              }
            ]
          },
          "companyStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecognizedStamp"
              }
            ]
          },
          "leftCompanyStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecognizedStamp"
              }
            ]
          },
          "rightCompanyStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecognizedStamp"
              }
            ]
          },
          "registrationStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecognizedStamp"
              }
            ]
          },
          "photo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecognizedPhoto"
              }
            ]
          },
          "signatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecognizedSignature"
            }
          },
          "codes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecognizedCode"
            }
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecognizedField"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecognizedDocumentError"
            }
          },
          "stampsCorresponding": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StampsCorrespondingDto"
              }
            ]
          }
        }
      },
      "RecognizedDocumentError": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/RecognizedDocumentErrorCodes"
          },
          "description": {
            "type": "string"
          },
          "data": { }
        }
      },
      "RecognizedDocumentErrorCodes": {
        "type": "integer"
      },
      "RecognizedDocumentImage": {
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "scanDetails": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ScanDetails"
              }
            ]
          },
          "processingDetails": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageProcessingDetails"
              }
            ]
          }
        }
      },
      "RecognizedField": {
        "required": [
          "fieldKey",
          "fieldValue",
          "unconfidentSymbols"
        ],
        "type": "object",
        "properties": {
          "fieldKey": {
            "type": "string"
          },
          "fieldValue": { },
          "location": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FieldPosition"
              }
            ]
          },
          "documentPageIndex": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tableRow": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tableIndex": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "confidence": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "float"
          },
          "unconfidentSymbols": {
            "type": "string"
          },
          "nomenclature": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecognizedNomenclatureInfo"
              }
            ]
          },
          "fieldIndex": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "RecognizedNomenclatureInfo": {
        "required": [
          "normalizedFieldValue",
          "variants",
          "entities"
        ],
        "type": "object",
        "properties": {
          "normalizedFieldValue": {
            "type": "string"
          },
          "nomenclatureType": {
            "$ref": "#/components/schemas/RecognizedNomenclatureType"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NomenclatureVariant"
            }
          },
          "entities": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Entities"
              }
            ]
          }
        }
      },
      "RecognizedNomenclatureType": {
        "enum": [
          "Product",
          "Service",
          "Unknown"
        ]
      },
      "RecognizedPhoto": {
        "type": "object",
        "properties": {
          "isRecognized": {
            "type": "boolean"
          },
          "imageId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "documentPageIndex": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "packagePageIndex": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "location": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FieldPosition"
              }
            ]
          }
        }
      },
      "RecognizedSignature": {
        "type": "object",
        "properties": {
          "imageId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "documentPageIndex": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "signType": {
            "$ref": "#/components/schemas/SignTypes"
          },
          "isRecognized": {
            "type": "boolean"
          },
          "location": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FieldPosition"
              }
            ]
          }
        }
      },
      "RecognizedStamp": {
        "type": "object",
        "properties": {
          "isRecognized": {
            "type": "boolean"
          },
          "imageId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "documentPageIndex": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "packagePageIndex": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "location": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FieldPosition"
              }
            ]
          },
          "text": {
            "type": [
              "null",
              "string"
            ]
          },
          "unconfidentSymbols": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ScanDetails": {
        "type": "object",
        "properties": {
          "isColored": {
            "type": "boolean"
          }
        }
      },
      "SignTypes": {
        "enum": [
          "Accountant",
          "Director",
          "Shipper",
          "Consignee",
          "ProxyHolder",
          "Contractor",
          "Customer",
          "Issuer",
          "Owner",
          "Supplier",
          "Recipient",
          "Customer1",
          "Customer2",
          "Unknown"
        ]
      },
      "StampCorrespondingDto": {
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "corresponds": {
            "type": "boolean"
          },
          "confidence": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "StampsCorrespondingDto": {
        "type": "object",
        "properties": {
          "contractorStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StampCorrespondingDto"
              }
            ]
          },
          "customerStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StampCorrespondingDto"
              }
            ]
          },
          "companyStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StampCorrespondingDto"
              }
            ]
          },
          "leftCompanyStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StampCorrespondingDto"
              }
            ]
          },
          "rightCompanyStamp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StampCorrespondingDto"
              }
            ]
          }
        }
      },
      "UnrecognizedImage": {
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "packageId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "stamps": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/RecognizedStamp"
            }
          },
          "signatures": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/RecognizedSignature"
            }
          },
          "codes": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/RecognizedCode"
            }
          },
          "fields": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/RecognizedField"
            }
          },
          "textLines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ImageTextLine"
            }
          },
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ImageLine"
            }
          },
          "words": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ImageWord"
            }
          },
          "processingDetails": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageProcessingDetails"
              }
            ]
          }
        }
      },
      "UploadedFileResponseModel": {
        "required": [
          "id",
          "images"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "images": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        }
      },
      "UploadFileResponse": {
        "required": [
          "files"
        ],
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UploadedFileResponseModel"
            }
          }
        }
      },
      "UploadImageResponse": {
        "required": [
          "imageIds"
        ],
        "type": "object",
        "properties": {
          "imageIds": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Packages"
    },
    {
      "name": "Images"
    },
    {
      "name": "Files"
    }
  ]
}