List Documents
curl --request GET \
--url https://api.fifteenth.com/v1beta/accounts/{account_id}/documents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fifteenth.com/v1beta/accounts/{account_id}/documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fifteenth.com/v1beta/accounts/{account_id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fifteenth.com/v1beta/accounts/{account_id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fifteenth.com/v1beta/accounts/{account_id}/documents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fifteenth.com/v1beta/accounts/{account_id}/documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fifteenth.com/v1beta/accounts/{account_id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"documents": [
{}
],
"total_count": 123,
"has_more": true
}Documents
List Documents
Retrieve all documents for a client account with filtering options
GET
/
v1beta
/
accounts
/
{account_id}
/
documents
List Documents
curl --request GET \
--url https://api.fifteenth.com/v1beta/accounts/{account_id}/documents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fifteenth.com/v1beta/accounts/{account_id}/documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fifteenth.com/v1beta/accounts/{account_id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fifteenth.com/v1beta/accounts/{account_id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fifteenth.com/v1beta/accounts/{account_id}/documents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fifteenth.com/v1beta/accounts/{account_id}/documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fifteenth.com/v1beta/accounts/{account_id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"documents": [
{}
],
"total_count": 123,
"has_more": true
}Overview
The List Documents endpoint returns all documents associated with a client account. Supports filtering by tax year and pagination for efficient document management.Request
Path Parameters
number
required
Account identifier to list documents for.
Query Parameters
integer
Filter by tax year.
integer
Number of documents to return (1-100, default 50).
integer
Number of documents to skip for pagination.
Response
array
Array of document objects.
integer
Total number of documents matching filters.
boolean
Whether more documents are available.
Examples
import requests
account_id = "12345"
url = f"https://api.fifteenth.com/v1beta/accounts/{account_id}/documents"
headers = {
"Authorization": "Bearer 15th_your_api_key_here"
}
params = {
"tax_year": 2024,
"limit": 20
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Found {data['total_count']} documents")
for doc in data['documents']:
print(f"- {doc['filename']}: {doc['tax_year']} ({doc['uploaded_at']})")
const accountId = '12345';
const url = `https://api.fifteenth.com/v1beta/accounts/${accountId}/documents`;
const params = new URLSearchParams({
tax_year: '2024',
limit: '20'
});
const response = await fetch(`${url}?${params}`, {
headers: {
'Authorization': 'Bearer 15th_your_api_key_here'
}
});
const data = await response.json();
console.log(`Found ${data.total_count} documents`);
data.documents.forEach(doc => {
console.log(`- ${doc.filename}: ${doc.tax_year} (${doc.uploaded_at})`);
});
curl -X GET "https://api.fifteenth.com/v1beta/accounts/12345/documents?tax_year=2024&limit=20" \
-H "Authorization: Bearer 15th_your_api_key_here"
Sample Response
{
"documents": [
{
"id": 12345,
"filename": "w2_2024.pdf",
"tax_year": 2024,
"description": "W-2 from ABC Corporation",
"uploaded_at": "2024-01-15T10:35:00Z"
},
{
"id": 67890,
"filename": "1099_div.pdf",
"tax_year": 2024,
"description": "Dividend income statement",
"uploaded_at": "2024-01-16T14:20:00Z"
}
],
"total_count": 8,
"has_more": false
}
⌘I