curl --request GET \
--url https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv', 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.app.lastaccountingcompany.com/portal/lens/general-ledger.csv",
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>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<string>{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Download an account-by-account general ledger
Streams every active posted journal line in the selected inclusive month range, ordered by account, date and entry. Reversed originals and their posted reversal twins are both excluded, matching the canonical ledger basis. Each row includes account identity, debit, credit and the reconciled running balance. Accounts present in the canonical ledger with no movements in the selected range have one opening-balance row, including zero balances. The trailing row_kind column distinguishes journal_entry from opening_balance; the existing first 20 columns retain their order. Opening-balance rows have zero debit and credit and blank journal identity, entry date, period, line number, source and VAT code. Their explicit scope_from and scope_through still name the selected range. Opening and closing balances use the same fiscal-opening snapshot basis as /accounting/gl; journal facts use the same posted drilldown semantics as /accounting/journal-entries. The whole file is built in one repeatable-read snapshot and never creates a chat message or wakes Björn. Explicit month bounds must be served exactly; the export refuses a range outside available books rather than using the interactive ledger pager’s clamped range.
curl --request GET \
--url https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv', 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.app.lastaccountingcompany.com/portal/lens/general-ledger.csv",
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>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/lens/general-ledger.csv")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<string>{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Authorizations
Portal API key minted in portal Settings → API access. Scope read or write; pinned to one company. Send as Authorization: Bearer lac_sk_....
Query Parameters
Target company. Optional — API keys are pinned to one company, and single-company sessions default to it.
Inclusive first month. Omit for the same month as through.
^[0-9]{4}-(0[1-9]|1[0-2])$Inclusive last month. Omit for the same month as from; both omitted select the latest posted month.
^[0-9]{4}-(0[1-9]|1[0-2])$Response
Account-by-account general-ledger CSV.
The response is of type string.