import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const ruleListResponse of client.hris.company.payStatementItem.rules.list()) {
console.log(ruleListResponse.id);
}[
{
"id": "5d0b10a1-a09a-430f-81f1-20be735dc5e9",
"priority": 1,
"effective_start_date": "2025-01-01",
"effective_end_date": "2025-12-31",
"conditions": [
{
"field": "name",
"operator": "equals",
"value": "Salary"
}
],
"attributes": {
"metadata": {
"myLabel": "My Value"
}
},
"entity_type": "pay_statement_item",
"created_at": "2025-01-01T10:00:00Z",
"updated_at": "2025-01-01T10:00:00Z"
},
{
"id": "e8b90071-0c11-471c-86e8-e303ef2f6782",
"priority": 1,
"conditions": [
{
"field": "name",
"operator": "equals",
"value": "Medical Insurance"
}
],
"attributes": {
"metadata": {
"myLabel2": "My Value 2"
}
},
"entity_type": "pay_statement_item",
"created_at": "2025-01-10T10:00:00Z",
"updated_at": "2025-02-05T08:45:00Z"
}
]List all rules of a connection account.
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const ruleListResponse of client.hris.company.payStatementItem.rules.list()) {
console.log(ruleListResponse.id);
}[
{
"id": "5d0b10a1-a09a-430f-81f1-20be735dc5e9",
"priority": 1,
"effective_start_date": "2025-01-01",
"effective_end_date": "2025-12-31",
"conditions": [
{
"field": "name",
"operator": "equals",
"value": "Salary"
}
],
"attributes": {
"metadata": {
"myLabel": "My Value"
}
},
"entity_type": "pay_statement_item",
"created_at": "2025-01-01T10:00:00Z",
"updated_at": "2025-01-01T10:00:00Z"
},
{
"id": "e8b90071-0c11-471c-86e8-e303ef2f6782",
"priority": 1,
"conditions": [
{
"field": "name",
"operator": "equals",
"value": "Medical Insurance"
}
],
"attributes": {
"metadata": {
"myLabel2": "My Value 2"
}
},
"entity_type": "pay_statement_item",
"created_at": "2025-01-10T10:00:00Z",
"updated_at": "2025-02-05T08:45:00Z"
}
]Please use your Access Token
Header used to specify the version for a given API request. Current version is 2020-09-17.
([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))The entity IDs to retrieve rules for.
1 element["550e8400-e29b-41d4-a716-446655440000"]
OK
Show child attributes
Was this page helpful?