Update Employee Deduction Template
Update fields on an existing employee deduction template by deductionTemplateID.
curl --request PATCH \
--url https://api.zeal.com/employee-deduction-templates/{deductionTemplateID} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"deductionTemplateID": "<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/{deductionTemplateID}"
payload = {
"deductionTemplateID": "<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.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
deductionTemplateID: '<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/{deductionTemplateID}', 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/{deductionTemplateID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'deductionTemplateID' => '<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/{deductionTemplateID}"
payload := strings.NewReader("{\n \"deductionTemplateID\": \"<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("PATCH", 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.patch("https://api.zeal.com/employee-deduction-templates/{deductionTemplateID}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"deductionTemplateID\": \"<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/{deductionTemplateID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"deductionTemplateID\": \"<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
Path Parameters
ID of this template
^[0-9a-f]{32}$Body
ID of the template to update
Human-readable name for the deduction template
Date the template should start become effective
Date the template should become ineffective
Default dollar amount to be contributed by the employee for deductions
Default percentage of employee's pay to be contributed by the employee for deductions
Default dollar amount to be contributed by the employer for deductions
Default percentage of employee's pay to be 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 PATCH \
--url https://api.zeal.com/employee-deduction-templates/{deductionTemplateID} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"deductionTemplateID": "<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/{deductionTemplateID}"
payload = {
"deductionTemplateID": "<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.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
deductionTemplateID: '<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/{deductionTemplateID}', 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/{deductionTemplateID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'deductionTemplateID' => '<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/{deductionTemplateID}"
payload := strings.NewReader("{\n \"deductionTemplateID\": \"<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("PATCH", 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.patch("https://api.zeal.com/employee-deduction-templates/{deductionTemplateID}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"deductionTemplateID\": \"<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/{deductionTemplateID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"deductionTemplateID\": \"<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
}
]
}