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

# List document extractions for a policy



## OpenAPI

````yaml /openapi.json get /policies/{policyId}/document-extractions
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /policies/{policyId}/document-extractions:
    get:
      tags:
        - document-extractions
      summary: List document extractions for a policy
      operationId: PolicyDocumentExtractionController_getPolicyExtractions
      parameters:
        - name: policyId
          required: true
          in: path
          schema:
            type: string
        - name: branchId
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPolicyExtractionsOutput'
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PolicyNotFoundErrorDto'
              examples:
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
          description: ''
components:
  schemas:
    GetPolicyExtractionsOutput:
      type: object
      properties:
        extractions:
          description: List of document extractions for the policy
          type: array
          items:
            $ref: '#/components/schemas/GetDocumentExtractionOutput'
      required:
        - extractions
    PolicyNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - POLICY_NOT_FOUND
        message:
          type: string
          example: Policy {policyId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/PolicyNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    GetDocumentExtractionOutput:
      type: object
      properties:
        documentId:
          type: string
          description: Document ID
        status:
          type: string
          description: Extraction status
          enum:
            - PENDING
            - DONE
            - FAILED
            - SKIPPED
        fields:
          type: object
          description: Extracted fields
        aiOperationId:
          type: string
          description: AI operation ID
        errorMessage:
          type: string
          description: Error message if extraction failed
        metadata:
          type: object
          description: Extraction context metadata
        createdAt:
          type: string
          description: Creation timestamp
        updatedAt:
          type: string
          description: Last update timestamp
      required:
        - documentId
        - status
        - createdAt
        - updatedAt
    PolicyNotFoundDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - policyId

````