Create Employee Deduction Template
Create an employee deduction template, such as a 401(k), HSA, or miscellaneous deduction.
curl --request POST \
--url https://api.zeal.com/employee-deduction-templates \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "<string>",
"employeeID": "<string>",
"custom_name": "<string>",
"effective_start_date": "2023-12-25",
"effective_end_date": "2023-12-25",
"employee_contribution_amount": 123,
"employee_contribution_percentage": 123,
"employer_contribution_amount": 123,
"employer_contribution_percentage": 123,
"agency_address": "<string>",
"agency_name": "<string>",
"case_id": "<string>",
"order_number": "<string>",
"external_id": "<string>"
}
'import requests
url = "https://api.zeal.com/employee-deduction-templates"
payload = {
"companyID": "<string>",
"employeeID": "<string>",
"custom_name": "<string>",
"effective_start_date": "2023-12-25",
"effective_end_date": "2023-12-25",
"employee_contribution_amount": 123,
"employee_contribution_percentage": 123,
"employer_contribution_amount": 123,
"employer_contribution_percentage": 123,
"agency_address": "<string>",
"agency_name": "<string>",
"case_id": "<string>",
"order_number": "<string>",
"external_id": "<string>"
}
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>',
employeeID: '<string>',
custom_name: '<string>',
effective_start_date: '2023-12-25',
effective_end_date: '2023-12-25',
employee_contribution_amount: 123,
employee_contribution_percentage: 123,
employer_contribution_amount: 123,
employer_contribution_percentage: 123,
agency_address: '<string>',
agency_name: '<string>',
case_id: '<string>',
order_number: '<string>',
external_id: '<string>'
})
};
fetch('https://api.zeal.com/employee-deduction-templates', 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/employee-deduction-templates",
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>',
'employeeID' => '<string>',
'custom_name' => '<string>',
'effective_start_date' => '2023-12-25',
'effective_end_date' => '2023-12-25',
'employee_contribution_amount' => 123,
'employee_contribution_percentage' => 123,
'employer_contribution_amount' => 123,
'employer_contribution_percentage' => 123,
'agency_address' => '<string>',
'agency_name' => '<string>',
'case_id' => '<string>',
'order_number' => '<string>',
'external_id' => '<string>'
]),
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/employee-deduction-templates"
payload := strings.NewReader("{\n \"companyID\": \"<string>\",\n \"employeeID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"2023-12-25\",\n \"effective_end_date\": \"2023-12-25\",\n \"employee_contribution_amount\": 123,\n \"employee_contribution_percentage\": 123,\n \"employer_contribution_amount\": 123,\n \"employer_contribution_percentage\": 123,\n \"agency_address\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<string>\",\n \"external_id\": \"<string>\"\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/employee-deduction-templates")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"<string>\",\n \"employeeID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"2023-12-25\",\n \"effective_end_date\": \"2023-12-25\",\n \"employee_contribution_amount\": 123,\n \"employee_contribution_percentage\": 123,\n \"employer_contribution_amount\": 123,\n \"employer_contribution_percentage\": 123,\n \"agency_address\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/employee-deduction-templates")
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 \"employeeID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"2023-12-25\",\n \"effective_end_date\": \"2023-12-25\",\n \"employee_contribution_amount\": 123,\n \"employee_contribution_percentage\": 123,\n \"employer_contribution_amount\": 123,\n \"employer_contribution_percentage\": 123,\n \"agency_address\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<string>\",\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {}
}{
"success": false,
"errors": [
{
"message": "<string>",
"code": 123
}
]
}Authorizations
Body
ID of the company related to this template
ID of the employee related to this template
Human-readable name for the deduction template
Type of deduction. garnishment is deprecated and will no longer be accepted after October 15, 2026. Use POST /garnishments instead.
401k, 403b, dependent_care_benefit, employer_sponsored_health_coverage, garnishment, hsa, miscellaneous, roth_401k, roth_ira, section_125, simple_ira Date the template should start becoming effective
Date the template should become ineffective
Default dollar amount contributed by the employee for deductions
Default percentage of employee's pay contributed by the employee for deductions
Default dollar amount contributed by the employer for deductions
Default percentage of employee's pay contributed by the employer for deductions
Contribution limit type for the template (HSA only)
family, individual Name of the agency for a court order (Garnishment only)
Address of the agency for a court order (Garnishment only)
Case ID of a court order (Garnishment only)
Order number of a court order (Garnishment only)
ID in an external system related to the template
curl --request POST \
--url https://api.zeal.com/employee-deduction-templates \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "<string>",
"employeeID": "<string>",
"custom_name": "<string>",
"effective_start_date": "2023-12-25",
"effective_end_date": "2023-12-25",
"employee_contribution_amount": 123,
"employee_contribution_percentage": 123,
"employer_contribution_amount": 123,
"employer_contribution_percentage": 123,
"agency_address": "<string>",
"agency_name": "<string>",
"case_id": "<string>",
"order_number": "<string>",
"external_id": "<string>"
}
'import requests
url = "https://api.zeal.com/employee-deduction-templates"
payload = {
"companyID": "<string>",
"employeeID": "<string>",
"custom_name": "<string>",
"effective_start_date": "2023-12-25",
"effective_end_date": "2023-12-25",
"employee_contribution_amount": 123,
"employee_contribution_percentage": 123,
"employer_contribution_amount": 123,
"employer_contribution_percentage": 123,
"agency_address": "<string>",
"agency_name": "<string>",
"case_id": "<string>",
"order_number": "<string>",
"external_id": "<string>"
}
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>',
employeeID: '<string>',
custom_name: '<string>',
effective_start_date: '2023-12-25',
effective_end_date: '2023-12-25',
employee_contribution_amount: 123,
employee_contribution_percentage: 123,
employer_contribution_amount: 123,
employer_contribution_percentage: 123,
agency_address: '<string>',
agency_name: '<string>',
case_id: '<string>',
order_number: '<string>',
external_id: '<string>'
})
};
fetch('https://api.zeal.com/employee-deduction-templates', 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/employee-deduction-templates",
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>',
'employeeID' => '<string>',
'custom_name' => '<string>',
'effective_start_date' => '2023-12-25',
'effective_end_date' => '2023-12-25',
'employee_contribution_amount' => 123,
'employee_contribution_percentage' => 123,
'employer_contribution_amount' => 123,
'employer_contribution_percentage' => 123,
'agency_address' => '<string>',
'agency_name' => '<string>',
'case_id' => '<string>',
'order_number' => '<string>',
'external_id' => '<string>'
]),
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/employee-deduction-templates"
payload := strings.NewReader("{\n \"companyID\": \"<string>\",\n \"employeeID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"2023-12-25\",\n \"effective_end_date\": \"2023-12-25\",\n \"employee_contribution_amount\": 123,\n \"employee_contribution_percentage\": 123,\n \"employer_contribution_amount\": 123,\n \"employer_contribution_percentage\": 123,\n \"agency_address\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<string>\",\n \"external_id\": \"<string>\"\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/employee-deduction-templates")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"<string>\",\n \"employeeID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"2023-12-25\",\n \"effective_end_date\": \"2023-12-25\",\n \"employee_contribution_amount\": 123,\n \"employee_contribution_percentage\": 123,\n \"employer_contribution_amount\": 123,\n \"employer_contribution_percentage\": 123,\n \"agency_address\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/employee-deduction-templates")
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 \"employeeID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"2023-12-25\",\n \"effective_end_date\": \"2023-12-25\",\n \"employee_contribution_amount\": 123,\n \"employee_contribution_percentage\": 123,\n \"employer_contribution_amount\": 123,\n \"employer_contribution_percentage\": 123,\n \"agency_address\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<string>\",\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {}
}{
"success": false,
"errors": [
{
"message": "<string>",
"code": 123
}
]
}