Zeal Components
Generate Company Login Link
Generate a link that automatically signs in a company and redirects them to their Zeal Company Dashboard, where they can manage and run payroll. This link can only be generated in production and expires exactly 7 days after generation.
POST
/
getAuthLink
Generate Company Login Link
curl --request POST \
--url https://api.zeal.com/getAuthLink \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"partnerID": "c133ecdere9b3445a2f22Cc258b23445a",
"companyID": "fc235f012bae46222ca3444cc2215bcfa"
}
'import requests
url = "https://api.zeal.com/getAuthLink"
payload = {
"partnerID": "c133ecdere9b3445a2f22Cc258b23445a",
"companyID": "fc235f012bae46222ca3444cc2215bcfa"
}
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({
partnerID: 'c133ecdere9b3445a2f22Cc258b23445a',
companyID: 'fc235f012bae46222ca3444cc2215bcfa'
})
};
fetch('https://api.zeal.com/getAuthLink', 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/getAuthLink",
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([
'partnerID' => 'c133ecdere9b3445a2f22Cc258b23445a',
'companyID' => 'fc235f012bae46222ca3444cc2215bcfa'
]),
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/getAuthLink"
payload := strings.NewReader("{\n \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\"\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/getAuthLink")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/getAuthLink")
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 \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"url": "https://payroll.your-domain.com/auth?accessToken=<accessToken>"
}{
"success": false,
"errors": [
{
"message": "No Partner with this partnerID exists",
"code": 13
}
]
}Authorizations
Body
application/json
PartnerID of the Zeal Partner
CompanyID of the company
By specifying the particular page you want to embed, the embedded component will show just that page and no sidebar. Can take the values of dashboard (home page), employees, contractors, custom-attributes, custom-paperwork, i9, or reports.
Available options:
dashboard, employees, contractors, custom-attributes, custom-paperwork, i9, reports ⌘I
Generate Company Login Link
curl --request POST \
--url https://api.zeal.com/getAuthLink \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"partnerID": "c133ecdere9b3445a2f22Cc258b23445a",
"companyID": "fc235f012bae46222ca3444cc2215bcfa"
}
'import requests
url = "https://api.zeal.com/getAuthLink"
payload = {
"partnerID": "c133ecdere9b3445a2f22Cc258b23445a",
"companyID": "fc235f012bae46222ca3444cc2215bcfa"
}
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({
partnerID: 'c133ecdere9b3445a2f22Cc258b23445a',
companyID: 'fc235f012bae46222ca3444cc2215bcfa'
})
};
fetch('https://api.zeal.com/getAuthLink', 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/getAuthLink",
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([
'partnerID' => 'c133ecdere9b3445a2f22Cc258b23445a',
'companyID' => 'fc235f012bae46222ca3444cc2215bcfa'
]),
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/getAuthLink"
payload := strings.NewReader("{\n \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\"\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/getAuthLink")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/getAuthLink")
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 \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"url": "https://payroll.your-domain.com/auth?accessToken=<accessToken>"
}{
"success": false,
"errors": [
{
"message": "No Partner with this partnerID exists",
"code": 13
}
]
}