JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
const companyBenefit = await client.hris.benefits.retrieve('benefit_id');
console.log(companyBenefit.benefit_id);from finch import Finch
client = Finch(
access_token="My Access Token",
)
company_benefit = client.hris.benefits.retrieve(
benefit_id="benefit_id",
)
print(company_benefit.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"),
)
companyBenefit, err := client.HRIS.Benefits.Get(
context.TODO(),
"benefit_id",
finchgo.HRISBenefitGetParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", companyBenefit.BenefitID)
}
package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.CompanyBenefit;
import com.tryfinch.api.models.HrisBenefitRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
CompanyBenefit companyBenefit = client.hris().benefits().retrieve("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.CompanyBenefit
import com.tryfinch.api.models.HrisBenefitRetrieveParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val companyBenefit: CompanyBenefit = client.hris().benefits().retrieve("benefit_id")
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
company_benefit = finch.hris.benefits.retrieve("benefit_id")
puts(company_benefit)curl --request GET \
--url https://api.tryfinch.com/employer/benefits/{benefit_id} \
--header 'Authorization: Bearer <token>' \
--header 'Finch-API-Version: <finch-api-version>'<?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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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",
"type": "401k",
"description": "Example 401k",
"frequency": "every_paycheck"
}{
"code": 404,
"name": "not_found_error",
"finch_code": "benefit_not_found",
"message": "Benefit not found"
}Deductions
Get Deduction
Lists deductions and contributions information for a given item
GET
/
employer
/
benefits
/
{benefit_id}
JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
const companyBenefit = await client.hris.benefits.retrieve('benefit_id');
console.log(companyBenefit.benefit_id);from finch import Finch
client = Finch(
access_token="My Access Token",
)
company_benefit = client.hris.benefits.retrieve(
benefit_id="benefit_id",
)
print(company_benefit.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"),
)
companyBenefit, err := client.HRIS.Benefits.Get(
context.TODO(),
"benefit_id",
finchgo.HRISBenefitGetParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", companyBenefit.BenefitID)
}
package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.CompanyBenefit;
import com.tryfinch.api.models.HrisBenefitRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
CompanyBenefit companyBenefit = client.hris().benefits().retrieve("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.CompanyBenefit
import com.tryfinch.api.models.HrisBenefitRetrieveParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val companyBenefit: CompanyBenefit = client.hris().benefits().retrieve("benefit_id")
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
company_benefit = finch.hris.benefits.retrieve("benefit_id")
puts(company_benefit)curl --request GET \
--url https://api.tryfinch.com/employer/benefits/{benefit_id} \
--header 'Authorization: Bearer <token>' \
--header 'Finch-API-Version: <finch-api-version>'<?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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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",
"type": "401k",
"description": "Example 401k",
"frequency": "every_paycheck"
}{
"code": 404,
"name": "not_found_error",
"finch_code": "benefit_not_found",
"message": "Benefit not found"
}Availability: Automated providers only.
Employer Match capabilities are currently in Beta. Please reach out if you are interested in gaining early access.
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]))Path Parameters
Query Parameters
The entity IDs to specify which entities' data to access. Provide exactly one entity ID per request; a maximum of one is accepted.
Required array length:
1 elementExample:
["550e8400-e29b-41d4-a716-446655440000"]
Response
OK
The id of the benefit.
Type of benefit.
Available options:
457, 401k, 401k_roth, 401k_loan, 403b, 403b_roth, 457_roth, commuter, custom_post_tax, custom_pre_tax, fsa_dependent_care, fsa_medical, hsa_post, hsa_pre, s125_dental, s125_medical, s125_vision, simple, simple_ira, null The frequency of the benefit deduction/contribution.
Available options:
every_paycheck, monthly, one_time, null The company match for this benefit.
Show child attributes
Show child attributes
Was this page helpful?