Reports
Create Quarter to Date Report
Start an asynchronous job to generate a Quarter to Date (QTD) report summarizing cumulative payroll totals for a company.
POST
/
reports
/
qtd
Create Quarter to Date Report
curl --request POST \
--url https://api.zeal.com/reports/qtd \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "fcc26cc444450ac8a33ry32a3z34462",
"employeeID": [
"6266y546eyecc34458aef1",
"6556fabfcf2eab26e23331"
],
"quarter": "q1",
"media_type": "json"
}
'import requests
url = "https://api.zeal.com/reports/qtd"
payload = {
"companyID": "fcc26cc444450ac8a33ry32a3z34462",
"employeeID": ["6266y546eyecc34458aef1", "6556fabfcf2eab26e23331"],
"quarter": "q1",
"media_type": "json"
}
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: 'fcc26cc444450ac8a33ry32a3z34462',
employeeID: ['6266y546eyecc34458aef1', '6556fabfcf2eab26e23331'],
quarter: 'q1',
media_type: 'json'
})
};
fetch('https://api.zeal.com/reports/qtd', 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/reports/qtd",
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' => 'fcc26cc444450ac8a33ry32a3z34462',
'employeeID' => [
'6266y546eyecc34458aef1',
'6556fabfcf2eab26e23331'
],
'quarter' => 'q1',
'media_type' => 'json'
]),
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/reports/qtd"
payload := strings.NewReader("{\n \"companyID\": \"fcc26cc444450ac8a33ry32a3z34462\",\n \"employeeID\": [\n \"6266y546eyecc34458aef1\",\n \"6556fabfcf2eab26e23331\"\n ],\n \"quarter\": \"q1\",\n \"media_type\": \"json\"\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/reports/qtd")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"fcc26cc444450ac8a33ry32a3z34462\",\n \"employeeID\": [\n \"6266y546eyecc34458aef1\",\n \"6556fabfcf2eab26e23331\"\n ],\n \"quarter\": \"q1\",\n \"media_type\": \"json\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/reports/qtd")
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\": \"fcc26cc444450ac8a33ry32a3z34462\",\n \"employeeID\": [\n \"6266y546eyecc34458aef1\",\n \"6556fabfcf2eab26e23331\"\n ],\n \"quarter\": \"q1\",\n \"media_type\": \"json\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"job_id": "e560b4e3-71a5-49cb-aedc-8e8yy3db81a",
"status": "pending",
"request_body": {
"companyID": "fcc26cc444450ac8a33ry32a3z34462",
"employeeID": [
"6266y546eyecc34458aef1",
"6556fabfcf2eab26e23331"
],
"quarter": "q1",
"media_type": "json",
"has_live_key": true,
"job_type": "reports",
"report_format": "qtd"
},
"created_at": "2023-12-07T18:49:28.679Z"
}
}{
"success": false,
"errors": [
{
"message": "Employee or Contractor ID is not formatted correctly",
"code": 72
}
]
}Authorizations
Body
application/json
⌘I
Create Quarter to Date Report
curl --request POST \
--url https://api.zeal.com/reports/qtd \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "fcc26cc444450ac8a33ry32a3z34462",
"employeeID": [
"6266y546eyecc34458aef1",
"6556fabfcf2eab26e23331"
],
"quarter": "q1",
"media_type": "json"
}
'import requests
url = "https://api.zeal.com/reports/qtd"
payload = {
"companyID": "fcc26cc444450ac8a33ry32a3z34462",
"employeeID": ["6266y546eyecc34458aef1", "6556fabfcf2eab26e23331"],
"quarter": "q1",
"media_type": "json"
}
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: 'fcc26cc444450ac8a33ry32a3z34462',
employeeID: ['6266y546eyecc34458aef1', '6556fabfcf2eab26e23331'],
quarter: 'q1',
media_type: 'json'
})
};
fetch('https://api.zeal.com/reports/qtd', 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/reports/qtd",
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' => 'fcc26cc444450ac8a33ry32a3z34462',
'employeeID' => [
'6266y546eyecc34458aef1',
'6556fabfcf2eab26e23331'
],
'quarter' => 'q1',
'media_type' => 'json'
]),
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/reports/qtd"
payload := strings.NewReader("{\n \"companyID\": \"fcc26cc444450ac8a33ry32a3z34462\",\n \"employeeID\": [\n \"6266y546eyecc34458aef1\",\n \"6556fabfcf2eab26e23331\"\n ],\n \"quarter\": \"q1\",\n \"media_type\": \"json\"\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/reports/qtd")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"fcc26cc444450ac8a33ry32a3z34462\",\n \"employeeID\": [\n \"6266y546eyecc34458aef1\",\n \"6556fabfcf2eab26e23331\"\n ],\n \"quarter\": \"q1\",\n \"media_type\": \"json\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/reports/qtd")
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\": \"fcc26cc444450ac8a33ry32a3z34462\",\n \"employeeID\": [\n \"6266y546eyecc34458aef1\",\n \"6556fabfcf2eab26e23331\"\n ],\n \"quarter\": \"q1\",\n \"media_type\": \"json\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"job_id": "e560b4e3-71a5-49cb-aedc-8e8yy3db81a",
"status": "pending",
"request_body": {
"companyID": "fcc26cc444450ac8a33ry32a3z34462",
"employeeID": [
"6266y546eyecc34458aef1",
"6556fabfcf2eab26e23331"
],
"quarter": "q1",
"media_type": "json",
"has_live_key": true,
"job_type": "reports",
"report_format": "qtd"
},
"created_at": "2023-12-07T18:49:28.679Z"
}
}{
"success": false,
"errors": [
{
"message": "Employee or Contractor ID is not formatted correctly",
"code": 72
}
]
}