> ## 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 retrieval document

> Get a short-lived download URL for a retrieval document. Use document_id cost_summary for the request cost PDF, available once the request is completed and billing is finalized. Returns 404 when the document is unavailable.



## OpenAPI

````yaml GET /v2/retrieval-requests/{retrieval_request_id}/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/retrieval-requests/{retrieval_request_id}/documents/{document_id}/download:
    get:
      tags:
        - Retrieval Requests
      summary: Download retrieval document
      description: >-
        Get a short-lived download URL for a retrieval document. Use document_id
        cost_summary for the request cost PDF, available once the request is
        completed and billing is finalized. Returns 404 when the document is
        unavailable.
      operationId: downloadRetrievalDocument
      parameters:
        - name: retrieval_request_id
          in: path
          required: true
          description: Retrieval request ID
          schema:
            type: string
        - name: document_id
          in: path
          required: true
          description: Retrieval 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_...`

````