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

# Download document

> Get a presigned download URL for a document (valid for 1 hour)



## OpenAPI

````yaml GET /v2/documents/{document_id}/download
openapi: 3.0.1
info:
  title: Tavrn Platform API
  version: 1.0.0
  description: >-
    Enterprise API for medical record retrieval: cases, retrieval requests,
    retrieved records and provider invoices, case documents, and webhook
    notifications.
  contact:
    name: Tavrn Support
    email: contact@tavrn.ai
servers:
  - url: https://enterprise.tavrn.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Cases
    description: Case management operations
  - name: Documents
    description: Document upload and management
  - name: Retrieval Requests
    description: Medical record retrieval requests submitted to healthcare facilities
  - name: Requestors
    description: Multiple retrieval profiles within one organization
  - name: Webhooks
    description: Webhook registration and event notifications
paths:
  /v2/documents/{document_id}/download:
    get:
      tags:
        - Documents
      summary: Download document
      description: Get a presigned download URL for a document (valid for 1 hour)
      operationId: downloadDocument
      parameters:
        - name: document_id
          in: path
          required: true
          description: Document ID
          schema:
            type: string
      responses:
        '200':
          description: Presigned download URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadResponse'
        '404':
          description: Document not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DownloadResponse:
      type: object
      required:
        - download_url
        - expires_in
      properties:
        download_url:
          type: string
          description: Presigned download URL
          example: https://s3.amazonaws.com/...
        expires_in:
          type: integer
          description: URL validity in seconds (3600 = 1 hour)
          example: 3600
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: validation_error
            message:
              type: string
              description: Human-readable error message
              example: The patient.date_of_birth field is required
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key authentication. Use format: `Authorization: Bearer
        tavrn_sk_live_...`

````