Paperwork API
Get Contractor Custom Paperwork
Returns the custom paperwork required for a contractor and whether each form is complete.
GET
/
contractors
/
getCustomPaperwork
Get Contractor Custom Paperwork
curl --request GET \
--url https://api.zeal.com/contractors/getCustomPaperwork \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeal.com/contractors/getCustomPaperwork"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zeal.com/contractors/getCustomPaperwork', 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/contractors/getCustomPaperwork",
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: <api-key>"
],
]);
$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.zeal.com/contractors/getCustomPaperwork"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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/contractors/getCustomPaperwork")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/contractors/getCustomPaperwork")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"testMode": true,
"data": {
"contractorID": "603d0f8f1c4b2a4e28c8f0b5",
"all_required_complete": false,
"paperwork": [
{
"templateID": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"form_name": "Contractor acknowledgement",
"status": "incomplete"
}
]
}
}{
"success": false,
"testMode": true,
"errors": [
{
"message": "Contractor with this contractorID does not exist",
"code": 73,
"status": 400
}
]
}{
"success": false,
"testMode": true,
"errors": [
{
"message": "Your company does not have access to interact with this route.",
"code": 126,
"status": 403
}
]
}Returns the custom paperwork forms this contractor must complete, and whether each one is complete. These are the same custom forms the contractor is shown during onboarding. A form is included only when it is live, its effective date has passed, it is not archived, and it matches the contractor’s worker type, jurisdiction, and attribute rules. Jurisdictions are the US, the contractor’s residence state, and their working state.
all_required_complete is true when every returned form is complete, including when paperwork is empty. Archived forms are not listed, even if the contractor signed them.
Pass companyID and contractorID as query parameters. The API key must be allowed to access that company. Custom paperwork must be enabled for the company. If it is not, the request returns Your company does not have access to interact with this route. (code 126, status 403).⌘I
Get Contractor Custom Paperwork
curl --request GET \
--url https://api.zeal.com/contractors/getCustomPaperwork \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeal.com/contractors/getCustomPaperwork"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zeal.com/contractors/getCustomPaperwork', 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/contractors/getCustomPaperwork",
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: <api-key>"
],
]);
$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.zeal.com/contractors/getCustomPaperwork"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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/contractors/getCustomPaperwork")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/contractors/getCustomPaperwork")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"testMode": true,
"data": {
"contractorID": "603d0f8f1c4b2a4e28c8f0b5",
"all_required_complete": false,
"paperwork": [
{
"templateID": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"form_name": "Contractor acknowledgement",
"status": "incomplete"
}
]
}
}{
"success": false,
"testMode": true,
"errors": [
{
"message": "Contractor with this contractorID does not exist",
"code": 73,
"status": 400
}
]
}{
"success": false,
"testMode": true,
"errors": [
{
"message": "Your company does not have access to interact with this route.",
"code": 126,
"status": 403
}
]
}