Preview
Preview Payroll by Check Date
Generate a payroll preview job for all pending checks on a given check date.
POST
/
preview
/
checkDate
Preview Payroll by Check Date
curl --request POST \
--url https://api.zeal.com/preview/checkDate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "fcce6cc41440ac8a33e13223bbb462",
"check_date": "2023-04-29T18:21:28.951Z"
}
'import requests
url = "https://api.zeal.com/preview/checkDate"
payload = {
"companyID": "fcce6cc41440ac8a33e13223bbb462",
"check_date": "2023-04-29T18:21:28.951Z"
}
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: 'fcce6cc41440ac8a33e13223bbb462',
check_date: '2023-04-29T18:21:28.951Z'
})
};
fetch('https://api.zeal.com/preview/checkDate', 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/checkDate",
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' => 'fcce6cc41440ac8a33e13223bbb462',
'check_date' => '2023-04-29T18:21:28.951Z'
]),
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/checkDate"
payload := strings.NewReader("{\n \"companyID\": \"fcce6cc41440ac8a33e13223bbb462\",\n \"check_date\": \"2023-04-29T18:21:28.951Z\"\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/checkDate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"fcce6cc41440ac8a33e13223bbb462\",\n \"check_date\": \"2023-04-29T18:21:28.951Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/preview/checkDate")
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\": \"fcce6cc41440ac8a33e13223bbb462\",\n \"check_date\": \"2023-04-29T18:21:28.951Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"data": {
"job_id": "0bc12668-9f1a-4fb6-b1c7-044d23fb678f",
"status": "pending",
"request_body": {
"companyID": "fcce6cc41440ac8a33e13223bbb462",
"check_date": "2023-04-29T18:21:28.951Z",
"test_mode": false
},
"created_at": "2023-05-04T19:49:31.064Z"
}
}{
"success": false,
"errors": [
{
"message": "Invalid check date",
"code": 74
}
]
}⌘I
Preview Payroll by Check Date
curl --request POST \
--url https://api.zeal.com/preview/checkDate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "fcce6cc41440ac8a33e13223bbb462",
"check_date": "2023-04-29T18:21:28.951Z"
}
'import requests
url = "https://api.zeal.com/preview/checkDate"
payload = {
"companyID": "fcce6cc41440ac8a33e13223bbb462",
"check_date": "2023-04-29T18:21:28.951Z"
}
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: 'fcce6cc41440ac8a33e13223bbb462',
check_date: '2023-04-29T18:21:28.951Z'
})
};
fetch('https://api.zeal.com/preview/checkDate', 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/checkDate",
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' => 'fcce6cc41440ac8a33e13223bbb462',
'check_date' => '2023-04-29T18:21:28.951Z'
]),
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/checkDate"
payload := strings.NewReader("{\n \"companyID\": \"fcce6cc41440ac8a33e13223bbb462\",\n \"check_date\": \"2023-04-29T18:21:28.951Z\"\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/checkDate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"fcce6cc41440ac8a33e13223bbb462\",\n \"check_date\": \"2023-04-29T18:21:28.951Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/preview/checkDate")
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\": \"fcce6cc41440ac8a33e13223bbb462\",\n \"check_date\": \"2023-04-29T18:21:28.951Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"data": {
"job_id": "0bc12668-9f1a-4fb6-b1c7-044d23fb678f",
"status": "pending",
"request_body": {
"companyID": "fcce6cc41440ac8a33e13223bbb462",
"check_date": "2023-04-29T18:21:28.951Z",
"test_mode": false
},
"created_at": "2023-05-04T19:49:31.064Z"
}
}{
"success": false,
"errors": [
{
"message": "Invalid check date",
"code": 74
}
]
}