> ## Documentation Index
> Fetch the complete documentation index at: https://developers.resistant.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Adaptive Decision result [testing]

> Fetch Adaptive Decision result



## OpenAPI

````yaml /spec-testing.json get /v2/submission/{submission_id}/decision
openapi: 3.0.1
info:
  title: Resistant Documents API
  version: 2.0.0b
  description: >-

    Resistant Documents provides this API to programmatically interact with its
    document analysis engine.

    Interaction with the API can be divided into three phases:


    1. Creating document submission

    2. Uploading a file for for analysis to an address returned from step 1.

    3. Fetching analysis results


    In the first step, the submission is created by posting to the 
    `/v2/submission` endpoint. The response contains a `submission_id` uniquely
    identifying the document to be analyzed throughout the entire interaction,
    and is used to fetch analysis results later.


    Submission response also returns `upload_url` containing a pre-signed URL.
    This URL should be used to upload the actual document to be analyzed in the
    second step. Please note the document has to be uploaded using HTTP `PUT`
    method with `Content-Type` HTTP header set to `application/octet-stream`.


    In the last step, client should repeatedly poll using the
    `/v2/submission/{submission_id}/fraud` endpoint for analysis results. The
    best practice is to use polling with an [exponential
    back-off](https://en.wikipedia.org/wiki/Exponential_backoff) to reduce load
    on the API.


    # Authentication


    <SecurityDefinitions />
servers:
  - url: https://api.documents.testing.resistant.ai
security: []
paths:
  /v2/submission/{submission_id}/decision:
    get:
      summary: Fetch Adaptive Decision result [testing]
      description: Fetch Adaptive Decision result
      operationId: getDecision
      parameters:
        - in: path
          name: submission_id
          required: true
          schema:
            type: string
        - in: query
          name: embed
          description: >-
            Comma-separated list of `decision_inputs` that should be included
            into `data` attribute, e.g. `?embed=fraud`.
          example: fraud
          required: false
          schema:
            type: string
      responses:
        '200':
          description: >-
            Results of Adaptive Decision if Adaptive Decision was enabled for
            the submission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdaptiveDecisionResponse'
              examples:
                approved:
                  summary: Document approved
                  value:
                    status: SUCCESS
                    adaptive_decision_version: 0b17b09f
                    decision: APPROVED
                    decision_inputs:
                      fraud:
                        url: >-
                          /v2/submission/60669c20-0e55-44d1-8277-49efd7c0f85a/fraud
                        data: null
                    reason:
                      sub_reason:
                        value: Subreason value
                        label: Example label
                with_embedded_fraud:
                  summary: Response with ?embed=fraud showing embedded data
                  value:
                    status: SUCCESS
                    decision: APPROVED
                    decision_inputs:
                      fraud:
                        url: /v2/submission/abc123def456/fraud
                        data:
                          status: SUCCESS
                          analysis_time: '2024-03-15T10:30:00Z'
                          file_type: pdf
                          mime_type: application/pdf
                          deployment_version: 3.5.1
                          query_id: customer-doc-789
                          sha256: >-
                            e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
                          filtered_parsed_pages: []
                          num_pages: 1
                          score: NORMAL
                          sample_metadata:
                            producer: LibreOffice 7.4
                            creator: Example
                            creation_date: '2024-03-10T08:00:00Z'
                            mod_date: '2024-03-10T08:00:00Z'
                          document_tags:
                            - PDF
                          indicators:
                            - indicator_id: example
                              type: RISK
                              category: category
                              title: Title
                              description: Desc
                              origin: fraud
                              metadata: null
                    adaptive_decision_version: 1.2.0
                    reason: null
        '400':
          description: >-
            Bad request. Submission must be created with `enable_decision` flag
            set to `true`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Not found. Submission doesn't exist or verdict is not ready yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - OAuth2:
            - submissions.read
components:
  schemas:
    AdaptiveDecisionResponse:
      title: Adaptive Decision response
      discriminator:
        propertyName: status
        mapping:
          SUCCESS:
            $ref: '#/components/schemas/AdaptiveDecisionSuccessResponse'
          FAILED:
            $ref: '#/components/schemas/AdaptiveDecisionNonSuccessResponse'
          INVALID_INPUT:
            $ref: '#/components/schemas/AdaptiveDecisionNonSuccessResponse'
          INVALID_PIPELINE_CONFIG:
            $ref: '#/components/schemas/AdaptiveDecisionNonSuccessResponse'
          SKIPPED:
            $ref: '#/components/schemas/AdaptiveDecisionNonSuccessResponse'
      oneOf:
        - $ref: '#/components/schemas/AdaptiveDecisionSuccessResponse'
        - $ref: '#/components/schemas/AdaptiveDecisionNonSuccessResponse'
    Error:
      title: Error
      type: object
      properties:
        message:
          title: Error message
          description: Detailed error message
          minLength: 0
          maxLength: 512
          type: string
      required:
        - message
    AdaptiveDecisionSuccessResponse:
      title: Adaptive Decision success response
      type: object
      properties:
        status:
          title: Status
          description: '`SUCCESS` status indicates the Adaptive Decision result is available'
          type: string
          enum:
            - SUCCESS
        decision:
          title: Decision outcome
          type: string
          description: >-
            Configurable decision outcome determined by tenant-specific Adaptive
            Decision rules. Default values are APPROVED, DECLINED, or
            MANUAL_REVIEW.
        decision_inputs:
          title: Decision inputs
          description: Analysis results used as inputs for the Adaptive Decision
          type: object
          properties:
            fraud:
              title: Fraud analysis result
              description: >-
                Reference to fraud analysis result. Full data is included only
                when requested with the embed query parameter.
              type: object
              properties:
                url:
                  title: Fraud analysis URL
                  description: URL where the full fraud analysis result can be retrieved
                  example: /v2/submission/submission123/fraud
                  type: string
                  format: uri
                data:
                  $ref: '#/components/schemas/AnalysisResponse'
              required:
                - url
        adaptive_decision_version:
          title: Version of Adaptive Decision configuration
          type: string
        reason:
          title: Decision reason
          description: >-
            Tenant-specific explanation of why this decision outcome was
            returned
          type: object
          properties:
            sub_reason:
              type: object
              properties:
                value:
                  title: Reason identifier
                  description: Machine-readable identifier of the reason
                  type: string
                  maxLength: 1024
                label:
                  title: Reason description
                  description: Human-readable description of the reason
                  type: string
                  maxLength: 1024
          nullable: true
      required:
        - status
        - decision
        - decision_inputs
        - adaptive_decision_version
    AdaptiveDecisionNonSuccessResponse:
      title: Adaptive Decision failed response
      type: object
      properties:
        status:
          title: Status
          description: >-
            INVALID_INPUT indicates the document cannot be parsed.
            INVALID_PIPELINE_CONFIG indicates a missing pipeline component.
            FAILED indicates analysis or decision processing failed. SKIPPED
            indicates Adaptive Decision did not run.
          enum:
            - FAILED
            - INVALID_INPUT
            - INVALID_PIPELINE_CONFIG
            - SKIPPED
          type: string
        message:
          title: Error message
          minLength: 0
          maxLength: 256
          type: string
        adaptive_decision_version:
          title: Version of Adaptive Decision configuration
          type: string
      required:
        - status
        - adaptive_decision_version
    AnalysisResponse:
      title: Fraud  analysis response
      discriminator:
        propertyName: status
        mapping:
          SUCCESS:
            $ref: '#/components/schemas/AnalysisSuccessResponse'
          FAILED:
            $ref: '#/components/schemas/PipelineFailedResponse'
          INVALID_INPUT:
            $ref: '#/components/schemas/PipelineInvalidInputResponse'
          SKIPPED:
            $ref: '#/components/schemas/PipelineSkippedResponse'
      anyOf:
        - $ref: '#/components/schemas/AnalysisSuccessResponse'
        - $ref: '#/components/schemas/PipelineFailedResponse'
        - $ref: '#/components/schemas/PipelineInvalidInputResponse'
        - $ref: '#/components/schemas/PipelineSkippedResponse'
    AnalysisSuccessResponse:
      title: Analysis success response
      type: object
      properties:
        status:
          title: Status
          enum:
            - SUCCESS
          type: string
        analysis_time:
          title: Analysis time
          description: Timestamp of analysis
          type: string
        file_type:
          $ref: '#/components/schemas/FileType'
          title: File type
          description: General type of the input file
        mime_type:
          title: Mime type
          description: >-
            Mime type of the input file, e.g. `application/pdf`, `image/jpeg`,
            etc.
          minLength: 0
          maxLength: 256
          type: string
        deployment_version:
          title: Deployment version
          description: Version of quality engine used for analysis
          minLength: 0
          maxLength: 256
          type: string
        query_id:
          title: Query ID
          description: >-
            Optional customer-defined identifier for correlating this submission
            with internal systems. Must not contain PII.
          minLength: 0
          maxLength: 2048
          type: string
          nullable: true
        sha256:
          title: File sha256
          description: Sha256 of the input file
          minLength: 64
          maxLength: 64
          type: string
        filtered_parsed_pages:
          title: Filtered pages
          description: >-
            List of pages that were selected from document for processing, empty
            list means all pages were selected
          type: array
          items:
            type: integer
          minItems: 0
        num_pages:
          title: Number of pages in document
          description: >-
            Number of pages in submitted document. Note that, for images, this
            is equal to 1
          type: integer
        document_tags:
          title: Document tags
          description: >-
            Machine-readable labels for high-confidence document characteristics
            such as file type or origin. Tags are additive summaries; the
            absence of a tag does not imply the opposite condition.
          type: array
          items:
            $ref: '#/components/schemas/DocumentTag'
        score:
          $ref: '#/components/schemas/FraudScore'
          title: Overall fraud score
          description: >-
            Overall fraud score for the analyzed document. TRUSTED indicates
            identified trust signals. NORMAL indicates no particular trust or
            risk signals. WARNING indicates likely modification or scan
            characteristics. HIGH_RISK indicates modifications commonly
            associated with fraud or forgery. This is an internal score; for
            customizable decision outcomes, use Adaptive Decision via the
            /decision endpoint.
        sample_metadata:
          $ref: '#/components/schemas/SampleMetadata'
          title: File metadata
          description: >-
            Metadata extracted from the analyzed file, such as creation date and
            software used to create the file.
        indicators:
          title: Indicators
          description: >-
            Detailed findings from the document analysis. Each indicator
            represents a specific observation about the file. Some indicators
            are positive (trust signals) while others indicate risk.
          type: array
          items:
            $ref: '#/components/schemas/Indicator'
        document_class:
          $ref: '#/components/schemas/DocumentClassType'
          title: Document class(Deprecated)
          nullable: true
      required:
        - status
        - analysis_time
        - file_type
        - mime_type
        - deployment_version
        - query_id
        - sha256
        - score
        - sample_metadata
        - indicators
        - filtered_parsed_pages
        - num_pages
        - document_tags
    PipelineFailedResponse:
      title: Pipeline failed
      type: object
      properties:
        status:
          title: Status
          enum:
            - FAILED
          type: string
        message:
          title: Error message
          minLength: 0
          maxLength: 256
          type: string
        deployment_version:
          title: Deployment version
          description: Version of analysis engine used for analysis
          minLength: 0
          maxLength: 256
          type: string
        analysis_time:
          title: Analysis time
          description: Timestamp of analysis
          type: string
        file_type:
          $ref: '#/components/schemas/FileType'
          title: File type
          description: General type of the input file
          type: string
          nullable: true
        mime_type:
          title: Mime type
          description: >-
            Mime type of the input file, e.g. `application/pdf`, `image/jpeg`,
            etc.
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
        query_id:
          title: Query ID
          description: >-
            Optional customer-defined identifier for correlating this submission
            with internal systems. Must not contain PII.
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
      required:
        - status
        - message
        - deployment_version
        - analysis_time
    PipelineInvalidInputResponse:
      title: Unprocessable input entity
      type: object
      properties:
        status:
          title: Status
          enum:
            - INVALID_INPUT
          type: string
        message:
          title: Error message
          minLength: 0
          maxLength: 256
          type: string
        deployment_version:
          title: Deployment version
          description: Version of analysis engine used for analysis
          minLength: 0
          maxLength: 256
          type: string
        analysis_time:
          title: Analysis time
          description: Timestamp of analysis
          type: string
        file_type:
          $ref: '#/components/schemas/FileType'
          description: General type of the input file
          title: File Type
        mime_type:
          title: Mime type
          description: >-
            Mime type of the input file, e.g. `application/pdf`, `image/jpeg`,
            etc.
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
        query_id:
          title: Query ID
          description: >-
            Optional customer-defined identifier for correlating this submission
            with internal systems. Must not contain PII.
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
      required:
        - status
        - message
        - deployment_version
        - analysis_time
    PipelineSkippedResponse:
      title: Pipeline was skipped
      type: object
      properties:
        status:
          title: Status
          default: SKIPPED
          enum:
            - SKIPPED
          type: string
        message:
          title: Pipeline skipped
          minLength: 0
          maxLength: 256
          type: string
        deployment_version:
          title: Deployment version
          description: Version of analysis engine used for analysis
          minLength: 0
          maxLength: 256
          type: string
        analysis_time:
          title: Analysis time
          description: Timestamp of analysis
          type: string
        query_id:
          title: Query ID
          description: >-
            Optional customer-defined identifier for correlating this submission
            with internal systems. Must not contain PII.
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
      required:
        - message
        - deployment_version
        - analysis_time
    FileType:
      title: FileType
      description: Type of analyzed file
      enum:
        - unsupported
        - pdf
        - image
      type: string
    DocumentTag:
      title: DocumentTag
      description: Tag of a document.
      anyOf:
        - enum:
            - IMAGE
            - PDF
            - DIGITAL
            - SCAN
            - MODEL_MATCHED
            - TRUSTED
        - type: string
      type: string
    FraudScore:
      title: FraudScore
      description: >-
        Internal fraud score produced by document analysis. This is a fixed
        internal classification. For customizable decision outcomes, use
        Adaptive Decision via the /decision endpoint, which can be configured to
        match your specific risk policies and business rules.
      enum:
        - NORMAL
        - TRUSTED
        - WARNING
        - HIGH_RISK
      type: string
    SampleMetadata:
      title: SampleMetadata
      description: Metadata of an analyzed file.
      type: object
      properties:
        producer:
          title: Document producer
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
        creator:
          title: Document creator
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
        creation_date:
          title: Creation date
          type: string
          nullable: true
        mod_date:
          title: Modification date
          type: string
          nullable: true
        author:
          title: Document author
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
        title:
          title: Document title
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
        keywords:
          title: Keywords
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
        subject:
          title: Subject
          minLength: 0
          maxLength: 256
          type: string
          nullable: true
    Indicator:
      title: Analysis indicator
      type: object
      properties:
        indicator_id:
          title: Indicator ID
          description: Unique identifier for the indicator
          minLength: 0
          maxLength: 256
          type: string
        type:
          $ref: '#/components/schemas/IndicatorType'
          title: Indicator type
          description: Type of indicator.
        category:
          title: Indicator category
          description: Category of indicator (e.g. `modifications`, `text_hiding`, etc.)
          minLength: 0
          maxLength: 256
          type: string
        title:
          title: Indicator title
          minLength: 0
          maxLength: 256
          type: string
        description:
          title: Indicator description
          description: Detailed description of the indicator.
          minLength: 0
          maxLength: 2048
          type: string
        metadata:
          $ref: '#/components/schemas/IndicatorMetadata'
          title: Indicator metadata
          type: object
          nullable: true
        indicator_attributes:
          description: Additional indicator-specific attributes associated with Indicator
          discriminator:
            propertyName: type
            mapping:
              SerialFraudIndicatorAttributes:
                $ref: '#/components/schemas/SerialFraudIndicatorAttributes'
              LogoIndicatorAttributes:
                $ref: '#/components/schemas/HasLogoIndicatorAttributes'
          anyOf:
            - $ref: '#/components/schemas/SerialFraudIndicatorAttributes'
            - $ref: '#/components/schemas/HasLogoIndicatorAttributes'
          type: object
          nullable: true
        origin:
          title: Origin
          enum:
            - fraud
            - quality
          type: string
      required:
        - indicator_id
        - type
        - category
        - title
        - description
        - origin
    DocumentClassType:
      title: DocumentClassType
      deprecated: true
      description: >-
        This field will be removed from the /fraud API response in November
        2025. Please use the /classification endpoint for accessing document
        classification results. Deprecated and replaced by document
        classification.
      discriminator:
        propertyName: document_class_type
        mapping:
          DocumentClass:
            $ref: '#/components/schemas/DocumentClass'
          IdDocumentClass:
            $ref: '#/components/schemas/IdDocumentClass'
          UtilityBillDocumentClass:
            $ref: '#/components/schemas/UtilityBillDocumentClass'
      anyOf:
        - $ref: '#/components/schemas/DocumentClass'
        - $ref: '#/components/schemas/IdDocumentClass'
        - $ref: '#/components/schemas/UtilityBillDocumentClass'
    IndicatorType:
      title: IndicatorType
      description: Type of a quality indicator.
      enum:
        - RISK
        - TRUST
        - INFO
      type: string
    IndicatorMetadata:
      title: Indicator metadata
      description: >-
        Additional metadata associated with the indicator. Content may evolve
        and change without prior notice. Intended primarily for UI visualization
        and tracking purposes.
      discriminator:
        propertyName: type
        mapping:
          DataOnly:
            $ref: '#/components/schemas/DataOnlyIndicatorMetadata'
          ElementsCollection:
            $ref: '#/components/schemas/ElementsCollectionIndicatorMetadata'
          CombiningIndicatorMetadata:
            $ref: '#/components/schemas/CombiningIndicatorMetadata'
      anyOf:
        - $ref: '#/components/schemas/DataOnlyIndicatorMetadata'
        - $ref: '#/components/schemas/ElementsCollectionIndicatorMetadata'
        - $ref: '#/components/schemas/CombiningIndicatorMetadata'
    SerialFraudIndicatorAttributes:
      title: Additional serial-fraud related attributes
      properties:
        type:
          title: Attribute type discriminator
          type: string
          enum:
            - SerialFraudIndicatorAttributes
          default: SerialFraudIndicatorAttributes
        serial_fraud_cluster_id:
          title: Serial fraud cluster ID
          type: string
        cluster_submission_ids_sample:
          title: Other submissions in the same serial fraud cluster
          type: array
          items:
            type: string
        cluster_query_ids_sample:
          title: Other query ids in the same serial fraud cluster
          type: array
          items:
            type: string
        indicator_id:
          title: Indicator ID (deprecated, use type as discriminator)
          type: string
          nullable: true
          deprecated: true
      required:
        - type
        - serial_fraud_cluster_id
        - cluster_submission_ids_sample
    HasLogoIndicatorAttributes:
      title: Additional attributes for Has logo indicator
      properties:
        type:
          title: Attribute type discriminator
          type: string
          enum:
            - LogoIndicatorAttributes
          default: LogoIndicatorAttributes
        logo_primary:
          $ref: '#/components/schemas/LogoAttributes'
          title: Primary detected logo
        detected_logos:
          title: List of detected logos
          type: array
          items:
            $ref: '#/components/schemas/LogoAttributes'
        indicator_id:
          title: Indicator ID (deprecated, use type as discriminator)
          type: string
          nullable: true
          deprecated: true
      required:
        - type
        - detected_logos
    DocumentClass:
      title: DocumentClass
      type: object
      properties:
        id:
          title: Document class
          description: >-
            Document class that describes type of file submitted for analysis,
            e.g. invoice, account statement, payslip, etc.
          minLength: 0
          maxLength: 256
          type: string
        type:
          $ref: '#/components/schemas/DocumentType'
          title: Document class identifier
          description: >-
            A unique identifier for the document class, e.g.
            `invoice_bouygues_fra`, `receipt_github`, `payslip_sdworx`, etc.
        document_class_type:
          title: Object discriminator
          description: >-
            This field can be used to discriminate the actual type of the
            serialized object, for more details see
            http://spec.openapis.org/oas/v3.1.0#composition-and-inheritance-polymorphism.
            Note that the list is not fixed and additional types may be added
            without further notice.
          enum:
            - DocumentClass
          type: string
      required:
        - id
        - type
        - document_class_type
    IdDocumentClass:
      title: IdDocumentClass
      type: object
      properties:
        id:
          title: Document class
          description: >-
            Document class that describes type of file submitted for analysis,
            e.g. invoice, account statement, payslip, etc.
          minLength: 0
          maxLength: 256
          type: string
        type:
          $ref: '#/components/schemas/DocumentType'
          title: Document class identifier
          description: >-
            A unique identifier for the document class, e.g.
            `invoice_bouygues_fra`, `receipt_github`, `payslip_sdworx`, etc.
        document_class_type:
          title: Document Class Type
          enum:
            - IdDocumentClass
          type: string
        detailed_type:
          $ref: '#/components/schemas/IdDocumentType'
          title: ID document type
          description: >-
            Type of the ID document, e.g. id card, passport, health insurance
            card, etc. Note that the list is not fixed and additional types may
            be added without further notice.
        issuing_country:
          title: Issuing country
          description: >-
            Country that issued this ID document, e.g. USA, DEU, FRA, CZE, SVK,
            etc. The country code is encoded with ISO-31661 alpha-3 code, see
            https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements.
          minLength: 3
          maxLength: 3
          type: string
      required:
        - id
        - type
        - document_class_type
        - detailed_type
        - issuing_country
    UtilityBillDocumentClass:
      title: UtilityBillDocumentClass
      type: object
      properties:
        id:
          title: Document class
          description: >-
            Document class that describes type of file submitted for analysis,
            e.g. invoice, account statement, payslip, etc.
          minLength: 0
          maxLength: 256
          type: string
        type:
          $ref: '#/components/schemas/DocumentType'
          title: Document class identifier
          description: >-
            A unique identifier for the document class, e.g.
            `invoice_bouygues_fra`, `receipt_github`, `payslip_sdworx`, etc.
        document_class_type:
          title: Document Class Type
          enum:
            - UtilityBillDocumentClass
          type: string
        detailed_type:
          $ref: '#/components/schemas/UtilityBillType'
          title: Utility bill type
          description: >-
            Type of the utility bill. Note that the list is not fixed and
            additional types may be added without further notice.
      required:
        - id
        - type
        - document_class_type
        - detailed_type
    DataOnlyIndicatorMetadata:
      title: DataOnlyIndicatorMetadata
      type: object
      properties:
        type:
          title: Type
          enum:
            - DataOnly
          type: string
        column_names:
          title: Column names
          description: Names of individual columns in data table
          type: array
          items:
            type: string
        data:
          title: Data
          description: >-
            Detailed information related to given indicator, e.g. document
            metadata, details about discrepancies in parsed content, etc.
          type: array
          items:
            type: array
            items:
              anyOf:
                - type: string
                - type: integer
                - type: number
                - type: boolean
                - type: array
                  items:
                    type: string
                  uniqueItems: true
              nullable: true
        title:
          title: Title
          description: Title of the data table
          type: string
          nullable: true
      required:
        - type
        - column_names
        - data
    ElementsCollectionIndicatorMetadata:
      title: ElementsCollectionIndicatorMetadata
      type: object
      properties:
        type:
          title: Type
          enum:
            - ElementsCollection
          type: string
        data:
          title: Metadata elements
          description: >-
            Metadata elements that represents individual detections, e.g.
            modified characters, area with flash reflection, etc.
          type: array
          items:
            $ref: '#/components/schemas/IndicatorMetadataElement'
        columns_definition:
          title: Columns definition
          description: Definition of columns in data table.
          type: array
          items:
            $ref: '#/components/schemas/ColumnDefinition'
        title:
          title: Title
          description: Title of the data table
          type: string
          nullable: true
      required:
        - type
    CombiningIndicatorMetadata:
      title: CombiningIndicatorMetadata
      type: object
      properties:
        type:
          title: Type
          enum:
            - Combining
          type: string
        data:
          title: Metadata elements
          description: >-
            Metadata elements that represents individual detections, e.g.
            modified characters, area with flash reflection, etc. and detailed
            information related to given indicator, e.g. document metadata,
            details about discrepancies in parsed content, etc.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ElementsCollectionIndicatorMetadata'
              - $ref: '#/components/schemas/DataOnlyIndicatorMetadata'
      required:
        - type
    LogoAttributes:
      title: Additional attributes for Has logo indicator
      properties:
        authority_id:
          title: Issuer authority ID
          type: string
        authority_name:
          title: Issuer authority name
          type: string
        authority_type:
          title: Issuer authority type
          enum:
            - bank
            - government
            - insurance
            - income
            - multipurpose
            - utility
            - unclassified
        authority_country:
          title: Issuer authority country
          description: >-
            Country that issued this document, e.g. USA, DEU, FRA, CZE, SVK,
            etc. The country code is encoded with ISO-31661 alpha-3 code, see
            https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements.
          minLength: 3
          maxLength: 3
          type: string
      required:
        - authority_id
        - authority_type
    DocumentType:
      title: DocumentType
      description: An enumeration.
      enum:
        - mixed
        - unknown
        - account_confirmation
        - account_statement
        - bank_details
        - delivery_note
        - company_detail
        - earnings_confirmation
        - employer_identification_number
        - fees_statement
        - government_registry_confirmation
        - id_document
        - incorporation_certificate
        - insurance_claim
        - insurance_documentation
        - invoice
        - order
        - order_confirmation
        - payment
        - payment_confirmation
        - payslip
        - proof_of_address
        - receipt
        - registration_certificate
        - rental_agreement
        - report
        - residence_certificate
        - tax_form
        - tax_information
        - ticket
        - tracking_note
        - transaction_detail
        - transaction_history
        - transport_order
        - utility_bill
        - vehicle_appraisal
        - vehicle_registration_certificate
        - account_overview
        - account_passbook
        - accounting_records
        - appointment_detail
        - axel
        - contract
        - court_documents
        - earnings_statement
        - earnings_summary
        - email
        - letter
        - loan_offer
        - income_confirmation_form
        - insurance_claim_notice
        - insurance_settlement
        - load_confirmation
        - medical_documentation
        - policy
        - quote
        - rate_confirmation
        - request_for_payment
        - serial_fraud
        - timesheet
        - unemployment_certificate
        - bank_card
      type: string
    IdDocumentType:
      title: IdDocumentType
      description: An enumeration.
      enum:
        - unknown
        - birth_certificate
        - drivers_license
        - health_insurance_card
        - id_card
        - id_certificate
        - passport
        - residence_permit
      type: string
    UtilityBillType:
      title: UtilityBillType
      description: An enumeration.
      enum:
        - unknown
        - electricity
        - electricity_gas_water
        - mobile_phone
        - internet
        - internet_mobile_television
        - municipal_services
      type: string
    IndicatorMetadataElement:
      title: IndicatorMetadataElement
      discriminator:
        propertyName: type
        mapping:
          BBoxOnly:
            $ref: '#/components/schemas/BBoxOnlyMetadataElement'
          BBoxGroups:
            $ref: '#/components/schemas/BBoxGroupsMetadataElement'
          BBoxWithOldAndNewText:
            $ref: '#/components/schemas/NewAndOldTextMetadataElement'
          BBoxWithText:
            $ref: '#/components/schemas/TextMetadataElement'
          BBoxIncrementalUpdate:
            $ref: '#/components/schemas/IncrementalUpdateIndicatorMetadataElement'
      anyOf:
        - $ref: '#/components/schemas/BBoxOnlyMetadataElement'
        - $ref: '#/components/schemas/BBoxGroupsMetadataElement'
        - $ref: '#/components/schemas/NewAndOldTextMetadataElement'
        - $ref: '#/components/schemas/TextMetadataElement'
        - $ref: '#/components/schemas/IncrementalUpdateIndicatorMetadataElement'
    ColumnDefinition:
      title: ColumnDefinition
      type: object
      properties:
        column_name:
          title: Column name
          description: Name of column in data table
          type: string
        field_name:
          title: Field name
          description: Field name in IndicatorMetadataElement object
          type: string
      required:
        - column_name
        - field_name
    BBoxOnlyMetadataElement:
      title: Metadata element with single bounding box
      type: object
      properties:
        type:
          title: Type
          enum:
            - BBoxOnly
          type: string
        page_id:
          title: Page id
          description: >-
            Number of the page corresponding to the modification. Note that
            first page has page_id = 0. In case of images, the page_id is always
            0.
          type: integer
        bbox:
          $ref: '#/components/schemas/BoundingBox'
          title: Bounding box
          description: Bounding box corresponding to given modification
      required:
        - type
        - page_id
        - bbox
    BBoxGroupsMetadataElement:
      title: Metadata element with multiple bounding boxes
      type: object
      properties:
        type:
          title: Type
          enum:
            - BBoxGroups
          type: string
        page_id:
          title: Page id
          description: >-
            Number of the page corresponding to the modification. Note that
            first page has page_id = 0. In case of images, the page_id is always
            0.
          type: integer
        bbox:
          title: Bounding boxes
          description: >-
            Group of bounding boxes corresponding to given modification, e.g.
            copy-move detection where single character is copied to multiple
            places
          type: array
          items:
            $ref: '#/components/schemas/BoundingBox'
      required:
        - type
        - page_id
        - bbox
    NewAndOldTextMetadataElement:
      title: Metadata element with bounding box, original text and modified text
      type: object
      properties:
        type:
          title: Type
          enum:
            - BBoxWithOldAndNewText
          type: string
        page_id:
          title: Page id
          description: >-
            Number of the page corresponding to the modification. Note that
            first page has page_id = 0. In case of images, the page_id is always
            0.
          type: integer
        bbox:
          $ref: '#/components/schemas/BoundingBox'
          title: Bounding box
          description: Bounding box corresponding to given modification
        original_text:
          title: Original text
          description: Text that was originally present in the document.
          type: string
          nullable: true
        new_text:
          title: New text
          description: Text that replaced or modified the original text.
          type: string
          nullable: true
      required:
        - type
        - page_id
        - bbox
        - original_text
        - new_text
    TextMetadataElement:
      title: Metadata element with bounding box and additional text data
      type: object
      properties:
        type:
          title: Type
          enum:
            - BBoxWithText
          type: string
        page_id:
          title: Page id
          description: >-
            Number of the page corresponding to the modification. Note that
            first page has page_id = 0. In case of images, the page_id is always
            0.
          type: integer
        bbox:
          $ref: '#/components/schemas/BoundingBox'
          title: Bounding box
          description: Bounding box corresponding to given modification
        text:
          title: Text
          type: string
          nullable: true
      required:
        - type
        - page_id
        - bbox
        - text
    IncrementalUpdateIndicatorMetadataElement:
      title: Metadata element with bounding box, original text and modified text
      type: object
      properties:
        type:
          title: Type
          enum:
            - BBoxIncrementalUpdate
          type: string
        page_id:
          title: Page id
          description: >-
            Number of the page corresponding to the modification. Note that
            first page has page_id = 0. In case of images, the page_id is always
            0.
          type: integer
        bbox:
          $ref: '#/components/schemas/BoundingBox'
          title: Bounding box
          description: Bounding box corresponding to given modification
        original_text:
          title: Original text
          description: Text that was originally present in the document.
          type: string
          nullable: true
        new_text:
          title: New text
          description: Text that replaced or modified the original text.
          type: string
          nullable: true
        update_type:
          $ref: '#/components/schemas/IncrementalUpdateType'
          title: Update type
          description: Type of incremental update change
      required:
        - type
        - page_id
        - bbox
        - original_text
        - new_text
        - update_type
    BoundingBox:
      title: Bounding box of given modification
      type: object
      properties:
        x:
          title: Bounding box X coordinate
          description: >-
            Horizontal position of the lower left corner of the detected
            modification.
          type: number
        'y':
          title: Bounding box Y coordinate.
          description: >-
            Vertical position of the lower left corner of the detected
            modification.
          type: number
        width:
          title: Bounding box width.
          description: Width of the detected modification.
          type: number
        height:
          title: Bounding box height.
          description: Height of the detected modification.
          type: number
      required:
        - x
        - 'y'
        - width
        - height
    IncrementalUpdateType:
      title: IncrementalUpdateType
      description: An enumeration.
      enum:
        - add
        - edit
        - remove
      type: string
  responses:
    Unauthorized:
      description: Missing valid authentication credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Access to the requested resource is forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnsupportedMediaType:
      description: Unsupported media type.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Request quota was exceeded
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://eu.id.resistant.ai/oauth2/aus17c52xbW6c0yA9417/v1/token
          scopes:
            submissions.read: Read analysis results for a submission
            submissions.write: Create a new submission

````