cURL
curl --request PATCH \
--url https://sandbox.withclasp.com/payroll_benefits/{public_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payroll_provider_external_id": "<string>"
}
'import requests
url = "https://sandbox.withclasp.com/payroll_benefits/{public_id}"
payload = { "payroll_provider_external_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({payroll_provider_external_id: '<string>'})
};
fetch('https://sandbox.withclasp.com/payroll_benefits/{public_id}', 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://sandbox.withclasp.com/payroll_benefits/{public_id}",
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([
'payroll_provider_external_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://sandbox.withclasp.com/payroll_benefits/{public_id}"
payload := strings.NewReader("{\n \"payroll_provider_external_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.withclasp.com/payroll_benefits/{public_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payroll_provider_external_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.withclasp.com/payroll_benefits/{public_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payroll_provider_external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"member": "<string>",
"line_of_coverage": "accident",
"member_contribution": "<string>",
"employer_contribution": "<string>",
"description": "<string>",
"period": "weekly",
"effective_start": "2023-12-25",
"effective_end": "2023-12-25",
"payroll_provider_external_id": "<string>",
"taxability": "pre_tax",
"coverage_type": "member",
"enrollment_plan": "<string>"
}Payroll Benefits
Update Payroll Benefit
Updates a single payroll benefit deduction. Commonly used to link benefits between Clasp and the payroll provider.
PATCH
/
payroll_benefits
/
{public_id}
cURL
curl --request PATCH \
--url https://sandbox.withclasp.com/payroll_benefits/{public_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payroll_provider_external_id": "<string>"
}
'import requests
url = "https://sandbox.withclasp.com/payroll_benefits/{public_id}"
payload = { "payroll_provider_external_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({payroll_provider_external_id: '<string>'})
};
fetch('https://sandbox.withclasp.com/payroll_benefits/{public_id}', 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://sandbox.withclasp.com/payroll_benefits/{public_id}",
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([
'payroll_provider_external_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://sandbox.withclasp.com/payroll_benefits/{public_id}"
payload := strings.NewReader("{\n \"payroll_provider_external_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.withclasp.com/payroll_benefits/{public_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payroll_provider_external_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.withclasp.com/payroll_benefits/{public_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payroll_provider_external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"member": "<string>",
"line_of_coverage": "accident",
"member_contribution": "<string>",
"employer_contribution": "<string>",
"description": "<string>",
"period": "weekly",
"effective_start": "2023-12-25",
"effective_end": "2023-12-25",
"payroll_provider_external_id": "<string>",
"taxability": "pre_tax",
"coverage_type": "member",
"enrollment_plan": "<string>"
}Authorizations
API Key authentication with required prefix "Bearer"
Path Parameters
Body
application/json
Response
200 - application/json
Pattern:
^[-a-zA-Z0-9_]+$accident- Accidentaccidental_death- Accidental Death and Dismembermentcancer- Cancercommuter_parking- Commuter Parkingcommuter_transit- Commuter Transitdental- Dentaldependent_care_fsa- Dependent Care Flexible Spending Accountemployee_assistance_program- Employee Assistance Programhealthcare_fsa- Healthcare Flexible Spending Accounthospital_indemnity- Hospital Indemnityhsa- Health Savings Accountlegal_services- Legal Serviceslife- Lifelimited_purpose_fsa- Limited Purpose Flexible Spending Accountlong_term_disability- Long Term Disabilitylump_sum_disability- Lump Sum Disabilitymedical- Medicalpet_insurance- Pet Insuranceshort_term_disability- Short Term Disabilitysupplemental- Supplementaltelemedicine- Telemedicinevision- Visionvoluntary_critical_illness- Voluntary Critical Illnessvoluntary_life- Voluntary Lifevoluntary_accidental_death- Voluntary Accidental Deathvoluntary_long_term_disability- Voluntary Long Term Disabilityvoluntary_ltd- Voluntary LTDvoluntary_short_term_disability- Voluntary Short Term Disability
Available options:
accident, accidental_death, cancer, commuter_parking, commuter_transit, dental, dependent_care_fsa, employee_assistance_program, healthcare_fsa, hospital_indemnity, hsa, legal_services, life, limited_purpose_fsa, long_term_disability, lump_sum_disability, medical, pet_insurance, short_term_disability, supplemental, telemedicine, vision, voluntary_critical_illness, voluntary_life, voluntary_accidental_death, voluntary_long_term_disability, voluntary_ltd, voluntary_short_term_disability Pattern:
^-?\d{0,8}(?:\.\d{0,2})?$Pattern:
^-?\d{0,8}(?:\.\d{0,2})?$Maximum string length:
255weekly- Weeklybiweekly- Biweeklysemimonthly- Semimonthlymonthly- Monthly
Available options:
weekly, biweekly, semimonthly, monthly Maximum string length:
255pre_tax- Pre-taxpost_tax- Post-tax
Available options:
pre_tax, post_tax member- Member Onlymember_spouse- Member + Spousemember_child- Member + Childmember_children- Member + Childrenmember_family- Member + Family
Available options:
member, member_spouse, member_child, member_children, member_family