Retrieve Document
curl --request GET \
--url https://api.fifteenth.com/v1beta/documents/{document_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.fifteenth.com/v1beta/documents/{document_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.fifteenth.com/v1beta/documents/{document_id}', 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/documents/{document_id}",
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: <authorization>"
],
]);
$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/documents/{document_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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/documents/{document_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fifteenth.com/v1beta/documents/{document_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": 123,
"account_id": 123,
"filename": "<string>"
}Documents
Retrieve Document
Get document details and metadata
GET
/
v1beta
/
documents
/
{document_id}
Retrieve Document
curl --request GET \
--url https://api.fifteenth.com/v1beta/documents/{document_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.fifteenth.com/v1beta/documents/{document_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.fifteenth.com/v1beta/documents/{document_id}', 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/documents/{document_id}",
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: <authorization>"
],
]);
$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/documents/{document_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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/documents/{document_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fifteenth.com/v1beta/documents/{document_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"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
number
required
Unique document identifier.
Headers
string
required
Bearer token with your Partner API key
Response
number
Unique document identifier.
number
Account this document belongs to.
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']}")
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}`);
curl -X GET "https://api.fifteenth.com/v1beta/documents/12345" \
-H "Authorization: Bearer 15th_your_api_key_here"
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"
}
⌘I