Embedded HR
Accrual Balance History
View accrual balance history for a company, filtered by policy code and employee IDs.
POST
/
accrualBalance
/
history
Accrual Balance History
curl --request POST \
--url https://api.zeal.com/accrualBalance/history \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "<string>",
"policyCode": "<string>",
"employeeIDs": [
"<string>"
],
"endDate": "2023-12-25"
}
'import requests
url = "https://api.zeal.com/accrualBalance/history"
payload = {
"companyID": "<string>",
"policyCode": "<string>",
"employeeIDs": ["<string>"],
"endDate": "2023-12-25"
}
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: '<string>',
policyCode: '<string>',
employeeIDs: ['<string>'],
endDate: '2023-12-25'
})
};
fetch('https://api.zeal.com/accrualBalance/history', 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/accrualBalance/history",
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' => '<string>',
'policyCode' => '<string>',
'employeeIDs' => [
'<string>'
],
'endDate' => '2023-12-25'
]),
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/accrualBalance/history"
payload := strings.NewReader("{\n \"companyID\": \"<string>\",\n \"policyCode\": \"<string>\",\n \"employeeIDs\": [\n \"<string>\"\n ],\n \"endDate\": \"2023-12-25\"\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/accrualBalance/history")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"<string>\",\n \"policyCode\": \"<string>\",\n \"employeeIDs\": [\n \"<string>\"\n ],\n \"endDate\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/accrualBalance/history")
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\": \"<string>\",\n \"policyCode\": \"<string>\",\n \"employeeIDs\": [\n \"<string>\"\n ],\n \"endDate\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"employeeID": "66722ff005a48848507d75d9",
"policyName": "sick_leave",
"totalAccrued": "7.45",
"totalBalance": "21.64",
"totalUsage": "17.00",
"history": [
{
"reportingPeriodID": "6580ce4a3808d60023b4e17d",
"checks": [
"36cd1ff3857d4e9585aa18e93c6e62e2"
],
"balance": "26.29",
"accrued": "2.61",
"usage": "0.00"
},
{
"reportingPeriodID": "67080ab04a7fcc706be57598",
"checks": [
"24006fc9fb0f405f96304964f3a5e9f3"
],
"balance": "11.59",
"accrued": "2.29",
"usage": "17.00"
},
{
"reportingPeriodID": "67080ab04a7fcc706be575a6",
"checks": [
"8edb64ca204a4ad5b33a83acf9e248c5"
],
"balance": "21.64",
"accrued": "2.55",
"usage": "0.00"
}
]
}
],
"success": true,
"testMode": false
}{
"success": false,
"errors": [
{
"message": "Invalid",
"code": 13,
"status": 400,
"correlationId": "3b3f6226-db6a-4de1-889c-e3f3b00ceb09",
"params": {
"fields": [
"employeeIDs[0]"
]
}
}
],
"testMode": true
}Authorizations
Body
application/json
⌘I
Accrual Balance History
curl --request POST \
--url https://api.zeal.com/accrualBalance/history \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "<string>",
"policyCode": "<string>",
"employeeIDs": [
"<string>"
],
"endDate": "2023-12-25"
}
'import requests
url = "https://api.zeal.com/accrualBalance/history"
payload = {
"companyID": "<string>",
"policyCode": "<string>",
"employeeIDs": ["<string>"],
"endDate": "2023-12-25"
}
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: '<string>',
policyCode: '<string>',
employeeIDs: ['<string>'],
endDate: '2023-12-25'
})
};
fetch('https://api.zeal.com/accrualBalance/history', 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/accrualBalance/history",
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' => '<string>',
'policyCode' => '<string>',
'employeeIDs' => [
'<string>'
],
'endDate' => '2023-12-25'
]),
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/accrualBalance/history"
payload := strings.NewReader("{\n \"companyID\": \"<string>\",\n \"policyCode\": \"<string>\",\n \"employeeIDs\": [\n \"<string>\"\n ],\n \"endDate\": \"2023-12-25\"\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/accrualBalance/history")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"<string>\",\n \"policyCode\": \"<string>\",\n \"employeeIDs\": [\n \"<string>\"\n ],\n \"endDate\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/accrualBalance/history")
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\": \"<string>\",\n \"policyCode\": \"<string>\",\n \"employeeIDs\": [\n \"<string>\"\n ],\n \"endDate\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"employeeID": "66722ff005a48848507d75d9",
"policyName": "sick_leave",
"totalAccrued": "7.45",
"totalBalance": "21.64",
"totalUsage": "17.00",
"history": [
{
"reportingPeriodID": "6580ce4a3808d60023b4e17d",
"checks": [
"36cd1ff3857d4e9585aa18e93c6e62e2"
],
"balance": "26.29",
"accrued": "2.61",
"usage": "0.00"
},
{
"reportingPeriodID": "67080ab04a7fcc706be57598",
"checks": [
"24006fc9fb0f405f96304964f3a5e9f3"
],
"balance": "11.59",
"accrued": "2.29",
"usage": "17.00"
},
{
"reportingPeriodID": "67080ab04a7fcc706be575a6",
"checks": [
"8edb64ca204a4ad5b33a83acf9e248c5"
],
"balance": "21.64",
"accrued": "2.55",
"usage": "0.00"
}
]
}
],
"success": true,
"testMode": false
}{
"success": false,
"errors": [
{
"message": "Invalid",
"code": 13,
"status": 400,
"correlationId": "3b3f6226-db6a-4de1-889c-e3f3b00ceb09",
"params": {
"fields": [
"employeeIDs[0]"
]
}
}
],
"testMode": true
}