Contractor Payment Deductions
Create Contractor Deduction Template
Create a deduction template for a contractor, such as a miscellaneous deduction.
POST
/
contractor-deduction-templates
Create Contractor Deduction Template
curl --request POST \
--url https://api.zeal.com/contractor-deduction-templates \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "<string>",
"contractorID": "<string>",
"custom_name": "<string>",
"effective_start_date": "<string>",
"effective_end_date": "<string>",
"external_id": "<string>",
"contractor_contribution_amount": 123,
"contractor_contribution_percentage": 123,
"agency_name": "<string>",
"agency_address": "<string>",
"case_id": "<string>",
"order_number": "<string>"
}
'import requests
url = "https://api.zeal.com/contractor-deduction-templates"
payload = {
"companyID": "<string>",
"contractorID": "<string>",
"custom_name": "<string>",
"effective_start_date": "<string>",
"effective_end_date": "<string>",
"external_id": "<string>",
"contractor_contribution_amount": 123,
"contractor_contribution_percentage": 123,
"agency_name": "<string>",
"agency_address": "<string>",
"case_id": "<string>",
"order_number": "<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>',
contractorID: '<string>',
custom_name: '<string>',
effective_start_date: '<string>',
effective_end_date: '<string>',
external_id: '<string>',
contractor_contribution_amount: 123,
contractor_contribution_percentage: 123,
agency_name: '<string>',
agency_address: '<string>',
case_id: '<string>',
order_number: '<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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'companyID' => '<string>',
'contractorID' => '<string>',
'custom_name' => '<string>',
'effective_start_date' => '<string>',
'effective_end_date' => '<string>',
'external_id' => '<string>',
'contractor_contribution_amount' => 123,
'contractor_contribution_percentage' => 123,
'agency_name' => '<string>',
'agency_address' => '<string>',
'case_id' => '<string>',
'order_number' => '<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 \"companyID\": \"<string>\",\n \"contractorID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<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/contractor-deduction-templates")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"<string>\",\n \"contractorID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<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::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyID\": \"<string>\",\n \"contractorID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<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 with this contractorID does not exist",
"code": 73
}
]
}Body
application/json
⌘I
Create Contractor Deduction Template
curl --request POST \
--url https://api.zeal.com/contractor-deduction-templates \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"companyID": "<string>",
"contractorID": "<string>",
"custom_name": "<string>",
"effective_start_date": "<string>",
"effective_end_date": "<string>",
"external_id": "<string>",
"contractor_contribution_amount": 123,
"contractor_contribution_percentage": 123,
"agency_name": "<string>",
"agency_address": "<string>",
"case_id": "<string>",
"order_number": "<string>"
}
'import requests
url = "https://api.zeal.com/contractor-deduction-templates"
payload = {
"companyID": "<string>",
"contractorID": "<string>",
"custom_name": "<string>",
"effective_start_date": "<string>",
"effective_end_date": "<string>",
"external_id": "<string>",
"contractor_contribution_amount": 123,
"contractor_contribution_percentage": 123,
"agency_name": "<string>",
"agency_address": "<string>",
"case_id": "<string>",
"order_number": "<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>',
contractorID: '<string>',
custom_name: '<string>',
effective_start_date: '<string>',
effective_end_date: '<string>',
external_id: '<string>',
contractor_contribution_amount: 123,
contractor_contribution_percentage: 123,
agency_name: '<string>',
agency_address: '<string>',
case_id: '<string>',
order_number: '<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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'companyID' => '<string>',
'contractorID' => '<string>',
'custom_name' => '<string>',
'effective_start_date' => '<string>',
'effective_end_date' => '<string>',
'external_id' => '<string>',
'contractor_contribution_amount' => 123,
'contractor_contribution_percentage' => 123,
'agency_name' => '<string>',
'agency_address' => '<string>',
'case_id' => '<string>',
'order_number' => '<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 \"companyID\": \"<string>\",\n \"contractorID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<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/contractor-deduction-templates")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyID\": \"<string>\",\n \"contractorID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<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::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyID\": \"<string>\",\n \"contractorID\": \"<string>\",\n \"custom_name\": \"<string>\",\n \"effective_start_date\": \"<string>\",\n \"effective_end_date\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contractor_contribution_amount\": 123,\n \"contractor_contribution_percentage\": 123,\n \"agency_name\": \"<string>\",\n \"agency_address\": \"<string>\",\n \"case_id\": \"<string>\",\n \"order_number\": \"<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 with this contractorID does not exist",
"code": 73
}
]
}