JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
const updateCompanyBenefitResponse = await client.hris.benefits.update('benefit_id');
console.log(updateCompanyBenefitResponse.benefit_id);from finch import Finch
client = Finch(
access_token="My Access Token",
)
update_company_benefit_response = client.hris.benefits.update(
benefit_id="benefit_id",
)
print(update_company_benefit_response.benefit_id)package main
import (
"context"
"fmt"
"github.com/Finch-API/finch-api-go"
"github.com/Finch-API/finch-api-go/option"
)
func main() {
client := finchgo.NewClient(
option.WithAccessToken("My Access Token"),
)
updateCompanyBenefitResponse, err := client.HRIS.Benefits.Update(
context.TODO(),
"benefit_id",
finchgo.HRISBenefitUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", updateCompanyBenefitResponse.BenefitID)
}package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.HrisBenefitUpdateParams;
import com.tryfinch.api.models.UpdateCompanyBenefitResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
UpdateCompanyBenefitResponse updateCompanyBenefitResponse = client.hris().benefits().update("benefit_id");
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.HrisBenefitUpdateParams
import com.tryfinch.api.models.UpdateCompanyBenefitResponse
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val updateCompanyBenefitResponse: UpdateCompanyBenefitResponse = client.hris().benefits().update("benefit_id")
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
update_company_benefit_response = finch.hris.benefits.update("benefit_id")
puts(update_company_benefit_response)curl --request POST \
--url https://api.tryfinch.com/employer/benefits/{benefit_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Finch-API-Version: <finch-api-version>' \
--data '
{
"description": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/benefits/{benefit_id}",
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([
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"Finch-API-Version: <finch-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"benefit_id": "6547e3aa-d887-4a77-bd41-17221e17cce3",
"job_id": "be1b3351-a88e-46c2-96e4-c2cf38e529a7"
}Deductions
Update Deduction
Updates an existing company-wide deduction or contribution
POST
/
employer
/
benefits
/
{benefit_id}
JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
const updateCompanyBenefitResponse = await client.hris.benefits.update('benefit_id');
console.log(updateCompanyBenefitResponse.benefit_id);from finch import Finch
client = Finch(
access_token="My Access Token",
)
update_company_benefit_response = client.hris.benefits.update(
benefit_id="benefit_id",
)
print(update_company_benefit_response.benefit_id)package main
import (
"context"
"fmt"
"github.com/Finch-API/finch-api-go"
"github.com/Finch-API/finch-api-go/option"
)
func main() {
client := finchgo.NewClient(
option.WithAccessToken("My Access Token"),
)
updateCompanyBenefitResponse, err := client.HRIS.Benefits.Update(
context.TODO(),
"benefit_id",
finchgo.HRISBenefitUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", updateCompanyBenefitResponse.BenefitID)
}package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.HrisBenefitUpdateParams;
import com.tryfinch.api.models.UpdateCompanyBenefitResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
UpdateCompanyBenefitResponse updateCompanyBenefitResponse = client.hris().benefits().update("benefit_id");
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.HrisBenefitUpdateParams
import com.tryfinch.api.models.UpdateCompanyBenefitResponse
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val updateCompanyBenefitResponse: UpdateCompanyBenefitResponse = client.hris().benefits().update("benefit_id")
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
update_company_benefit_response = finch.hris.benefits.update("benefit_id")
puts(update_company_benefit_response)curl --request POST \
--url https://api.tryfinch.com/employer/benefits/{benefit_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Finch-API-Version: <finch-api-version>' \
--data '
{
"description": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/benefits/{benefit_id}",
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([
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"Finch-API-Version: <finch-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"benefit_id": "6547e3aa-d887-4a77-bd41-17221e17cce3",
"job_id": "be1b3351-a88e-46c2-96e4-c2cf38e529a7"
}Availability: Automated and Assisted providers
This is a live request to the provider. Latencies may vary from seconds to minutes depending on the provider.
Authorizations
Please use your Access Token
Headers
Header used to specify the version for a given API request. Current version is 2020-09-17.
Pattern:
([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))Used to indicate the original media type of the resource
Path Parameters
Query Parameters
The entity IDs to specify which entities' data to access.
Required array length:
1 elementExample:
["550e8400-e29b-41d4-a716-446655440000"]Body
application/json
Updated name or description.
Was this page helpful?
⌘I