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

# Retrieve Document

> Get document details and metadata

## Overview

The Retrieve Document endpoint returns detailed information about an uploaded document. Use this endpoint to access document details and metadata.

## Request

### Path Parameters

<ParamField path="document_id" type="number" required>
  Unique document identifier.
</ParamField>

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token with your Partner API key
</ParamField>

## Response

<ResponseField name="id" type="number">
  Unique document identifier.
</ResponseField>

<ResponseField name="account_id" type="number">
  Account this document belongs to.
</ResponseField>

<ResponseField name="filename" type="string">
  Original filename.
</ResponseField>

## Examples

<CodeGroup>
  ```python Python theme={null}
  import requests

  document_id = 12345
  url = f"https://api.fifteenth.com/v1beta/documents/{document_id}"

  headers = {
      "Authorization": "Bearer 15th_your_api_key_here"
  }

  response = requests.get(url, headers=headers)
  document = response.json()

  print(f"Document: {document['filename']}")
  print(f"Tax year: {document['tax_year']}")
  print(f"Uploaded: {document['uploaded_at']}")
  ```

  ```javascript JavaScript theme={null}
  const documentId = 12345;
  const url = `https://api.fifteenth.com/v1beta/documents/${documentId}`;

  const response = await fetch(url, {
      headers: {
          'Authorization': 'Bearer 15th_your_api_key_here'
      }
  });

  const document = await response.json();

  console.log(`Document: ${document.filename}`);
  console.log(`Tax year: ${document.tax_year}`);
  console.log(`Uploaded: ${document.uploaded_at}`);
  ```

  ```bash cURL theme={null}
  curl -X GET "https://api.fifteenth.com/v1beta/documents/12345" \
    -H "Authorization: Bearer 15th_your_api_key_here"
  ```
</CodeGroup>

### Sample Response

```json theme={null}
{
  "id": 12345,
  "account_id": 12345,
  "filename": "w2_2024.pdf",
  "tax_year": 2024,
  "description": "W-2 from ABC Corporation",
  "file_size": 245760,
  "file_type": "application/pdf",
  "uploaded_at": "2024-01-15T10:35:00Z"
}
```
