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

# Get document test detail

> Retrieves a single document test by id, including the fully-hydrated `results` payload (for MECE rows this loads per-document detail from the relational tables on demand). The list endpoint omits this payload to keep polling cheap.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/avido/openapi.documented.yml get /v0/documents/tests/{id}
openapi: 3.1.1
info:
  title: Avido API
  description: >-
    Avido's API for LLM usage events, tool calls, trace management, webhook
    validation, and more. See each endpoint's request/response schema for
    details.
  version: 0.1.0
  contact:
    name: Avido Support
    email: support@avidoai.com
    url: https://avidoai.com/support
servers:
  - url: https://api.avidoai.com
    description: Production API
security:
  - ApiKey: []
    ApplicationId: []
paths:
  /v0/documents/tests/{id}:
    get:
      tags:
        - Document Tests
      summary: Get document test detail
      description: >-
        Retrieves a single document test by id, including the fully-hydrated
        `results` payload (for MECE rows this loads per-document detail from the
        relational tables on demand). The list endpoint omits this payload to
        keep polling cheap.
      operationId: getDocumentTest
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            description: Unique identifier of the document test
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: Unique identifier of the document test
      responses:
        '200':
          description: Successfully retrieved document test
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentTestResponse'
        '404':
          description: Document test not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DocumentTestResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DocumentTestOutput'
      required:
        - data
      additionalProperties: false
      title: DocumentTestResponse
      description: Successful response containing document test data
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message explaining the error.
          example: Resource not found
      required:
        - message
      additionalProperties: false
      title: ErrorResponse
      description: Standard error format for failed API operations.
    ValidationErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message indicating what went wrong.
          example: Invalid request data
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
              path:
                type: array
                items:
                  type: string
            required:
              - code
              - message
              - path
            additionalProperties: false
          description: Array of detailed validation error objects.
          example:
            - code: invalid_string
              message: Invalid UUID
              path:
                - id
      required:
        - message
        - issues
      additionalProperties: false
      title: ValidationErrorResponse
      description: Details about validation errors in incoming requests.
    DocumentTestOutput:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Unique identifier of the document test
          example: 123e4567-e89b-12d3-a456-426614174000
        orgId:
          type: string
          description: Organization ID that owns this document test
          example: org_123456
        applicationId:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Application ID this document test belongs to
          example: 456e4567-e89b-12d3-a456-426614174000
        type:
          $ref: '#/components/schemas/DocumentTestType'
        status:
          $ref: '#/components/schemas/DocumentTestStatus'
        meceMeanOverlap:
          description: >-
            Mean per-document overlap score across the MECE run (0..1). Only set
            for completed MECE tests.
          example: 0.42
          anyOf:
            - type: number
            - type: 'null'
        meceMeanContradictions:
          description: >-
            Mean per-document contradiction count across the MECE run. Only set
            for completed MECE tests.
          example: 1.7
          anyOf:
            - type: number
            - type: 'null'
        results:
          description: >-
            Test results, structure depends on test type (KNOWLEDGE_COVERAGE,
            MECE, or DOCS_TO_TASKS_MAPPING). On the list endpoint MECE rows omit
            this — fetch the detail endpoint (`GET /v0/documents/tests/{id}`)
            for the full per-document payload.
          anyOf:
            - $ref: '#/components/schemas/DocumentKnowledgeCoverageTestResultsOutput'
            - $ref: '#/components/schemas/DocumentMeceTestResultsOutput'
            - $ref: '#/components/schemas/TaskMappingResultsOutput'
        createdAt:
          description: When the document test was created
          example: '2024-01-05T12:34:56.789Z'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        modifiedAt:
          description: When the document test was last modified
          example: '2024-01-05T12:34:56.789Z'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - id
        - orgId
        - applicationId
        - type
        - status
        - createdAt
        - modifiedAt
      additionalProperties: false
      title: DocumentTest
      description: >-
        A document test execution for evaluating knowledge base quality (MECE,
        Coverage, etc.)
    DocumentTestType:
      type: string
      enum:
        - KNOWLEDGE_COVERAGE
        - MECE
        - DOCS_TO_TASKS_MAPPING
      description: Type of document test
      example: KNOWLEDGE_COVERAGE
    DocumentTestStatus:
      type: string
      enum:
        - PENDING
        - IN_PROGRESS
        - FAILED
        - COMPLETED
      description: Status of the test execution
      example: COMPLETED
    DocumentKnowledgeCoverageTestResultsOutput:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/DocumentKnowledgeCoverageTestResultRowOutput'
        score:
          type: number
          description: The score of the document test
        unmappedDocuments:
          description: Documents that were analyzed but did not match any task
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                description: The ID of the document
              title:
                type: string
                description: The title of the document
            required:
              - id
              - title
            additionalProperties: false
      required:
        - results
        - score
      additionalProperties: false
    DocumentMeceTestResultsOutput:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/DocumentMeceTestResultRowOutput'
        mean_overlap:
          type: number
          description: The mean overlap score of the documents
        mean_contradictions:
          type: number
          description: The mean contradiction score of the documents
      required:
        - results
        - mean_overlap
        - mean_contradictions
      additionalProperties: false
    TaskMappingResultsOutput:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/TaskMappingResultRowOutput'
        total_tasks:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: The total number of tasks
        total_documents:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: The total number of documents
        orphaned_documents_list:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                description: The ID of the document
              name:
                type: string
                description: The name of the document
            required:
              - id
              - name
            additionalProperties: false
          description: The list of orphaned documents
        orphaned_documents:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: The number of orphaned documents
        orphaned_tasks:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: The number of orphaned tasks
        orphaned_tasks_list:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                description: The ID of the task
              title:
                type: string
                description: The title of the task
              description:
                type: string
                description: The description of the task
            required:
              - id
              - title
              - description
            additionalProperties: false
          description: The list of orphaned tasks
      required:
        - results
        - total_tasks
        - total_documents
        - orphaned_documents_list
        - orphaned_documents
        - orphaned_tasks
        - orphaned_tasks_list
      additionalProperties: false
    DocumentKnowledgeCoverageTestResultRowOutput:
      type: object
      properties:
        task:
          type: object
          properties:
            id:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              description: The ID of the task
            title:
              type: string
              description: The title of the task
          required:
            - id
            - title
          additionalProperties: false
          description: The task that was tested
        coverage:
          type: number
          description: The coverage of the task
        matchedDocuments:
          description: >-
            The documents that actually covered this specific task (identified
            by AI)
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                description: The ID of the document
              title:
                type: string
                description: The title of the document
            required:
              - id
              - title
            additionalProperties: false
        reasoning:
          type: string
          description: The reasoning for the coverage assessment
      required:
        - task
        - coverage
        - reasoning
      additionalProperties: false
    DocumentMeceTestResultRowOutput:
      type: object
      properties:
        document:
          type: object
          properties:
            name:
              type: string
              description: The name of the document
            id:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              description: The ID of the document
          required:
            - name
            - id
          additionalProperties: false
        overlap_score:
          type: number
          description: The overlap score of the document
        contradiction_count:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: The total number of contradictions found
        overlaps:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                description: The ID of the overlapping document
              title:
                type: string
                description: The title of the overlapping document
              overlap_score:
                type: number
                description: The overlap score contribution for this document
            required:
              - id
              - title
              - overlap_score
            additionalProperties: false
          description: Overlapping documents contributing to the overlap score
        contradictions:
          type: array
          items:
            type: object
            properties:
              contradicting_document_id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                description: The ID of the contradicting document
              contradicting_document_title:
                type: string
                description: The title of the contradicting document
              reason:
                type: string
                description: Explanation of the contradiction
              passage_a:
                type: string
                description: The passage content from the current document
              passage_b:
                type: string
                description: The passage content from the contradicting location
            required:
              - contradicting_document_id
              - contradicting_document_title
              - reason
              - passage_a
              - passage_b
            additionalProperties: false
          description: Contradictions found (both inter-document and intra-document)
      required:
        - document
        - overlap_score
        - contradiction_count
        - overlaps
        - contradictions
      additionalProperties: false
    TaskMappingResultRowOutput:
      type: object
      properties:
        document:
          type: object
          properties:
            name:
              type: string
              description: The name of the document
            id:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              description: The ID of the document
          required:
            - name
            - id
          additionalProperties: false
          description: The document that was mapped to tasks
        mapped_tasks:
          anyOf:
            - type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    description: The ID of the task
                  title:
                    type: string
                    description: The title of the task
                  description:
                    type: string
                    description: The description of the task
                required:
                  - id
                  - title
                  - description
                additionalProperties: false
            - type: 'null'
          description: The mapped tasks
      required:
        - document
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your unique Avido API key
    ApplicationId:
      type: apiKey
      in: header
      name: x-application-id
      description: Your unique Avido Application ID

````