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

# Get list of all validation results

> Returns the validation results of a document.



## OpenAPI

````yaml https://api.affinda.com/static/v3/api_spec.yaml get /v3/validation_results
openapi: 3.0.3
info:
  description: >-
    # Introduction

    Affinda uses the latest advancements in AI technology to rapidly process
    documents with better-than-human accuracy.

    This guide covers how to:

    * Extract structured data from a range of document types

    * Integrate our solutions into your platform

    * Manage users


    *Note: This API spec is for v3 of the API, the deprecated v2 documentation
    [can be found here](https://api.affinda.com/docs/v2)*


    > **Important: Use the correct API URL for your region.** Affinda is hosted
    across multiple instances. Make sure you are sending requests to the correct
    URL for your account:

    > | Instance | API Base URL |

    > |----------|-------------|

    > | **AUS / Global** | `https://api.affinda.com` |

    > | **US** | `https://api.us1.affinda.com` |

    > | **EU** | `https://api.eu1.affinda.com` |

    >

    > You can determine your instance from the URL you use to access the Affinda
    web app (e.g. `app.us1.affinda.com` means you are on the US instance). When
    using the "Try it" feature, select the matching region from the server
    dropdown.

    # Getting Started

    * Obtain an API key by [signing up for a
    free-trial](https://app.affinda.com/auth/register)

    * (Recommended) Download and install one of our client libraries: *
    [Python](https://github.com/affinda/affinda-python) : `pip install affinda`
    * [Javascript](https://github.com/affinda/affinda-typescript) : `npm install
    @affinda/affinda` * [.NET](https://github.com/affinda/affinda-dotnet):
    `dotnet add package Affinda.API` *
    [Java](https://github.com/affinda/affinda-java) - [maven
    repository](https://mvnrepository.com/artifact/com.affinda.api/affinda-api-client)

    * Without a client library, API requests via HTTP according to the API spec
    in this documentation
  version: v3
  title: Affinda API
  contact:
    email: contact@affinda.com
  license:
    name: MIT
    url: https://raw.githubusercontent.com/affinda/affinda-api-spec/master/LICENSE
  x-logo:
    url: https://api.affinda.com/static/documentation/affinda_logo.png
    backgroundColor: '#FFFFFF'
    altText: Affinda logo
servers:
  - url: https://{region}.affinda.com
    description: >-
      Select the correct server for your instance: api (AUS/Global), api.us1
      (US), or api.eu1 (EU).
    variables:
      region:
        default: api
        description: >-
          The instance region. Use 'api' for AUS/Global, 'api.us1' for US, or
          'api.eu1' for EU. You can find your region in the Affinda web app URL.
        enum:
          - api
          - api.eu1
          - api.us1
        x-ms-parameter-location: client
security:
  - ApiKeyAuth: []
tags:
  - name: Documents
    description: >
      Operations to upload documents for parsing.


      A document can be uploaded using `file` or `url`, one of these parameters
      must be provided.


      A document can be uploaded to a `workspace` or a `collection`, one of
      these parameters must also be provided.


      When uploaded to a workspace, the document's specific type will be
      predicted and auto classified into one of the collections before being
      parsed.


      When uploaded to a collection, the document will be parsed using that
      collection's extractor.
  - name: Organizations
    description: |
      Operations to manage organizations and organization memberships.

      Organizations are the top-level entity for managing users and workspaces.
  - name: Workspaces
    description: |
      Operations to manage workspaces.

      Workspaces group together related collections of documents.
  - name: Document Types
    description: >
      Operations to manage document types.


      Document types represent specific categories of documents with common
      extraction patterns, such as invoices or resumes.
  - name: Data Sources
    description: >
      Operations to manage custom mapping data sources. These are used to map
      from raw data extracted by

      Affinda AI models onto your own data model.
  - name: Validation Results
    description: >
      Operations to manage validation results.


      Validation results track the status and outcomes of document validation
      processes.
  - name: Usage
    description: >
      Operations to retrieve credits consumption.


      Returns daily credits usage for an organization, optionally narrowed to a
      single

      workspace or document type.
  - name: Tags
    description: >
      Operations to manage tags.


      Tags can be arbitrarily attached to documents to help organize and manage
      them.
  - name: Annotations
    description: >
      Operations to manually create, update, delete annotations.


      Together with the data point endpoints, these helps to annotate your
      documents with arbitrary data,

      or to edit annotations that were created by the Affinda parser.
  - name: Webhooks
    description: >
      Manage webhook integrations with your apps.


      Affinda have implemented webhooks to allow the data extracted by Affinda
      to be 'pushed' to you when an event occurs

      (e.g. document parsed or document validated), instead of you having to
      constantly poll our API to 'pull' the data to your system.
  - name: Search & Match
    description: >
      Operations to search through an index of documents and manage indexes via
      the Affinda Resume Parser API or a client library.


      Resumes and job descriptions must be explicitly added to an index, which
      then makes them searchable.
  - name: Deprecated End Points
    description: >
      Deprecated endpoints that are maintained for backward compatibility.


      These endpoints include Data Point, Collection, and Users functionality
      that has been superseded by newer APIs.
  - name: Add x-hidden to endpoints
    description: >
      Hidden endpoints not intended for public use.


      These endpoints include Splitting, Extractor, Organization, and Workspace
      Memberships & Usage functionality.
paths:
  /v3/validation_results:
    get:
      tags:
        - Validation Results
      summary: Get list of all validation results
      description: Returns the validation results of a document.
      operationId: getAllValidationResults
      parameters:
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - in: query
          name: document
          required: true
          schema:
            $ref: '#/components/schemas/DocumentMeta_properties-identifier'
          description: Filter by document.
      responses:
        '200':
          description: All matching workspace memberships.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ValidationResult'
        '400':
          $ref: '#/components/responses/400Error'
        '401':
          $ref: '#/components/responses/401Error'
        default:
          $ref: '#/components/responses/DefaultError'
components:
  parameters:
    offsetParam:
      in: query
      name: offset
      required: false
      schema:
        type: integer
        minimum: 0
        example: 0
      description: >-
        The number of documents to skip before starting to collect the result
        set.
      x-ms-parameter-location: method
    limitParam:
      in: query
      name: limit
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        example: 20
      description: The numbers of results to return.
      x-ms-parameter-location: method
  schemas:
    DocumentMeta_properties-identifier:
      type: string
      description: Unique identifier for the document
    ValidationResult:
      type: object
      additionalProperties: false
      nullable: false
      description: Validation result arising from a ValidationRule
      required:
        - id
        - annotations
        - passed
        - ruleSlug
        - message
        - document
      properties:
        id:
          type: integer
          description: Validation Result's ID
          example: 1
          minimum: 1
        annotations:
          type: array
          items:
            type: integer
          description: List of annotation ids that were validated
          nullable: false
          example:
            - 1
            - 2
            - 3
        passed:
          type: boolean
          description: >-
            Whether the validation passed or not, null if the validation was not
            applicable
          example: true
          nullable: true
        ruleSlug:
          type: string
          description: The kebab-case slug of the validation rule that was applied
          example: supplier-name-is-alphanumeric
          pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
        message:
          type: string
          description: Message explaining why the validation failed
          example: Expected 'ThisInputShouldMatch' to match regex pattern '[0-9]*
        document:
          $ref: '#/components/schemas/DocumentMeta_properties-identifier'
    RequestError:
      type: object
      additionalProperties: false
      required:
        - type
        - errors
      properties:
        type:
          type: string
          example: validation_error
        errors:
          type: array
          items:
            type: object
            required:
              - attr
              - code
              - detail
            properties:
              attr:
                type: string
                nullable: true
                example: non_field_errors
              code:
                type: string
                example: unique
              detail:
                type: string
                example: This index name has already been used
  responses:
    400Error:
      description: >-
        Bad request. If it is a validation error will contain a list of each
        invalid field
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestError'
      x-ms-error-response: true
    401Error:
      description: Authorisation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestError'
      x-ms-error-response: true
    DefaultError:
      description: UnexpectedError
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestError'
      x-ms-error-response: true
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Basic authentication using an API key, e.g. `{Authorization: Bearer
        aff_0bb4fbdf97b7e4111ff6c0015471094155f91}`.

        You can find your API key within the Settings page of the [Affinda web
        app](https://app.affinda.com/). You can obtain an API key by [signing up
        for a free trial](https://app.affinda.com/auth/register).

````