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

# Full document details

> Retrieves comprehensive details for a specific document, including its content or OCR data if available, and a presigned URL.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml get /api/v2/documents/{documentId}
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/documents/{documentId}:
    get:
      tags:
        - Document
      summary: Full document details
      description: >-
        Retrieves comprehensive details for a specific document, including its
        content or OCR data if available, and a presigned URL.
      parameters:
        - schema:
            type: string
          in: query
          name: includeSize
          required: false
          description: >-
            Whether to include file size from S3 (in bytes). Adds a small
            latency overhead.
        - schema:
            type: string
          in: path
          name: documentId
          required: true
          description: The unique identifier of the document.
      responses:
        '200':
          description: Successfully retrieved full document details.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      id:
                        type: string
                      fileName:
                        type: string
                      pdfPageCount:
                        type: integer
                        minimum: 0
                        nullable: true
                        description: >-
                          The number of pages in the PDF, or null for non-PDFs
                          and PDFs that have not been counted yet.
                      presignedUrl:
                        type: string
                        format: uri
                      mimeType:
                        type: string
                        enum:
                          - application/pdf
                      ocrResponse: {}
                      size:
                        type: number
                        nullable: true
                        description: The size of the file in bytes.
                    required:
                      - id
                      - fileName
                      - pdfPageCount
                      - presignedUrl
                      - mimeType
                    additionalProperties: false
                  - type: object
                    properties:
                      id:
                        type: string
                      fileName:
                        type: string
                      pdfPageCount:
                        type: integer
                        minimum: 0
                        nullable: true
                        description: >-
                          The number of pages in the PDF, or null for non-PDFs
                          and PDFs that have not been counted yet.
                      mimeType:
                        type: string
                        enum:
                          - application/fhir+json
                      chunkedResponse: {}
                      size:
                        type: number
                        nullable: true
                        description: The size of the file in bytes.
                    required:
                      - id
                      - fileName
                      - pdfPageCount
                      - mimeType
                    additionalProperties: false
                  - type: object
                    properties:
                      id:
                        type: string
                      fileName:
                        type: string
                      pdfPageCount:
                        type: integer
                        minimum: 0
                        nullable: true
                        description: >-
                          The number of pages in the PDF, or null for non-PDFs
                          and PDFs that have not been counted yet.
                      mimeType:
                        type: string
                        enum:
                          - application/fhir+jsonl
                      chunkedResponse: {}
                      size:
                        type: number
                        nullable: true
                        description: The size of the file in bytes.
                    required:
                      - id
                      - fileName
                      - pdfPageCount
                      - mimeType
                    additionalProperties: false
                  - type: object
                    properties:
                      id:
                        type: string
                      fileName:
                        type: string
                      pdfPageCount:
                        type: integer
                        minimum: 0
                        nullable: true
                        description: >-
                          The number of pages in the PDF, or null for non-PDFs
                          and PDFs that have not been counted yet.
                      presignedUrl:
                        type: string
                        format: uri
                      mimeType:
                        type: string
                        enum:
                          - application/json
                      size:
                        type: number
                        nullable: true
                        description: The size of the file in bytes.
                    required:
                      - id
                      - fileName
                      - pdfPageCount
                      - presignedUrl
                      - mimeType
                    additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The error message.
                  message:
                    type: string
                    description: The message.
                  statusCode:
                    type: number
                    description: The status code.
                  details:
                    type: object
                    additionalProperties: {}
                    description: The details of the error
                additionalProperties: true
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: >-
                      Not Found, the document with the specified ID does not
                      exist.
                required:
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Internal server error or error processing document type.
                required:
                  - error
                additionalProperties: false
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from samplehc import SampleHealthcare

            client = SampleHealthcare(
                api_key=os.environ.get("SAMPLEHC_API_KEY"),  # This is the default and can be omitted
            )
            document = client.v2.documents.retrieve(
                document_id="documentId",
            )
            print(document)

````