> ## 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 on-demand documents eligible for a target



## OpenAPI

````yaml /openapi.json get /on-demand-documents
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:
  /on-demand-documents:
    get:
      tags:
        - documents
      summary: List on-demand documents eligible for a target
      operationId: LegacyDocumentsController_getOnDemandDocuments
      parameters:
        - name: tenant
          in: header
          required: true
          description: Your tenant identifier. Requests without it are rejected.
          schema:
            type: string
        - name: productId
          required: true
          in: query
          description: The productId
          schema:
            type: string
        - name: targetId
          required: true
          in: query
          schema:
            type: string
        - name: branchId
          required: false
          in: query
          schema:
            pattern: >-
              ^branch(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOnDemandDocumentsOutput'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InvalidProductErrorDto'
              examples:
                INVALID_PRODUCT:
                  value:
                    code: INVALID_PRODUCT
                    message: Invalid product {product}
                    details: {}
          description: ''
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CustomerNotFoundErrorDto'
                  - $ref: '#/components/schemas/PolicyNotFoundErrorDto'
                  - $ref: '#/components/schemas/AssetNotFoundErrorDto'
              examples:
                CUSTOMER_NOT_FOUND:
                  value:
                    code: CUSTOMER_NOT_FOUND
                    message: Customer {customerId} ({branchId}) not found
                    details: {}
                POLICY_NOT_FOUND:
                  value:
                    code: POLICY_NOT_FOUND
                    message: Policy {policyId} ({branchId}) not found
                    details: {}
                ASSET_NOT_FOUND:
                  value:
                    code: ASSET_NOT_FOUND
                    message: Asset {assetId} ({branchId}) not found
                    details: {}
          description: ''
components:
  schemas:
    GetOnDemandDocumentsOutput:
      type: object
      properties:
        documents:
          type: array
          items:
            $ref: '#/components/schemas/OnDemandDocumentDto'
      required:
        - documents
    InvalidProductErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_PRODUCT
        message:
          type: string
          example: Invalid product {product}
        details:
          $ref: '#/components/schemas/InvalidProductDetailsDto'
      required:
        - code
        - message
        - details
    CustomerNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CUSTOMER_NOT_FOUND
        message:
          type: string
          example: Customer {customerId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/CustomerNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    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
    AssetNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - ASSET_NOT_FOUND
        message:
          type: string
          example: Asset {assetId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/AssetNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    OnDemandDocumentDto:
      type: object
      properties:
        configName:
          type: string
        documentType:
          type: string
      required:
        - configName
    InvalidProductDetailsDto:
      type: object
      properties:
        tenant:
          type: string
        product:
          type: string
        expectedProduct:
          type: string
      required:
        - product
    CustomerNotFoundDetailsDto:
      type: object
      properties:
        customerId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - customerId
    PolicyNotFoundDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - policyId
    AssetNotFoundDetailsDto:
      type: object
      properties:
        assetId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - assetId
  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.

````