Preview Check Data
Preview calculated pay, tax, and deduction data for a single employee check before it is created.
curl --request POST \
--url https://api.zeal.com/preview/checkData \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "232414e556443cvc34558vv",
"employeeID": "3412eee0494585vvrt39485",
"reportingPeriodID": "5b3948753ere93484c",
"check_date": "2023-12-24",
"shifts": [
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 1125
}
},
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 375
}
},
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 500
}
}
],
"deductions": [
{
"deductionTemplateID": "5b35348948753ere93484c",
"employee_contribution": {
"value": 100,
"contribution_type": "dollars"
},
"employer_contribution": {
"override_type": "",
"value": 8
}
}
]
}
'import requests
url = "https://api.zeal.com/preview/checkData"
payload = {
"companyID": "232414e556443cvc34558vv",
"employeeID": "3412eee0494585vvrt39485",
"reportingPeriodID": "5b3948753ere93484c",
"check_date": "2023-12-24",
"shifts": [
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 1125
}
},
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 375
}
},
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 500
}
}
],
"deductions": [
{
"deductionTemplateID": "5b35348948753ere93484c",
"employee_contribution": {
"value": 100,
"contribution_type": "dollars"
},
"employer_contribution": {
"override_type": "",
"value": 8
}
}
]
}
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: '232414e556443cvc34558vv',
employeeID: '3412eee0494585vvrt39485',
reportingPeriodID: '5b3948753ere93484c',
check_date: '2023-12-24',
shifts: [
{time: '2023-11-15', flat: {hours: 80, amount: 1125}},
{time: '2023-11-15', flat: {hours: 80, amount: 375}},
{time: '2023-11-15', flat: {hours: 80, amount: 500}}
],
deductions: [
{
deductionTemplateID: '5b35348948753ere93484c',
employee_contribution: {value: 100, contribution_type: 'dollars'},
employer_contribution: {override_type: '', value: 8}
}
]
})
};
fetch('https://api.zeal.com/preview/checkData', 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/checkData",
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' => '232414e556443cvc34558vv',
'employeeID' => '3412eee0494585vvrt39485',
'reportingPeriodID' => '5b3948753ere93484c',
'check_date' => '2023-12-24',
'shifts' => [
[
'time' => '2023-11-15',
'flat' => [
'hours' => 80,
'amount' => 1125
]
],
[
'time' => '2023-11-15',
'flat' => [
'hours' => 80,
'amount' => 375
]
],
[
'time' => '2023-11-15',
'flat' => [
'hours' => 80,
'amount' => 500
]
]
],
'deductions' => [
[
'deductionTemplateID' => '5b35348948753ere93484c',
'employee_contribution' => [
'value' => 100,
'contribution_type' => 'dollars'
],
'employer_contribution' => [
'override_type' => '',
'value' => 8
]
]
]
]),
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/preview/checkData"
payload := strings.NewReader("{\n \"companyID\": \"232414e556443cvc34558vv\",\n \"employeeID\": \"3412eee0494585vvrt39485\",\n \"reportingPeriodID\": \"5b3948753ere93484c\",\n \"check_date\": \"2023-12-24\",\n \"shifts\": [\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 1125\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 375\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 500\n }\n }\n ],\n \"deductions\": [\n {\n \"deductionTemplateID\": \"5b35348948753ere93484c\",\n \"employee_contribution\": {\n \"value\": 100,\n \"contribution_type\": \"dollars\"\n },\n \"employer_contribution\": {\n \"override_type\": \"\",\n \"value\": 8\n }\n }\n ]\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/preview/checkData")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"232414e556443cvc34558vv\",\n \"employeeID\": \"3412eee0494585vvrt39485\",\n \"reportingPeriodID\": \"5b3948753ere93484c\",\n \"check_date\": \"2023-12-24\",\n \"shifts\": [\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 1125\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 375\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 500\n }\n }\n ],\n \"deductions\": [\n {\n \"deductionTemplateID\": \"5b35348948753ere93484c\",\n \"employee_contribution\": {\n \"value\": 100,\n \"contribution_type\": \"dollars\"\n },\n \"employer_contribution\": {\n \"override_type\": \"\",\n \"value\": 8\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/preview/checkData")
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\": \"232414e556443cvc34558vv\",\n \"employeeID\": \"3412eee0494585vvrt39485\",\n \"reportingPeriodID\": \"5b3948753ere93484c\",\n \"check_date\": \"2023-12-24\",\n \"shifts\": [\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 1125\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 375\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 500\n }\n }\n ],\n \"deductions\": [\n {\n \"deductionTemplateID\": \"5b35348948753ere93484c\",\n \"employee_contribution\": {\n \"value\": 100,\n \"contribution_type\": \"dollars\"\n },\n \"employer_contribution\": {\n \"override_type\": \"\",\n \"value\": 8\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"success": true,
"result": {
"checks": [
{
"gross_pay": "2000.00",
"net_pay": "1452.98",
"employer_taxes": "368.31",
"employee_taxes": "447.02",
"employee_deductions": "100.00",
"employer_deductions": "8.00",
"taxes": [
{
"name": "Federal Income Tax",
"codename": "FIT",
"amount": "149.58",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_EE",
"amount": "124.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_ER",
"amount": "124.00",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_EE",
"amount": "29.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_ER",
"amount": "29.00",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare Additional",
"codename": "FICA_MedicareAdditional_EE",
"amount": "0.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Federal Unemployment Tax",
"codename": "FUTA",
"amount": "12.00",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Unemployment Tax",
"codename": "SUTA_NY",
"amount": "196.51",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Income Tax",
"codename": "SIT_NY",
"amount": "80.69",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "New York - New York City Income Tax",
"codename": "LIT_NY_NYC",
"amount": "63.75",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "New York - Metropolitan Commuter Transportation Mobility Tax",
"codename": "FEE_NY_MCTMT",
"amount": "6.80",
"paidBy": "EMPLOYER_LIABILITY"
}
],
"deductions": [
{
"deduction_type": "401k",
"employee_calculated_contribution": "100.00",
"employer_calculated_contribution": "8.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
}
]
}
],
"total_employer_taxes": "368.31",
"total_employee_taxes": "447.02",
"total_employee_deductions": "100.00",
"total_employer_deductions": "8.00"
}
}
}{
"success": false,
"errors": [
{
"message": "Reporting Period with this ID does not exist",
"status": 400,
"code": 10
}
]
}Authorizations
Body
The ID of the Company
The ID of the employee
ID of the reporting period
Check date for this employee
Array of shift objects. The set of shifts attached to this employee check describe the work done and the earnings owed to this employee. You can only create shifts by creating an employee check (through this endpoint). However, you can edit and delete shifts that are still pending. Also supports various earning components as objects. See Shift Object [blocked] for more information.
Show child attributes
Show child attributes
Determine if approval is required for the check, defaults to false
Custom object you can attach to the employee check object. This is useful for storing additional information about the object in a custom, structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. Metadata [blocked]
Adds a Deduction on the particular Employee Check, using a Deduction Template, for a Company
Show child attributes
Show child attributes
curl --request POST \
--url https://api.zeal.com/preview/checkData \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "232414e556443cvc34558vv",
"employeeID": "3412eee0494585vvrt39485",
"reportingPeriodID": "5b3948753ere93484c",
"check_date": "2023-12-24",
"shifts": [
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 1125
}
},
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 375
}
},
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 500
}
}
],
"deductions": [
{
"deductionTemplateID": "5b35348948753ere93484c",
"employee_contribution": {
"value": 100,
"contribution_type": "dollars"
},
"employer_contribution": {
"override_type": "",
"value": 8
}
}
]
}
'import requests
url = "https://api.zeal.com/preview/checkData"
payload = {
"companyID": "232414e556443cvc34558vv",
"employeeID": "3412eee0494585vvrt39485",
"reportingPeriodID": "5b3948753ere93484c",
"check_date": "2023-12-24",
"shifts": [
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 1125
}
},
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 375
}
},
{
"time": "2023-11-15",
"flat": {
"hours": 80,
"amount": 500
}
}
],
"deductions": [
{
"deductionTemplateID": "5b35348948753ere93484c",
"employee_contribution": {
"value": 100,
"contribution_type": "dollars"
},
"employer_contribution": {
"override_type": "",
"value": 8
}
}
]
}
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: '232414e556443cvc34558vv',
employeeID: '3412eee0494585vvrt39485',
reportingPeriodID: '5b3948753ere93484c',
check_date: '2023-12-24',
shifts: [
{time: '2023-11-15', flat: {hours: 80, amount: 1125}},
{time: '2023-11-15', flat: {hours: 80, amount: 375}},
{time: '2023-11-15', flat: {hours: 80, amount: 500}}
],
deductions: [
{
deductionTemplateID: '5b35348948753ere93484c',
employee_contribution: {value: 100, contribution_type: 'dollars'},
employer_contribution: {override_type: '', value: 8}
}
]
})
};
fetch('https://api.zeal.com/preview/checkData', 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/checkData",
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' => '232414e556443cvc34558vv',
'employeeID' => '3412eee0494585vvrt39485',
'reportingPeriodID' => '5b3948753ere93484c',
'check_date' => '2023-12-24',
'shifts' => [
[
'time' => '2023-11-15',
'flat' => [
'hours' => 80,
'amount' => 1125
]
],
[
'time' => '2023-11-15',
'flat' => [
'hours' => 80,
'amount' => 375
]
],
[
'time' => '2023-11-15',
'flat' => [
'hours' => 80,
'amount' => 500
]
]
],
'deductions' => [
[
'deductionTemplateID' => '5b35348948753ere93484c',
'employee_contribution' => [
'value' => 100,
'contribution_type' => 'dollars'
],
'employer_contribution' => [
'override_type' => '',
'value' => 8
]
]
]
]),
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/preview/checkData"
payload := strings.NewReader("{\n \"companyID\": \"232414e556443cvc34558vv\",\n \"employeeID\": \"3412eee0494585vvrt39485\",\n \"reportingPeriodID\": \"5b3948753ere93484c\",\n \"check_date\": \"2023-12-24\",\n \"shifts\": [\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 1125\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 375\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 500\n }\n }\n ],\n \"deductions\": [\n {\n \"deductionTemplateID\": \"5b35348948753ere93484c\",\n \"employee_contribution\": {\n \"value\": 100,\n \"contribution_type\": \"dollars\"\n },\n \"employer_contribution\": {\n \"override_type\": \"\",\n \"value\": 8\n }\n }\n ]\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/preview/checkData")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"232414e556443cvc34558vv\",\n \"employeeID\": \"3412eee0494585vvrt39485\",\n \"reportingPeriodID\": \"5b3948753ere93484c\",\n \"check_date\": \"2023-12-24\",\n \"shifts\": [\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 1125\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 375\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 500\n }\n }\n ],\n \"deductions\": [\n {\n \"deductionTemplateID\": \"5b35348948753ere93484c\",\n \"employee_contribution\": {\n \"value\": 100,\n \"contribution_type\": \"dollars\"\n },\n \"employer_contribution\": {\n \"override_type\": \"\",\n \"value\": 8\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/preview/checkData")
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\": \"232414e556443cvc34558vv\",\n \"employeeID\": \"3412eee0494585vvrt39485\",\n \"reportingPeriodID\": \"5b3948753ere93484c\",\n \"check_date\": \"2023-12-24\",\n \"shifts\": [\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 1125\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 375\n }\n },\n {\n \"time\": \"2023-11-15\",\n \"flat\": {\n \"hours\": 80,\n \"amount\": 500\n }\n }\n ],\n \"deductions\": [\n {\n \"deductionTemplateID\": \"5b35348948753ere93484c\",\n \"employee_contribution\": {\n \"value\": 100,\n \"contribution_type\": \"dollars\"\n },\n \"employer_contribution\": {\n \"override_type\": \"\",\n \"value\": 8\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"success": true,
"result": {
"checks": [
{
"gross_pay": "2000.00",
"net_pay": "1452.98",
"employer_taxes": "368.31",
"employee_taxes": "447.02",
"employee_deductions": "100.00",
"employer_deductions": "8.00",
"taxes": [
{
"name": "Federal Income Tax",
"codename": "FIT",
"amount": "149.58",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_EE",
"amount": "124.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Social Security",
"codename": "FICA_SocialSecurity_ER",
"amount": "124.00",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_EE",
"amount": "29.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Medicare",
"codename": "FICA_Medicare_ER",
"amount": "29.00",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "Medicare Additional",
"codename": "FICA_MedicareAdditional_EE",
"amount": "0.00",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "Federal Unemployment Tax",
"codename": "FUTA",
"amount": "12.00",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Unemployment Tax",
"codename": "SUTA_NY",
"amount": "196.51",
"paidBy": "EMPLOYER_LIABILITY"
},
{
"name": "State Income Tax",
"codename": "SIT_NY",
"amount": "80.69",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "New York - New York City Income Tax",
"codename": "LIT_NY_NYC",
"amount": "63.75",
"paidBy": "EMPLOYEE_WITHHOLDING"
},
{
"name": "New York - Metropolitan Commuter Transportation Mobility Tax",
"codename": "FEE_NY_MCTMT",
"amount": "6.80",
"paidBy": "EMPLOYER_LIABILITY"
}
],
"deductions": [
{
"deduction_type": "401k",
"employee_calculated_contribution": "100.00",
"employer_calculated_contribution": "8.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
}
]
}
],
"total_employer_taxes": "368.31",
"total_employee_taxes": "447.02",
"total_employee_deductions": "100.00",
"total_employer_deductions": "8.00"
}
}
}{
"success": false,
"errors": [
{
"message": "Reporting Period with this ID does not exist",
"status": 400,
"code": 10
}
]
}