JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const payGroupListResponse of client.payroll.payGroups.list()) {
console.log(payGroupListResponse.id);
}from finch import Finch
client = Finch(
access_token="My Access Token",
)
page = client.payroll.pay_groups.list()
page = page.items[0]
print(page.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.Payroll.PayGroups.List(context.TODO(), finchgo.PayrollPayGroupListParams{})
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.PayrollPayGroupListPage;
import com.tryfinch.api.models.PayrollPayGroupListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
PayrollPayGroupListPage page = client.payroll().payGroups().list();
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.PayrollPayGroupListPage
import com.tryfinch.api.models.PayrollPayGroupListParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val page: PayrollPayGroupListPage = client.payroll().payGroups().list()
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
page = finch.payroll.pay_groups.list
puts(page)curl --request GET \
--url https://api.tryfinch.com/employer/pay-groups \
--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/pay-groups",
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;
}[
{
"id": "5d0b10a1-a09a-430f-81f1-20be735dc5e9",
"name": "Monthly",
"pay_frequencies": [
"monthly"
]
},
{
"id": "9349eed4-4064-4641-ba8e-9e1ad7e1d014",
"name": "Weekly",
"pay_frequencies": [
"weekly"
]
}
]Payroll
Get All Pay Groups
Read company pay groups and frequencies
GET
/
employer
/
pay-groups
JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const payGroupListResponse of client.payroll.payGroups.list()) {
console.log(payGroupListResponse.id);
}from finch import Finch
client = Finch(
access_token="My Access Token",
)
page = client.payroll.pay_groups.list()
page = page.items[0]
print(page.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.Payroll.PayGroups.List(context.TODO(), finchgo.PayrollPayGroupListParams{})
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.PayrollPayGroupListPage;
import com.tryfinch.api.models.PayrollPayGroupListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
PayrollPayGroupListPage page = client.payroll().payGroups().list();
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.PayrollPayGroupListPage
import com.tryfinch.api.models.PayrollPayGroupListParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val page: PayrollPayGroupListPage = client.payroll().payGroups().list()
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
page = finch.payroll.pay_groups.list
puts(page)curl --request GET \
--url https://api.tryfinch.com/employer/pay-groups \
--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/pay-groups",
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;
}[
{
"id": "5d0b10a1-a09a-430f-81f1-20be735dc5e9",
"name": "Monthly",
"pay_frequencies": [
"monthly"
]
},
{
"id": "9349eed4-4064-4641-ba8e-9e1ad7e1d014",
"name": "Weekly",
"pay_frequencies": [
"weekly"
]
}
]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]))Query Parameters
The entity IDs to specify which entities' data to access.
Required array length:
1 elementExample:
["550e8400-e29b-41d4-a716-446655440000"]Response
200 - application/json
Company pay groups
Was this page helpful?
⌘I