Contractor Onboarding
Generate Contractor Onboarding Link
Generate an expirable link to Zeal’s hosted contractor onboarding flow.
POST
/
contractors
/
onboard
Generate Contractor Onboarding Link
curl --request POST \
--url https://api.zeal.com/contractors/onboard \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "eeeee434343553413eccc34534",
"contractorID": "874759t85785745748e3847",
"scan_id": true
}
'import requests
url = "https://api.zeal.com/contractors/onboard"
payload = {
"companyID": "eeeee434343553413eccc34534",
"contractorID": "874759t85785745748e3847",
"scan_id": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyID: 'eeeee434343553413eccc34534',
contractorID: '874759t85785745748e3847',
scan_id: true
})
};
fetch('https://api.zeal.com/contractors/onboard', 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/onboard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'companyID' => 'eeeee434343553413eccc34534',
'contractorID' => '874759t85785745748e3847',
'scan_id' => true
]),
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/contractors/onboard"
payload := strings.NewReader("{\n \"companyID\": \"eeeee434343553413eccc34534\",\n \"contractorID\": \"874759t85785745748e3847\",\n \"scan_id\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.zeal.com/contractors/onboard")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"eeeee434343553413eccc34534\",\n \"contractorID\": \"874759t85785745748e3847\",\n \"scan_id\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/contractors/onboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyID\": \"eeeee434343553413eccc34534\",\n \"contractorID\": \"874759t85785745748e3847\",\n \"scan_id\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": "https://payroll.your-domain.com/contractoronboarding/10983755744920193854758300657020834"
}{
"success": false,
"errors": [
{
"message": "No contractorID in the body/query of the request",
"code": 35
}
]
}Generate an expirable link to Zeal’s contractor onboarding. Zeal’s onboarding collects:
- Profile information (e.g. SSN, DOB, Address)
- Contractor account username and password (optional)
- Contractor Survey attributes (optional). NOTE: Only applicable for Custom Attributes (Early Access)
-
ID collection (optional - Zeal collects Driver’s License + Social Security Card OR Passport)
NOTE - If passing the onboarding link in a
srcof an iframe, theallow="camera"flag must be passed in order for the iframe to prompt or access a user’s camera. - Paperwork (W9 form)
- Bank Account Information (optional)
- Paycard enrollment information for the contractor (optional). NOTE: Only applicable for Paycards (Early Access)
- Instant Pay enrollment information for the contractor (optional). NOTE: Only applicable for Instant Pay (Early Access)
Returns
| attribute | type | description |
|---|---|---|
| success | boolean | Response status |
| data | string | Web onboarding link for this contractor |
| errors | array | Contains a list of error objects which consists of: message (error message) and code (error code, see Error codes) |
Authorizations
Body
application/json
Company ID of employer
ID of Contractor
If false, the contractor account information (username and password) collection step of onboarding will be left out.
If false, the contractor survey step will be left out (Early Access)
If false, the ID collection step of contractor onboarding will be left out.
If false, the onboarding worker will be able to skip the bank account collection section of onboarding
If false, the paycard enrollment screen will be left out. NOTE: Only applicable for Paycards (Early Access)
If false, the instant pay enrollment screen will be left out. NOTE: Only applicable for Instant Pay (Early Access)
⌘I
Generate Contractor Onboarding Link
curl --request POST \
--url https://api.zeal.com/contractors/onboard \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "eeeee434343553413eccc34534",
"contractorID": "874759t85785745748e3847",
"scan_id": true
}
'import requests
url = "https://api.zeal.com/contractors/onboard"
payload = {
"companyID": "eeeee434343553413eccc34534",
"contractorID": "874759t85785745748e3847",
"scan_id": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyID: 'eeeee434343553413eccc34534',
contractorID: '874759t85785745748e3847',
scan_id: true
})
};
fetch('https://api.zeal.com/contractors/onboard', 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/onboard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'companyID' => 'eeeee434343553413eccc34534',
'contractorID' => '874759t85785745748e3847',
'scan_id' => true
]),
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/contractors/onboard"
payload := strings.NewReader("{\n \"companyID\": \"eeeee434343553413eccc34534\",\n \"contractorID\": \"874759t85785745748e3847\",\n \"scan_id\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.zeal.com/contractors/onboard")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"eeeee434343553413eccc34534\",\n \"contractorID\": \"874759t85785745748e3847\",\n \"scan_id\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/contractors/onboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyID\": \"eeeee434343553413eccc34534\",\n \"contractorID\": \"874759t85785745748e3847\",\n \"scan_id\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": "https://payroll.your-domain.com/contractoronboarding/10983755744920193854758300657020834"
}{
"success": false,
"errors": [
{
"message": "No contractorID in the body/query of the request",
"code": 35
}
]
}