Ledger Items
curl --request POST \
--url https://api.tryfinch.com/employer/ledger-items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Finch-API-Version: <finch-api-version>' \
--data '
{
"requests": [
{
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"offset": 1,
"limit": 2
}
]
}
'import requests
url = "https://api.tryfinch.com/employer/ledger-items"
payload = { "requests": [
{
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"offset": 1,
"limit": 2
}
] }
headers = {
"Finch-API-Version": "<finch-api-version>",
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Finch-API-Version': '<finch-api-version>',
'Content-Type': '<content-type>',
Authorization: 'Bearer <token>'
},
body: JSON.stringify({
requests: [{payment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', offset: 1, limit: 2}]
})
};
fetch('https://api.tryfinch.com/employer/ledger-items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/ledger-items",
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([
'requests' => [
[
'payment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'offset' => 1,
'limit' => 2
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tryfinch.com/employer/ledger-items"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"offset\": 1,\n \"limit\": 2\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Finch-API-Version", "<finch-api-version>")
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tryfinch.com/employer/ledger-items")
.header("Finch-API-Version", "<finch-api-version>")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"requests\": [\n {\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"offset\": 1,\n \"limit\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryfinch.com/employer/ledger-items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Finch-API-Version"] = '<finch-api-version>'
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"requests\": [\n {\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"offset\": 1,\n \"limit\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"responses": [
{
"payment_id": "fc8b024e-d373-4c9c-80fc-f1625383d142",
"code": 200,
"body": {
"source": "direct",
"provider_description": null,
"pay_date": "2022-05-20",
"totals": {
"debit": {
"amount": 5463791,
"currency": "usd"
},
"credit": {
"amount": 5463791,
"currency": "usd"
},
"balanced": true
},
"paging": {
"count": 2,
"offset": 0
},
"ledger_items": [
{
"type": "regular_wages",
"account_type": "RegularWages",
"account_description": "Regular Wages",
"debit": {
"amount": 5463791,
"currency": "usd"
},
"credit": {
"amount": 0,
"currency": "usd"
}
},
{
"type": "cash_debit_net_pay",
"account_type": "DebitNetPay",
"account_description": "Employee Payment",
"debit": {
"amount": 0,
"currency": "usd"
},
"credit": {
"amount": 5463791,
"currency": "usd"
}
}
]
}
}
]
}Payroll
Ledger Items
Read the ledger entries for one or more payments.
POST
/
employer
/
ledger-items
Ledger Items
curl --request POST \
--url https://api.tryfinch.com/employer/ledger-items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Finch-API-Version: <finch-api-version>' \
--data '
{
"requests": [
{
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"offset": 1,
"limit": 2
}
]
}
'import requests
url = "https://api.tryfinch.com/employer/ledger-items"
payload = { "requests": [
{
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"offset": 1,
"limit": 2
}
] }
headers = {
"Finch-API-Version": "<finch-api-version>",
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Finch-API-Version': '<finch-api-version>',
'Content-Type': '<content-type>',
Authorization: 'Bearer <token>'
},
body: JSON.stringify({
requests: [{payment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', offset: 1, limit: 2}]
})
};
fetch('https://api.tryfinch.com/employer/ledger-items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/ledger-items",
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([
'requests' => [
[
'payment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'offset' => 1,
'limit' => 2
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tryfinch.com/employer/ledger-items"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"offset\": 1,\n \"limit\": 2\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Finch-API-Version", "<finch-api-version>")
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tryfinch.com/employer/ledger-items")
.header("Finch-API-Version", "<finch-api-version>")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"requests\": [\n {\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"offset\": 1,\n \"limit\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryfinch.com/employer/ledger-items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Finch-API-Version"] = '<finch-api-version>'
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"requests\": [\n {\n \"payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"offset\": 1,\n \"limit\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"responses": [
{
"payment_id": "fc8b024e-d373-4c9c-80fc-f1625383d142",
"code": 200,
"body": {
"source": "direct",
"provider_description": null,
"pay_date": "2022-05-20",
"totals": {
"debit": {
"amount": 5463791,
"currency": "usd"
},
"credit": {
"amount": 5463791,
"currency": "usd"
},
"balanced": true
},
"paging": {
"count": 2,
"offset": 0
},
"ledger_items": [
{
"type": "regular_wages",
"account_type": "RegularWages",
"account_description": "Regular Wages",
"debit": {
"amount": 5463791,
"currency": "usd"
},
"credit": {
"amount": 0,
"currency": "usd"
}
},
{
"type": "cash_debit_net_pay",
"account_type": "DebitNetPay",
"account_description": "Employee Payment",
"debit": {
"amount": 0,
"currency": "usd"
},
"credit": {
"amount": 5463791,
"currency": "usd"
}
}
]
}
}
]
}Beta — This endpoint is currently available for Gusto only. Endpoint paths and field names may change before general availability.
Headers
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 when the connection has more than one entity — omitting it returns a 400 invalid_request_error. Optional for single-entity connections.
Required array length:
1 elementExample:
["550e8400-e29b-41d4-a716-446655440000"]
Body
application/json
Was this page helpful?