import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const employmentDataResponse of client.hris.employments.retrieveMany({
requests: [{ individual_id: 'individual_id' }],
})) {
console.log(employmentDataResponse.individual_id);
}{
"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",
"title": "Customer Support",
"manager": {
"id": "c205b3fa-b626-4346-bf0f-ca065ab88d31"
},
"department": {
"name": "Product"
},
"employment": {
"type": "employee",
"subtype": "full_time"
},
"start_date": "2017-06-30",
"end_date": null,
"latest_rehire_date": null,
"is_active": true,
"employment_status": "onboarding",
"class_code": "8810",
"location": {
"line1": "12 Bird Drive",
"line2": null,
"city": "Palo Alto",
"state": "CA",
"postal_code": "94301",
"country": "US"
},
"income": {
"unit": "yearly",
"amount": 10000000,
"currency": "usd",
"effective_date": "2019-03-01"
},
"income_history": [
{
"unit": "yearly",
"amount": 9000000,
"currency": "usd",
"effective_date": "2018-05-15"
},
{
"unit": "yearly",
"amount": 8000000,
"currency": "usd",
"effective_date": "2017-06-30"
}
],
"custom_fields": [
{
"name": "tShirtSize",
"value": "L"
}
]
}
}
]
}Read individual employment and income data
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const employmentDataResponse of client.hris.employments.retrieveMany({
requests: [{ individual_id: 'individual_id' }],
})) {
console.log(employmentDataResponse.individual_id);
}{
"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",
"title": "Customer Support",
"manager": {
"id": "c205b3fa-b626-4346-bf0f-ca065ab88d31"
},
"department": {
"name": "Product"
},
"employment": {
"type": "employee",
"subtype": "full_time"
},
"start_date": "2017-06-30",
"end_date": null,
"latest_rehire_date": null,
"is_active": true,
"employment_status": "onboarding",
"class_code": "8810",
"location": {
"line1": "12 Bird Drive",
"line2": null,
"city": "Palo Alto",
"state": "CA",
"postal_code": "94301",
"country": "US"
},
"income": {
"unit": "yearly",
"amount": 10000000,
"currency": "usd",
"effective_date": "2019-03-01"
},
"income_history": [
{
"unit": "yearly",
"amount": 9000000,
"currency": "usd",
"effective_date": "2018-05-15"
},
{
"unit": "yearly",
"amount": 8000000,
"currency": "usd",
"effective_date": "2017-06-30"
}
],
"custom_fields": [
{
"name": "tShirtSize",
"value": "L"
}
]
}
}
]
}Please use your Access Token
Header used to specify the version for a given API request. Current version is 2020-09-17.
Used to indicate the original media type of the resource
The entity IDs to specify which entities' data to access.
1 element["550e8400-e29b-41d4-a716-446655440000"]Individual Ids Request Body
The array of batch requests.
Show child attributes
A stable Finch id (UUID v4) for an individual in the company. There is no limit to the number of individual_id to send per request. It is preferantial to send all ids in a single request for Finch to optimize provider rate-limits.
Employment data
Show child attributes
A stable Finch id (UUID v4) for an individual in the company.
Show child attributes
The legal first name of the individual.
The legal middle name of the individual.
The legal last name of the individual.
The current title of the individual.
The employment object.
Show child attributes
The main employment type of the individual.
employee, contractor, The secondary employment type of the individual. Options: full_time, part_time, intern, temp, seasonal and individual_contractor.
full_time, intern, part_time, temp, seasonal, individual_contractor, true if the individual an an active employee or contractor at the company.
The detailed employment status of the individual. Available options: active, deceased, leave, onboarding, prehire, retired, terminated.
active, deceased, leave, onboarding, prehire, retired, terminated, Worker's compensation classification code for this employee
Show child attributes
Street address or PO box.
Apartment, suite, unit, or building.
City, district, suburb, town, or village.
The state code.
The postal code or zip code.
The 2-letter ISO 3166 country code.
A stable Finch id (UUID v4) for an individual in the company.
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
The income unit of payment. Options: yearly, quarterly, monthly, semi_monthly, bi_weekly, weekly, daily, hourly, and fixed.
yearly, quarterly, monthly, semi_monthly, bi_weekly, weekly, daily, hourly, fixed, The income amount in cents.
The currency code.
The date the income amount went into effect.
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
The income unit of payment. Options: yearly, quarterly, monthly, semi_monthly, bi_weekly, weekly, daily, hourly, and fixed.
yearly, quarterly, monthly, semi_monthly, bi_weekly, weekly, daily, hourly, fixed, The income amount in cents.
The currency code.
The date the income amount went into effect.
The source system's unique employment identifier for this individual
This field is deprecated in favour of source_id
Was this page helpful?