Contractor Payment Deductions
Update Contractor Deduction Template
Update fields on an existing contractor deduction template by deductionTemplateID.
PATCH
/
contractor-deduction-templates
Update Contractor Deduction Template
curl --request PATCH \
--url https://api.zeal.com/contractor-deduction-templates \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"deductionTemplateID": "<string>",
"companyID": "<string>",
"custom_name": "<string>",
"contractor_contribution_amount": 123,
"contractor_contribution_percentage": 123,
"effective_start_date": "<string>",
"effective_end_date": "<string>",
"agency_name": "<string>",
"agency_address": "<string>",
"case_id": "<string>",
"order_number": "<string>",
"external_id": "<string>"
}
'import requests
url = "https://api.zeal.com/contractor-deduction-templates"
payload = {
"deductionTemplateID": "<string>",
"companyID": "<string>",
"custom_name": "<string>",
"contractor_contribution_amount": 123,
"contractor_contribution_percentage": 123,
"effective_start_date": "<string>",
"effective_end_date": "<string>",
"agency_name": "<string>",
"agency_address": "<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>',
companyID: '<string>',
custom_name: '<string>',
contractor_contribution_amount: 123,
contractor_contribution_percentage: 123,
effective_start_date: '<string>',
effective_end_date: '<string>',
agency_name: '<string>',
agency_address: '<string>',
case_id: '<string>',
order_number: '<string>',
external_id: '<string>'
})
};
fetch('https://api.zeal.com/contractor-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/contractor-deduction-templates",
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>',
'companyID' => '<string>',
'custom_name' => '<string>',
'contractor_contribution_amount' => 123,
'contractor_contribution_percentage' => 123,
'effective_start_date' => '<string>',
'effective_end_date' => '<string>',
'agency_name' => '<string>',
'agency_address' => '<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/contractor-deduction-templates"
payload := strings.NewReader("{\n \"deductionTemplateID\": \"<string>\",\n \"companyID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<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/contractor-deduction-templates")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"deductionTemplateID\": \"<string>\",\n \"companyID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<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/contractor-deduction-templates")
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 \"companyID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<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": {
"deductionTemplateID": "48ffb95239326ca8713eadb2",
"companyID": "fc235f012bae46aa8a082f357715bcfa",
"contractorID": "669fe6216d9eff8ca4c9f0de",
"custom_name": "Child Support - John Doe",
"deduction_type": "garnishments",
"deduction_credit": false,
"effective_start_date": "2025-01-01",
"effective_end_date": null,
"external_id": null,
"contractor_contribution_amount": 500,
"contractor_contribution_percentage": null,
"agency_name": "State Child Support Agency",
"agency_address": "123 Main St, City, State 12345",
"case_id": "CS-2025-001",
"order_number": null
}
}{
"success": false,
"errors": [
{
"message": "Contractor deduction template not found.",
"code": 135
}
]
}Authorizations
Body
application/json
ID of contractor
ID of company
Human-readable name for the deduction template
Default dollar amount to be contributed by the contractor for deductions
Default percentage of contactor's pay to be contributed by the contractor for deductions
Date the template should start become effective
Date the template should become ineffective
Address of the agency for a court order (Garnishment only)
Name 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)
⌘I
Update Contractor Deduction Template
curl --request PATCH \
--url https://api.zeal.com/contractor-deduction-templates \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"deductionTemplateID": "<string>",
"companyID": "<string>",
"custom_name": "<string>",
"contractor_contribution_amount": 123,
"contractor_contribution_percentage": 123,
"effective_start_date": "<string>",
"effective_end_date": "<string>",
"agency_name": "<string>",
"agency_address": "<string>",
"case_id": "<string>",
"order_number": "<string>",
"external_id": "<string>"
}
'import requests
url = "https://api.zeal.com/contractor-deduction-templates"
payload = {
"deductionTemplateID": "<string>",
"companyID": "<string>",
"custom_name": "<string>",
"contractor_contribution_amount": 123,
"contractor_contribution_percentage": 123,
"effective_start_date": "<string>",
"effective_end_date": "<string>",
"agency_name": "<string>",
"agency_address": "<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>',
companyID: '<string>',
custom_name: '<string>',
contractor_contribution_amount: 123,
contractor_contribution_percentage: 123,
effective_start_date: '<string>',
effective_end_date: '<string>',
agency_name: '<string>',
agency_address: '<string>',
case_id: '<string>',
order_number: '<string>',
external_id: '<string>'
})
};
fetch('https://api.zeal.com/contractor-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/contractor-deduction-templates",
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>',
'companyID' => '<string>',
'custom_name' => '<string>',
'contractor_contribution_amount' => 123,
'contractor_contribution_percentage' => 123,
'effective_start_date' => '<string>',
'effective_end_date' => '<string>',
'agency_name' => '<string>',
'agency_address' => '<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/contractor-deduction-templates"
payload := strings.NewReader("{\n \"deductionTemplateID\": \"<string>\",\n \"companyID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<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/contractor-deduction-templates")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"deductionTemplateID\": \"<string>\",\n \"companyID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<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/contractor-deduction-templates")
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 \"companyID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<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": {
"deductionTemplateID": "48ffb95239326ca8713eadb2",
"companyID": "fc235f012bae46aa8a082f357715bcfa",
"contractorID": "669fe6216d9eff8ca4c9f0de",
"custom_name": "Child Support - John Doe",
"deduction_type": "garnishments",
"deduction_credit": false,
"effective_start_date": "2025-01-01",
"effective_end_date": null,
"external_id": null,
"contractor_contribution_amount": 500,
"contractor_contribution_percentage": null,
"agency_name": "State Child Support Agency",
"agency_address": "123 Main St, City, State 12345",
"case_id": "CS-2025-001",
"order_number": null
}
}{
"success": false,
"errors": [
{
"message": "Contractor deduction template not found.",
"code": 135
}
]
}