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

# Get Document Split

> Get the status and result of a document split job.
    Use this to poll for completion of long-running split operations.



## OpenAPI

````yaml https://document-assistant.us.aodocs.app/openapi.json get /assistant/api/v1/tenants/{tenant}/document_splits/{job_id}
openapi: 3.1.0
info:
  title: Document Assistant API
  description: |
    <p>
      The Document Assistant API enables developers to integrate document-based assistant
      functionalities into their applications using AODocs.
    </p>
    <p>
      The first step is to enable AIDA (AODocs Intelligent Document Assistant) in your tenant.
      The support team will provide you with the necessary information on how to get started.
    </p>
    <p>
      The second step is to enable AIDA on libraries. You need to be an administrator of the
      library to do this.<br />
      AIDA can answer questions only from those documents that are in an AIDA enabled
      library.<br />
      We create a vector store index for these documents. This can take some time. The get
      library API provides the status of the indexation and an estimate of the time
      remaining.<br />
      The content of the index is automatically kept up-to-date near real time with the
      content changes.
    </p>
    <p>
      The third step is to ask questions based on the AODocs documents.<br />
      AIDA automatically filters the results based on the user's permissions.
    </p>
    <p>
      <strong>Authentication:</strong> All API endpoints require a valid OAuth2 token in the
      Authorization header. Ensure the client ID of the OAuth2 token is whitelisted in AODocs.
    </p>
  version: 1.1.0
servers:
  - url: https://document-assistant.us.aodocs.app
    description: Production US
  - url: https://document-assistant.eu.aodocs.app
    description: Production EU
security: []
paths:
  /assistant/api/v1/tenants/{tenant}/document_splits/{job_id}:
    get:
      tags:
        - document_split
      summary: Get Document Split
      description: |-
        Get the status and result of a document split job.
            Use this to poll for completion of long-running split operations.
      operationId: >-
        get_document_split_assistant_api_v1_tenants__tenant__document_splits__job_id__get
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            description: Job ID to query
            title: Job Id
          description: Job ID to query
        - name: tenant
          in: path
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The domain of the customer
            examples:
              - example.com
            title: Tenant
          description: The domain of the customer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SplitPlan'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SplitPlan:
      properties:
        source_document_id:
          type: string
          title: Source Document Id
          description: The ID of the original document that was split.
        document_splits:
          items:
            $ref: '#/components/schemas/DocumentSplit'
          type: array
          title: Document Splits
          description: The list of document splits created as a result of the split.
        job_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Id
          description: Job ID if split is in progress. Null when completed.
        status:
          $ref: '#/components/schemas/DocumentSplitStatus'
          description: 'Job status: ''in_progress'', ''completed'', or ''failed''.'
        total_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Pages
          description: Total pages in the document.
        pages_processed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Pages Processed
          description: Pages processed so far.
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if job failed.
      type: object
      required:
        - source_document_id
        - document_splits
        - status
      title: SplitPlan
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentSplit:
      properties:
        library_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Library Id
          description: >-
            The ID of the library the document belongs to. None for
            uncategorized documents.
        document_class_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Class Id
          description: >-
            The ID of the document class the document belongs to. None for
            uncategorized documents.
        document_class_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Class Name
          description: The name of the document class the document belongs to.
        page_ranges:
          items:
            $ref: '#/components/schemas/PageRange'
          type: array
          title: Page Ranges
          description: >-
            The list of page ranges in the original document that belong to this
            split document. Supports non-consecutive pages for future iterations
            where pages may be shuffled during scanning.
        confidence:
          anyOf:
            - $ref: '#/components/schemas/ConfidenceLevel'
            - type: 'null'
          description: The confidence level of the split.
        reasoning:
          anyOf:
            - type: string
            - type: 'null'
          title: Reasoning
          description: The reasoning behind the split decision provided by the LLM.
      type: object
      required:
        - library_id
        - document_class_id
        - page_ranges
      title: DocumentSplit
      description: Represents one logical document resulting from a split operation.
    DocumentSplitStatus:
      type: string
      enum:
        - in_progress
        - completed
        - failed
      title: DocumentSplitStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PageRange:
      properties:
        start:
          type: integer
          minimum: 1
          title: Start
          description: The start page number of the range (inclusive, 1-based).
        end:
          type: integer
          minimum: 1
          title: End
          description: The end page number of the range (inclusive, 1-based).
      type: object
      required:
        - start
        - end
      title: PageRange
    ConfidenceLevel:
      type: string
      enum:
        - low
        - medium
        - high
      title: ConfidenceLevel
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````