import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
const directories = await client.sandbox.directory.create();
console.log(directories);from finch import Finch
client = Finch(
access_token="My Access Token",
)
directories = client.sandbox.directory.create()
print(directories)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"),
)
directories, err := client.Sandbox.Directory.New(context.TODO(), finchgo.SandboxDirectoryNewParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", directories)
}
package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.DirectoryCreateResponse;
import com.tryfinch.api.models.SandboxDirectoryCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
List<DirectoryCreateResponse> directories = client.sandbox().directory().create();
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.DirectoryCreateResponse
import com.tryfinch.api.models.SandboxDirectoryCreateParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val directories: List<DirectoryCreateResponse> = client.sandbox().directory().create()
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
directories = finch.sandbox.directory.create
puts(directories)curl --request POST \
--url https://api.tryfinch.com/sandbox/directory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"first_name": "John",
"last_name": "Smith",
"dob": "01/01/2000"
}
]
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/sandbox/directory",
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([
[
'first_name' => 'John',
'last_name' => 'Smith',
'dob' => '01/01/2000'
]
]),
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;
}[
{}
]Add new individuals to a sandbox company
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
const directories = await client.sandbox.directory.create();
console.log(directories);from finch import Finch
client = Finch(
access_token="My Access Token",
)
directories = client.sandbox.directory.create()
print(directories)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"),
)
directories, err := client.Sandbox.Directory.New(context.TODO(), finchgo.SandboxDirectoryNewParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", directories)
}
package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.DirectoryCreateResponse;
import com.tryfinch.api.models.SandboxDirectoryCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
List<DirectoryCreateResponse> directories = client.sandbox().directory().create();
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.DirectoryCreateResponse
import com.tryfinch.api.models.SandboxDirectoryCreateParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val directories: List<DirectoryCreateResponse> = client.sandbox().directory().create()
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
directories = finch.sandbox.directory.create
puts(directories)curl --request POST \
--url https://api.tryfinch.com/sandbox/directory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"first_name": "John",
"last_name": "Smith",
"dob": "01/01/2000"
}
]
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/sandbox/directory",
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([
[
'first_name' => 'John',
'last_name' => 'Smith',
'dob' => '01/01/2000'
]
]),
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;
}[
{}
]body and a value of an array of individuals.// JavaScript example
await client.sandbox.directory.create({
body: [
// list of individual objects
]
})
Authorizations
Please use your Access Token
Body
The legal first name of the individual.
The legal middle name of the individual.
The legal last name of the individual.
The preferred name of the individual.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The gender of the individual.
female, male, other, decline_to_specify, null The EEOC-defined ethnicity of the individual.
asian, white, black_or_african_american, native_hawaiian_or_pacific_islander, american_indian_or_alaska_native, hispanic_or_latino, two_or_more_races, decline_to_specify, null The employee's marital status, used for beneficiary designation and spousal consent workflows.
single, married, divorced, widowed, domestic_partner, unknown, null (\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))Social Security Number of the individual. This field is only available with the ssn scope enabled and the options: { include: ['ssn'] } param set in the body. Click here to learn more about enabling the SSN field.
Social Security Number of the individual in encrypted format. This field is only available with the ssn scope enabled and the options: { include: ['ssn'] } param set in the body.
Show child attributes
Show child attributes
The current title of the individual.
The manager object representing the manager of the individual within the org.
Show child attributes
Show child attributes
The department object.
Show child attributes
Show child attributes
The employment object.
Show child attributes
Show child attributes
(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))true if the individual an an active employee or contractor at the company.
The detailed employment status of the individual.
active, deceased, leave, onboarding, prehire, retired, terminated, null The FLSA status of the individual. Available options: exempt, non_exempt, unknown.
exempt, non_exempt, unknown, null Worker's compensation classification code for this employee
Show child attributes
Show child attributes
The employee's income as reported by the provider. This may not always be annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, depending on what information the provider returns.
Show child attributes
Show child attributes
The array of income history.
The employee's income as reported by the provider. This may not always be annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, depending on what information the provider returns.
Show child attributes
Show child attributes
Custom fields for the individual. These are fields which are defined by the employer in the system. Custom fields are not currently supported for assisted connections.
Show child attributes
Show child attributes
The code identifying the union the employee is a member of, as configured in the payroll system.
The local chapter or local number within the employee's union.
IRS flag indicating whether the employee is classified as a Highly Compensated Employee for nondiscrimination testing purposes (ADP/ACP tests). US-only.
IRS flag indicating whether the employee is classified as a Key Employee for top-heavy testing purposes. US-only.
The source system's unique employment identifier for this individual
Response
OK
Was this page helpful?