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

# Get validity results for a specific document



## OpenAPI

````yaml /openapi.json get /policies/{policyId}/documents/validity/{documentId}
openapi: 3.0.0
info:
  title: Korint API
  description: >-
    Quoting, policy issuance, billing, claims, documents and compliance for
    insurance distribution.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.korint.io
    description: Production
  - url: https://api.sandbox.korint.io
    description: Sandbox
security:
  - oauth2: []
  - bearerAuth: []
tags: []
paths:
  /policies/{policyId}/documents/validity/{documentId}:
    get:
      tags:
        - document-validity
      summary: Get validity results for a specific document
      operationId: DocumentValidityController_getDocumentValidity
      parameters:
        - name: tenant
          in: header
          required: true
          description: Your tenant identifier. Requests without it are rejected.
          schema:
            type: string
        - name: policyId
          required: true
          in: path
          schema:
            pattern: >-
              ^policy(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
            type: string
        - name: documentId
          required: true
          in: path
          schema:
            pattern: >-
              ^document(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDocumentValidityOutput'
        '500':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/DocumentValidityFailedErrorDto'
              examples:
                DOCUMENT_VALIDITY_FAILED:
                  value:
                    code: DOCUMENT_VALIDITY_FAILED
                    message: Document validity check failed for document {documentId}
                    details: {}
          description: ''
components:
  schemas:
    GetDocumentValidityOutput:
      type: object
      properties:
        documentId:
          type: string
          description: Document ID
        status:
          type: string
          description: Overall validity status
          enum:
            - PENDING
            - VALID
            - INVALID
            - FAILED
            - SKIPPED
        results:
          description: Results for each validity rule
          type: array
          items:
            $ref: '#/components/schemas/DocumentValidityRuleResultDto'
        aiMetadata:
          type: object
          description: AI validity metadata
        checkedAt:
          type: string
          description: Last check timestamp
        override:
          description: Override metadata if validity was manually overridden
          allOf:
            - $ref: '#/components/schemas/ValidityOverrideDto'
      required:
        - documentId
        - status
        - results
    DocumentValidityFailedErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - DOCUMENT_VALIDITY_FAILED
        message:
          type: string
          example: Document validity check failed for document {documentId}
        details:
          $ref: '#/components/schemas/DocumentValidityFailedDetailsDto'
      required:
        - code
        - message
        - details
    DocumentValidityRuleResultDto:
      type: object
      properties:
        ruleType:
          type: string
          description: Rule type that was checked
          enum:
            - READABLE
            - REQUIRED_FIELDS
            - PROMPT
            - FIELD_VALIDATION
        passed:
          type: boolean
          description: Whether the rule passed
        message:
          type: string
          description: Failure message if rule did not pass
        metadata:
          type: object
          description: Additional metadata about the rule result
      required:
        - ruleType
        - passed
    ValidityOverrideDto:
      type: object
      properties:
        overriddenBy:
          type: string
          description: User ID who performed the override
        overriddenAt:
          type: string
          description: ISO timestamp of the override
        previousStatus:
          type: string
          description: Status before the override
        originalStatus:
          type: string
          description: Original AI-determined status before any manual override
      required:
        - overriddenBy
        - overriddenAt
        - previousStatus
    DocumentValidityFailedDetailsDto:
      type: object
      properties:
        documentId:
          type: string
        reason:
          type: string
      required:
        - documentId
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://korint-tenant.auth.eu-west-3.amazoncognito.com/oauth2/token
          scopes:
            korint.io/account: Read account information
            korint.io/analytics: Access analytics endpoints
            korint.io/assets: Access asset endpoints
            korint.io/billing: Access billing endpoints
            korint.io/branches: Access branch endpoints
            korint.io/broker: Access broker endpoints
            korint.io/claims: Access claim endpoints
            korint.io/comments: Access comment endpoints
            korint.io/customers: Access customer endpoints
            korint.io/derogations: Access derogation endpoints
            korint.io/documents: Access document endpoints
            korint.io/external: Access external lookup endpoints
            korint.io/external-claims: Declare claims from an external system
            korint.io/internal-notes: Access internal note endpoints
            korint.io/invitations: Access invitation endpoints
            korint.io/payments: Access payment endpoints
            korint.io/permissions: Access permission management endpoints
            korint.io/policies: Access policy endpoints
            korint.io/quotes: Access quote endpoints
            korint.io/reportings: Access reporting endpoints
            korint.io/signature: Access signature endpoints
      description: >-
        Machine-to-machine clients use the OAuth 2.0 client credentials grant.
        Each tenant has its own authorization server: in the token URL below,
        replace `tenant` with your tenant identifier.
    bearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: An access token obtained from your tenant authorization server.

````