Skip to main content
GET
https://api.fifteenth.com
/
v1beta
/
documents
/
{document_id}
Retrieve Document
curl --request GET \
  --url https://api.fifteenth.com/v1beta/documents/{document_id} \
  --header 'Authorization: <authorization>'
{
  "id": 123,
  "account_id": 123,
  "filename": "<string>"
}

Overview

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

Request

Path Parameters

document_id
number
required
Unique document identifier.

Headers

Authorization
string
required
Bearer token with your Partner API key

Response

id
number
Unique document identifier.
account_id
number
Account this document belongs to.
filename
string
Original filename.

Examples

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']}")

Sample Response

{
  "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"
}