Preview
Get Preview
Retrieve a previously generated payroll preview by job ID.
GET
/
preview
Get Preview
curl --request GET \
--url https://api.zeal.com/preview \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeal.com/preview"
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/preview', 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/preview",
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/preview"
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/preview")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/preview")
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{
"status": 200,
"success": true,
"data": {
"job_id": "8a60333360ff-36ef-47a8-a6e4-f4d7351da9ee",
"status": "complete",
"code": 200,
"created_at": "2023-04-12T14:56:23.366Z",
"request_body": {
"checks": [
"b97eecccece0f22a0a9423d9a47543b8fa8b680",
"a6212a51d83442eee244df8bf9852b289c8d818",
"8c8vereww22er22e340a72144152aaa8e894782d2292",
"629c59c913zzezz7941ecbbcc55vvc1afd1912c"
],
"companyID": "eee343432243434c59c913c59c913",
"test_mode": true,
"job_type": "preview-checks",
"has_live_key": null
},
"payload": {
"success": true,
"result": {
"checks": [
{
"employeeCheckID": "b97eecccece0f22a0a9423d9a47543b8fa8b680",
"gross_pay": "1360.00",
"net_pay": "1097.94",
"employer_taxes": "198.81",
"employee_taxes": "162.06",
"employee_deductions": "100.00",
"employer_deductions": "0.00",
"taxes": [
{
"name": "Federal Income Tax",
"codename": "FIT",
"amount": "20.58",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_EE",
"amount": "84.32",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_ER",
"amount": "84.32",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_EE",
"amount": "19.72",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_ER",
"amount": "19.72",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare Additional",
"codename": "FICA_MedicareAdditional_EE",
"amount": "0.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Federal Unemployment Tax",
"codename": "FUTA",
"amount": "8.16",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Unemployment Tax",
"codename": "SUTA_CA",
"amount": "84.32",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Income Tax",
"codename": "SIT_AZ",
"amount": "25.20",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "California Temporary Disability Voluntary Plan Assesesement",
"codename": "SDI_CA_ER_VP",
"amount": "2.29",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "California Temporary Disability Insurance Tax",
"codename": "SDI_CA_EE",
"amount": "12.24",
"paidBy": "EMPLOYEE_WITHHOLDING"
}
],
"deductions": [
{
"deduction_type": "401k",
"employee_calculated_contribution": "100.00",
"employer_calculated_contribution": "0.00"
}
],
"accruals": [
{
"policyID": "35b143b7c5b53634aa29655",
"policyType": "sick_leave",
"policyCode": "test-sick-leave-policy",
"policyName": "Test Sick Leave Policy",
"accrued": 1.33,
"usage": 3,
"balance": 49.11
}
],
"flsa_ot_transformed": false
},
{
"employeeCheckID": "a6212a51d83442eee242224df8bf9852b289c8d818",
"gross_pay": "1500.00",
"net_pay": "1121.15",
"employer_taxes": "148.35",
"employee_taxes": "378.85",
"employee_deductions": "0.00",
"employer_deductions": "0.00",
"taxes": [
{
"name": "Federal Income Tax",
"codename": "FIT",
"amount": "181.16",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_EE",
"amount": "93.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_ER",
"amount": "93.00",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_EE",
"amount": "21.75",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_ER",
"amount": "21.75",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare Additional",
"codename": "FICA_MedicareAdditional_EE",
"amount": "0.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Federal Unemployment Tax",
"codename": "FUTA",
"amount": "3.60",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Unemployment Tax",
"codename": "SUTA_AK",
"amount": "30.00",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Unemployment Tax",
"codename": "SUI_AK",
"amount": "8.40",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "State Income Tax",
"codename": "SIT_CA",
"amount": "74.54",
"paidBy": "EMPLOYEE_WITHHOLDING"
}
],
"deductions": [],
"accruals": [],
"flsa_ot_transformed": true
},
{
"employeeCheckID": "8c8ver22ewwere340a72144152aaa8e894782d2292",
"gross_pay": "301.00",
"net_pay": "248.13",
"employer_taxes": "41.66",
"employee_taxes": "24.37",
"employee_deductions": "28.50",
"employer_deductions": "0.00",
"taxes": [
{
"name": "Federal Income Tax",
"codename": "FIT",
"amount": "0.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_EE",
"amount": "17.67",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_ER",
"amount": "17.67",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_EE",
"amount": "4.13",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_ER",
"amount": "4.13",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare Additional",
"codename": "FICA_MedicareAdditional_EE",
"amount": "0.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Federal Unemployment Tax",
"codename": "FUTA",
"amount": "1.71",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Unemployment Tax",
"codename": "SUTA_CA",
"amount": "17.67",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "California Temporary Disability Voluntary Plan Assesesement",
"codename": "SDI_CA_ER_VP",
"amount": "0.48",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "California Temporary Disability Insurance Tax",
"codename": "SDI_CA_EE",
"amount": "2.57",
"paidBy": "EMPLOYEE_WITHHOLDING"
}
],
"deductions": [
{
"deduction_type": "401k",
"employee_calculated_contribution": "28.50",
"employer_calculated_contribution": "0.00"
}
],
"accruals": [
{
"policyID": "35b143b7c5b53634aa29655",
"policyType": "sick_leave",
"policyCode": "test-sick-leave-policy",
"policyName": "Test Sick Leave Policy",
"accrued": 3.33,
"usage": 6,
"balance": 51.11
}
],
"flsa_ot_transformed": false
},
{
"employeeCheckID": "629c59c91223zzezz7941ecbbcc55vvc1afd1912c",
"gross_pay": "0.00",
"net_pay": "0.00",
"employer_taxes": "0.00",
"employee_taxes": "0.00",
"employee_deductions": "0.00",
"employer_deductions": "0.00",
"taxes": [],
"deductions": [
{
"deduction_type": "401k",
"employee_calculated_contribution": "28.50",
"employer_calculated_contribution": "0.00"
}
],
"accruals": [
{
"policyID": "35b143b7c5b53634aa29655",
"policyType": "sick_leave",
"policyCode": "test-sick-leave-policy",
"policyName": "Test Sick Leave Policy",
"accrued": 2,
"usage": 7,
"balance": 60.9
}
],
"flsa_ot_transformed": false
}
],
"total_flsa_transformed": 1,
"total_employer_taxes": "388.82",
"total_employee_taxes": "565.28",
"total_employee_deductions": "128.50",
"total_employer_deductions": "0.00"
}
}
}
}{
"success": false,
"errors": [
{
"message": "Employee Check for this employee and check date already exists",
"code": 32
}
]
}Authorizations
Query Parameters
The job_id of the Payroll Preview generated by the Preview Payroll by CheckID [blocked] or Preview Payroll by Check Date [blocked] endpoints
⌘I
Get Preview
curl --request GET \
--url https://api.zeal.com/preview \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeal.com/preview"
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/preview', 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/preview",
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/preview"
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/preview")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/preview")
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{
"status": 200,
"success": true,
"data": {
"job_id": "8a60333360ff-36ef-47a8-a6e4-f4d7351da9ee",
"status": "complete",
"code": 200,
"created_at": "2023-04-12T14:56:23.366Z",
"request_body": {
"checks": [
"b97eecccece0f22a0a9423d9a47543b8fa8b680",
"a6212a51d83442eee244df8bf9852b289c8d818",
"8c8vereww22er22e340a72144152aaa8e894782d2292",
"629c59c913zzezz7941ecbbcc55vvc1afd1912c"
],
"companyID": "eee343432243434c59c913c59c913",
"test_mode": true,
"job_type": "preview-checks",
"has_live_key": null
},
"payload": {
"success": true,
"result": {
"checks": [
{
"employeeCheckID": "b97eecccece0f22a0a9423d9a47543b8fa8b680",
"gross_pay": "1360.00",
"net_pay": "1097.94",
"employer_taxes": "198.81",
"employee_taxes": "162.06",
"employee_deductions": "100.00",
"employer_deductions": "0.00",
"taxes": [
{
"name": "Federal Income Tax",
"codename": "FIT",
"amount": "20.58",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_EE",
"amount": "84.32",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_ER",
"amount": "84.32",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_EE",
"amount": "19.72",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_ER",
"amount": "19.72",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare Additional",
"codename": "FICA_MedicareAdditional_EE",
"amount": "0.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Federal Unemployment Tax",
"codename": "FUTA",
"amount": "8.16",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Unemployment Tax",
"codename": "SUTA_CA",
"amount": "84.32",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Income Tax",
"codename": "SIT_AZ",
"amount": "25.20",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "California Temporary Disability Voluntary Plan Assesesement",
"codename": "SDI_CA_ER_VP",
"amount": "2.29",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "California Temporary Disability Insurance Tax",
"codename": "SDI_CA_EE",
"amount": "12.24",
"paidBy": "EMPLOYEE_WITHHOLDING"
}
],
"deductions": [
{
"deduction_type": "401k",
"employee_calculated_contribution": "100.00",
"employer_calculated_contribution": "0.00"
}
],
"accruals": [
{
"policyID": "35b143b7c5b53634aa29655",
"policyType": "sick_leave",
"policyCode": "test-sick-leave-policy",
"policyName": "Test Sick Leave Policy",
"accrued": 1.33,
"usage": 3,
"balance": 49.11
}
],
"flsa_ot_transformed": false
},
{
"employeeCheckID": "a6212a51d83442eee242224df8bf9852b289c8d818",
"gross_pay": "1500.00",
"net_pay": "1121.15",
"employer_taxes": "148.35",
"employee_taxes": "378.85",
"employee_deductions": "0.00",
"employer_deductions": "0.00",
"taxes": [
{
"name": "Federal Income Tax",
"codename": "FIT",
"amount": "181.16",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_EE",
"amount": "93.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_ER",
"amount": "93.00",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_EE",
"amount": "21.75",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_ER",
"amount": "21.75",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare Additional",
"codename": "FICA_MedicareAdditional_EE",
"amount": "0.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Federal Unemployment Tax",
"codename": "FUTA",
"amount": "3.60",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Unemployment Tax",
"codename": "SUTA_AK",
"amount": "30.00",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Unemployment Tax",
"codename": "SUI_AK",
"amount": "8.40",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "State Income Tax",
"codename": "SIT_CA",
"amount": "74.54",
"paidBy": "EMPLOYEE_WITHHOLDING"
}
],
"deductions": [],
"accruals": [],
"flsa_ot_transformed": true
},
{
"employeeCheckID": "8c8ver22ewwere340a72144152aaa8e894782d2292",
"gross_pay": "301.00",
"net_pay": "248.13",
"employer_taxes": "41.66",
"employee_taxes": "24.37",
"employee_deductions": "28.50",
"employer_deductions": "0.00",
"taxes": [
{
"name": "Federal Income Tax",
"codename": "FIT",
"amount": "0.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_EE",
"amount": "17.67",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_ER",
"amount": "17.67",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_EE",
"amount": "4.13",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_ER",
"amount": "4.13",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare Additional",
"codename": "FICA_MedicareAdditional_EE",
"amount": "0.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Federal Unemployment Tax",
"codename": "FUTA",
"amount": "1.71",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Unemployment Tax",
"codename": "SUTA_CA",
"amount": "17.67",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "California Temporary Disability Voluntary Plan Assesesement",
"codename": "SDI_CA_ER_VP",
"amount": "0.48",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "California Temporary Disability Insurance Tax",
"codename": "SDI_CA_EE",
"amount": "2.57",
"paidBy": "EMPLOYEE_WITHHOLDING"
}
],
"deductions": [
{
"deduction_type": "401k",
"employee_calculated_contribution": "28.50",
"employer_calculated_contribution": "0.00"
}
],
"accruals": [
{
"policyID": "35b143b7c5b53634aa29655",
"policyType": "sick_leave",
"policyCode": "test-sick-leave-policy",
"policyName": "Test Sick Leave Policy",
"accrued": 3.33,
"usage": 6,
"balance": 51.11
}
],
"flsa_ot_transformed": false
},
{
"employeeCheckID": "629c59c91223zzezz7941ecbbcc55vvc1afd1912c",
"gross_pay": "0.00",
"net_pay": "0.00",
"employer_taxes": "0.00",
"employee_taxes": "0.00",
"employee_deductions": "0.00",
"employer_deductions": "0.00",
"taxes": [],
"deductions": [
{
"deduction_type": "401k",
"employee_calculated_contribution": "28.50",
"employer_calculated_contribution": "0.00"
}
],
"accruals": [
{
"policyID": "35b143b7c5b53634aa29655",
"policyType": "sick_leave",
"policyCode": "test-sick-leave-policy",
"policyName": "Test Sick Leave Policy",
"accrued": 2,
"usage": 7,
"balance": 60.9
}
],
"flsa_ot_transformed": false
}
],
"total_flsa_transformed": 1,
"total_employer_taxes": "388.82",
"total_employee_taxes": "565.28",
"total_employee_deductions": "128.50",
"total_employer_deductions": "0.00"
}
}
}
}{
"success": false,
"errors": [
{
"message": "Employee Check for this employee and check date already exists",
"code": 32
}
]
}