JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const individualBenefit of client.hris.benefits.individuals.retrieveManyBenefits(
'benefit_id',
)) {
console.log(individualBenefit.individual_id);
}from finch import Finch
client = Finch(
access_token="My Access Token",
)
page = client.hris.benefits.individuals.retrieve_many_benefits(
benefit_id="benefit_id",
)
page = page.items[0]
print(page.individual_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"),
)
page, err := client.HRIS.Benefits.Individuals.GetManyBenefits(
context.TODO(),
"benefit_id",
finchgo.HRISBenefitIndividualGetManyBenefitsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.HrisBenefitIndividualRetrieveManyBenefitsPage;
import com.tryfinch.api.models.HrisBenefitIndividualRetrieveManyBenefitsParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
HrisBenefitIndividualRetrieveManyBenefitsPage page = client.hris().benefits().individuals().retrieveManyBenefits("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.HrisBenefitIndividualRetrieveManyBenefitsPage
import com.tryfinch.api.models.HrisBenefitIndividualRetrieveManyBenefitsParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val page: HrisBenefitIndividualRetrieveManyBenefitsPage = client.hris().benefits().individuals().retrieveManyBenefits("benefit_id")
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
page = finch.hris.benefits.individuals.retrieve_many_benefits("benefit_id")
puts(page)curl --request GET \
--url https://api.tryfinch.com/employer/benefits/{benefit_id}/individuals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--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}/individuals",
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>",
"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;
}[
{
"individual_id": "d02a6346-1f08-4312-a064-49ff3cafaa7a",
"code": 200,
"body": {
"employee_deduction": {
"type": "fixed",
"amount": 100
},
"company_contribution": {
"type": "fixed",
"amount": 100
},
"annual_maximum": 1000,
"catch_up": false
}
},
{
"individual_id": "e63c21ab-7cde-49d8-b6d6-ce208e84bf09",
"code": 200,
"body": {
"employee_deduction": {
"type": "percent",
"amount": 500
},
"company_contribution": {
"type": "percent",
"amount": 300
},
"annual_maximum": 1000,
"catch_up": false
}
}
][
{
"individual_id": "d02a6346-1f08-4312-a064-49ff3cafaa7a",
"code": 200,
"body": {
"employee_deduction": {
"type": "percent",
"amount": 500
},
"company_contribution": {
"type": "percent",
"amount": 300
},
"annual_maximum": 1000,
"catch_up": false
}
},
{
"individual_id": "e63c21ab-7cde-49d8-b6d6-ce208e84bf09",
"code": 404,
"body": {
"code": 404,
"name": "not_found_error",
"finch_code": "individual_not_found",
"message": "Individual not found"
}
}
]{
"code": 404,
"name": "not_found_error",
"finch_code": "benefit_not_found",
"message": "Benefit not found"
}Deductions
Get Deductions for Individuals
Get enrollment information for the given individuals.
GET
/
employer
/
benefits
/
{benefit_id}
/
individuals
JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const individualBenefit of client.hris.benefits.individuals.retrieveManyBenefits(
'benefit_id',
)) {
console.log(individualBenefit.individual_id);
}from finch import Finch
client = Finch(
access_token="My Access Token",
)
page = client.hris.benefits.individuals.retrieve_many_benefits(
benefit_id="benefit_id",
)
page = page.items[0]
print(page.individual_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"),
)
page, err := client.HRIS.Benefits.Individuals.GetManyBenefits(
context.TODO(),
"benefit_id",
finchgo.HRISBenefitIndividualGetManyBenefitsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.HrisBenefitIndividualRetrieveManyBenefitsPage;
import com.tryfinch.api.models.HrisBenefitIndividualRetrieveManyBenefitsParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
HrisBenefitIndividualRetrieveManyBenefitsPage page = client.hris().benefits().individuals().retrieveManyBenefits("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.HrisBenefitIndividualRetrieveManyBenefitsPage
import com.tryfinch.api.models.HrisBenefitIndividualRetrieveManyBenefitsParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val page: HrisBenefitIndividualRetrieveManyBenefitsPage = client.hris().benefits().individuals().retrieveManyBenefits("benefit_id")
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
page = finch.hris.benefits.individuals.retrieve_many_benefits("benefit_id")
puts(page)curl --request GET \
--url https://api.tryfinch.com/employer/benefits/{benefit_id}/individuals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--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}/individuals",
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>",
"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;
}[
{
"individual_id": "d02a6346-1f08-4312-a064-49ff3cafaa7a",
"code": 200,
"body": {
"employee_deduction": {
"type": "fixed",
"amount": 100
},
"company_contribution": {
"type": "fixed",
"amount": 100
},
"annual_maximum": 1000,
"catch_up": false
}
},
{
"individual_id": "e63c21ab-7cde-49d8-b6d6-ce208e84bf09",
"code": 200,
"body": {
"employee_deduction": {
"type": "percent",
"amount": 500
},
"company_contribution": {
"type": "percent",
"amount": 300
},
"annual_maximum": 1000,
"catch_up": false
}
}
][
{
"individual_id": "d02a6346-1f08-4312-a064-49ff3cafaa7a",
"code": 200,
"body": {
"employee_deduction": {
"type": "percent",
"amount": 500
},
"company_contribution": {
"type": "percent",
"amount": 300
},
"annual_maximum": 1000,
"catch_up": false
}
},
{
"individual_id": "e63c21ab-7cde-49d8-b6d6-ce208e84bf09",
"code": 404,
"body": {
"code": 404,
"name": "not_found_error",
"finch_code": "individual_not_found",
"message": "Individual not found"
}
}
]{
"code": 404,
"name": "not_found_error",
"finch_code": "benefit_not_found",
"message": "Benefit not found"
}Availability: Automated providers only
This is a live request to the provider. Latencies may vary from seconds to minutes depending on the provider and number of benefits.
This endpoint returns a bare array —
[ { … } ] — not an object. In the schema below, the items. prefix labels each element of the array, not a top-level items field.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. Provide exactly one entity ID per request; a maximum of one is accepted.
Required array length:
1 elementExample:
["550e8400-e29b-41d4-a716-446655440000"]
comma-delimited list of stable Finch uuids for each individual. If empty, defaults to all individuals
Example:
"d675d2b7-6d7b-41a8-b2d3-001eb3fb88f6,d02a6346-1f08-4312-a064-49ff3cafaa7a"
Was this page helpful?
⌘I