JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const individualResponse of client.hris.individuals.retrieveMany({
requests: [{ individual_id: 'individual_id' }],
})) {
console.log(individualResponse.individual_id);
}from finch import Finch
client = Finch(
access_token="My Access Token",
)
page = client.hris.individuals.retrieve_many(
requests=[{
"individual_id": "individual_id"
}],
)
page = page.responses[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.Individuals.GetMany(context.TODO(), finchgo.HRISIndividualGetManyParams{
Requests: finchgo.F([]finchgo.HRISIndividualGetManyParamsRequest{{
IndividualID: finchgo.F("individual_id"),
}}),
})
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.HrisIndividualRetrieveManyPage;
import com.tryfinch.api.models.HrisIndividualRetrieveManyParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
HrisIndividualRetrieveManyParams params = HrisIndividualRetrieveManyParams.builder()
.addRequest(HrisIndividualRetrieveManyParams.Request.builder()
.individualId("individual_id")
.build())
.build();
HrisIndividualRetrieveManyPage page = client.hris().individuals().retrieveMany(params);
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.HrisIndividualRetrieveManyPage
import com.tryfinch.api.models.HrisIndividualRetrieveManyParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val params: HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams.builder()
.addRequest(HrisIndividualRetrieveManyParams.Request.builder()
.individualId("individual_id")
.build())
.build()
val page: HrisIndividualRetrieveManyPage = client.hris().individuals().retrieveMany(params)
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
page = finch.hris.individuals.retrieve_many(requests: [{individual_id: "individual_id"}])
puts(page)curl --request POST \
--url https://api.tryfinch.com/employer/individual \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Finch-API-Version: <finch-api-version>' \
--data '
{
"requests": [
{
"individual_id": "<string>"
}
],
"options": {
"include": [
"<string>"
]
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/individual",
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([
'requests' => [
[
'individual_id' => '<string>'
]
],
'options' => [
'include' => [
'<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;
}{
"responses": [
{
"individual_id": "5d0b10a1-a09a-430f-81f1-20be735dc5e9",
"code": 200,
"body": {
"id": "5d0b10a1-a09a-430f-81f1-20be735dc5e9",
"first_name": "Jane",
"middle_name": null,
"last_name": "Doe",
"preferred_name": "Janey",
"emails": [
{
"data": "jane@acme.com",
"type": "work"
},
{
"data": "janed@personal.com",
"type": "personal"
}
],
"phone_numbers": [
{
"data": "+14475678901",
"type": "personal"
}
],
"gender": "female",
"ethnicity": "black_or_african_american",
"dob": "1970-01-01",
"residence": {
"line1": "123 Main St",
"line2": "Apt C",
"city": "Schenectady",
"state": "NY",
"postal_code": "12345",
"country": "US"
}
}
}
]
}
Organization
Individual
Read individual data, excluding income and employment data
POST
/
employer
/
individual
JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const individualResponse of client.hris.individuals.retrieveMany({
requests: [{ individual_id: 'individual_id' }],
})) {
console.log(individualResponse.individual_id);
}from finch import Finch
client = Finch(
access_token="My Access Token",
)
page = client.hris.individuals.retrieve_many(
requests=[{
"individual_id": "individual_id"
}],
)
page = page.responses[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.Individuals.GetMany(context.TODO(), finchgo.HRISIndividualGetManyParams{
Requests: finchgo.F([]finchgo.HRISIndividualGetManyParamsRequest{{
IndividualID: finchgo.F("individual_id"),
}}),
})
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.HrisIndividualRetrieveManyPage;
import com.tryfinch.api.models.HrisIndividualRetrieveManyParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
HrisIndividualRetrieveManyParams params = HrisIndividualRetrieveManyParams.builder()
.addRequest(HrisIndividualRetrieveManyParams.Request.builder()
.individualId("individual_id")
.build())
.build();
HrisIndividualRetrieveManyPage page = client.hris().individuals().retrieveMany(params);
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.HrisIndividualRetrieveManyPage
import com.tryfinch.api.models.HrisIndividualRetrieveManyParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val params: HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams.builder()
.addRequest(HrisIndividualRetrieveManyParams.Request.builder()
.individualId("individual_id")
.build())
.build()
val page: HrisIndividualRetrieveManyPage = client.hris().individuals().retrieveMany(params)
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
page = finch.hris.individuals.retrieve_many(requests: [{individual_id: "individual_id"}])
puts(page)curl --request POST \
--url https://api.tryfinch.com/employer/individual \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Finch-API-Version: <finch-api-version>' \
--data '
{
"requests": [
{
"individual_id": "<string>"
}
],
"options": {
"include": [
"<string>"
]
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/individual",
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([
'requests' => [
[
'individual_id' => '<string>'
]
],
'options' => [
'include' => [
'<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;
}{
"responses": [
{
"individual_id": "5d0b10a1-a09a-430f-81f1-20be735dc5e9",
"code": 200,
"body": {
"id": "5d0b10a1-a09a-430f-81f1-20be735dc5e9",
"first_name": "Jane",
"middle_name": null,
"last_name": "Doe",
"preferred_name": "Janey",
"emails": [
{
"data": "jane@acme.com",
"type": "work"
},
{
"data": "janed@personal.com",
"type": "personal"
}
],
"phone_numbers": [
{
"data": "+14475678901",
"type": "personal"
}
],
"gender": "female",
"ethnicity": "black_or_african_american",
"dob": "1970-01-01",
"residence": {
"line1": "123 Main St",
"line2": "Apt C",
"city": "Schenectady",
"state": "NY",
"postal_code": "12345",
"country": "US"
}
}
}
]
}
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
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"]
Body
application/json
Response
Individual data
Show child attributes
Show child attributes
Was this page helpful?
⌘I