JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
const payGroup = await client.payroll.payGroups.retrieve('pay_group_id');
console.log(payGroup.id);from finch import Finch
client = Finch(
access_token="My Access Token",
)
pay_group = client.payroll.pay_groups.retrieve(
pay_group_id="pay_group_id",
)
print(pay_group.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"),
)
payGroup, err := client.Payroll.PayGroups.Get(
context.TODO(),
"pay_group_id",
finchgo.PayrollPayGroupGetParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", payGroup.ID)
}
package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.PayGroupRetrieveResponse;
import com.tryfinch.api.models.PayrollPayGroupRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
PayGroupRetrieveResponse payGroup = client.payroll().payGroups().retrieve("pay_group_id");
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.PayGroupRetrieveResponse
import com.tryfinch.api.models.PayrollPayGroupRetrieveParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val payGroup: PayGroupRetrieveResponse = client.payroll().payGroups().retrieve("pay_group_id")
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
pay_group = finch.payroll.pay_groups.retrieve("pay_group_id")
puts(pay_group)curl --request GET \
--url https://api.tryfinch.com/employer/pay-groups/{pay_group_id} \
--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/{pay_group_id}",
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"
],
"individual_ids": [
"be7b048c-a6f3-4194-a017-2f537d4f3565"
]
}Payroll
Get Pay Group
Read information from a single pay group
GET
/
employer
/
pay-groups
/
{pay_group_id}
JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
const payGroup = await client.payroll.payGroups.retrieve('pay_group_id');
console.log(payGroup.id);from finch import Finch
client = Finch(
access_token="My Access Token",
)
pay_group = client.payroll.pay_groups.retrieve(
pay_group_id="pay_group_id",
)
print(pay_group.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"),
)
payGroup, err := client.Payroll.PayGroups.Get(
context.TODO(),
"pay_group_id",
finchgo.PayrollPayGroupGetParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", payGroup.ID)
}
package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.PayGroupRetrieveResponse;
import com.tryfinch.api.models.PayrollPayGroupRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
PayGroupRetrieveResponse payGroup = client.payroll().payGroups().retrieve("pay_group_id");
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.PayGroupRetrieveResponse
import com.tryfinch.api.models.PayrollPayGroupRetrieveParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val payGroup: PayGroupRetrieveResponse = client.payroll().payGroups().retrieve("pay_group_id")
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
pay_group = finch.payroll.pay_groups.retrieve("pay_group_id")
puts(pay_group)curl --request GET \
--url https://api.tryfinch.com/employer/pay-groups/{pay_group_id} \
--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/{pay_group_id}",
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"
],
"individual_ids": [
"be7b048c-a6f3-4194-a017-2f537d4f3565"
]
}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]))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"]
Response
200 - application/json
Pay group data
Finch id (uuidv4) for the pay group
Name of the pay group
List of pay frequencies associated with this pay group
Available options:
annually, bi_weekly, daily, monthly, other, quarterly, semi_annually, semi_monthly, weekly Finch id (uuidv4) for an individual assigned to this pay group
Was this page helpful?