Documents
Get Documents
Access tax/payroll documents for a company, employee, and/or contractor, such as Quarterly Federal Tax Returns, W-2s, 1099s, etc.
GET
/
documents
Get Documents
curl --request GET \
--url https://api.zeal.com/documents \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "qtvyuwbdiknd"
}
'import requests
url = "https://api.zeal.com/documents"
payload = { "companyID": "qtvyuwbdiknd" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({companyID: 'qtvyuwbdiknd'})
};
fetch('https://api.zeal.com/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.zeal.com/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'companyID' => 'qtvyuwbdiknd'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zeal.com/documents"
payload := strings.NewReader("{\n \"companyID\": \"qtvyuwbdiknd\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.zeal.com/documents")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"qtvyuwbdiknd\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyID\": \"qtvyuwbdiknd\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
" data": [
{
"companyID": "1b5n28nrideucd24",
"type": "W2",
"description": "2024 Wage and Tax Statement (Form W2)",
"id": "1234567891",
"link": "https://test-documents.s3.amazonaws.com/1cccxx344ideucd24-2023-W2-1234567890-document"
},
{
"companyID": "1b5n28nrideucd24",
"type": "W2",
"description": "2023 Wage and Tax Statement (Form W2)",
"id": "1234567892",
"link": "https://test-documents.s3.amazonaws.com/1cccc8nr4ideucd24-2023-W2-1234567890-document"
},
{
"companyID": "1b5n28nrideucd24",
"type": "W2C",
"description": "2022 Corrected Wage and Tax Statement (Form W2C)",
"id": "1234567893",
"link": "https://test-documents.s3.amazonaws.com/1b5n24444eucd24-2022-W2C-1234567890-document"
},
{
"companyID": "1b5n28nrideucd24",
"type": "W2",
"description": "2021 Wage and Tax Statement (Form W2)",
"id": "1234567894",
"link": "https://test-documents.s3.amazonaws.com/1b5n28n5455eucd24-2021-W2-1234567890-document"
}
]
}{
"success": false,
"errors": [
{
"message": "Employee with this employeeID does not exist",
"code": 4
}
]
}Authorizations
Query Parameters
Company ID
Filter by id of employee or contractor to get documents for the given worker
Body
application/json
The body is of type any.
⌘I
Get Documents
curl --request GET \
--url https://api.zeal.com/documents \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "qtvyuwbdiknd"
}
'import requests
url = "https://api.zeal.com/documents"
payload = { "companyID": "qtvyuwbdiknd" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({companyID: 'qtvyuwbdiknd'})
};
fetch('https://api.zeal.com/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.zeal.com/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'companyID' => 'qtvyuwbdiknd'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zeal.com/documents"
payload := strings.NewReader("{\n \"companyID\": \"qtvyuwbdiknd\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.zeal.com/documents")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"qtvyuwbdiknd\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyID\": \"qtvyuwbdiknd\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
" data": [
{
"companyID": "1b5n28nrideucd24",
"type": "W2",
"description": "2024 Wage and Tax Statement (Form W2)",
"id": "1234567891",
"link": "https://test-documents.s3.amazonaws.com/1cccxx344ideucd24-2023-W2-1234567890-document"
},
{
"companyID": "1b5n28nrideucd24",
"type": "W2",
"description": "2023 Wage and Tax Statement (Form W2)",
"id": "1234567892",
"link": "https://test-documents.s3.amazonaws.com/1cccc8nr4ideucd24-2023-W2-1234567890-document"
},
{
"companyID": "1b5n28nrideucd24",
"type": "W2C",
"description": "2022 Corrected Wage and Tax Statement (Form W2C)",
"id": "1234567893",
"link": "https://test-documents.s3.amazonaws.com/1b5n24444eucd24-2022-W2C-1234567890-document"
},
{
"companyID": "1b5n28nrideucd24",
"type": "W2",
"description": "2021 Wage and Tax Statement (Form W2)",
"id": "1234567894",
"link": "https://test-documents.s3.amazonaws.com/1b5n28n5455eucd24-2021-W2-1234567890-document"
}
]
}{
"success": false,
"errors": [
{
"message": "Employee with this employeeID does not exist",
"code": 4
}
]
}