> ## 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.

# Get analysis feedback [testing]

> Get custom feedback for the document analysis result previously stored with a PUT request to this endpoint.



## OpenAPI

````yaml /spec-testing.json get /v2/submission/{submission_id}/feedback
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}/feedback:
    get:
      summary: Get analysis feedback [testing]
      description: >-
        Get custom feedback for the document analysis result previously stored
        with a PUT request to this endpoint.
      operationId: getFeedback
      parameters:
        - in: path
          name: submission_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Custom feedback for fraud analysis.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeedbackResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Not found. Submission or feedback doesn't exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - OAuth2:
            - submissions.read
components:
  schemas:
    FeedbackResponse:
      title: FeedbackResponse
      type: object
      properties:
        analysis_feedback:
          $ref: '#/components/schemas/AnalysisFeedback'
          title: Analysis feedback
          description: Type of feedback on the result of document analysis.
        comment:
          title: Feedback comment
          description: Additional feedback comment.
          minLength: 0
          maxLength: 1024
          type: string
          nullable: true
        updated:
          title: Feedback timestamp
          description: UTC date and time of the latest feedback update.
          type: string
      required:
        - analysis_feedback
        - updated
    Error:
      title: Error
      type: object
      properties:
        message:
          title: Error message
          description: Detailed error message
          minLength: 0
          maxLength: 512
          type: string
      required:
        - message
    AnalysisFeedback:
      title: Analysis Feedback
      description: Type of feedback on the result of document analysis.
      enum:
        - CORRECT
        - NOT_CORRECT
      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

````