The chart of accounts
curl --request GET \
--url https://api.trycherry.ai/v1/accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trycherry.ai/v1/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trycherry.ai/v1/accounts', 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.trycherry.ai/v1/accounts",
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.trycherry.ai/v1/accounts"
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.trycherry.ai/v1/accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trycherry.ai/v1/accounts")
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{
"data": [
{
"id": "b47a9c2e-1d3f-4a5b-8c6d-0e9f8a7b6c5d",
"entityId": "3f9c1e0a-8b2d-4e6f-9a01-5c7d2b8e4f10",
"accountNumber": "1010",
"name": "Checking",
"category": "asset",
"country": "US",
"isActive": true
},
{
"id": "a36f8b1d-0c2e-4f4a-8b5c-7d6e5f4a3b2c",
"entityId": "3f9c1e0a-8b2d-4e6f-9a01-5c7d2b8e4f10",
"accountNumber": "3000",
"name": "Opening Balance Equity",
"category": "equity",
"country": "US",
"isActive": true
},
{
"id": "c58b0d3f-2e4a-4b6c-9d7e-1f0a9b8c7d6e",
"entityId": "3f9c1e0a-8b2d-4e6f-9a01-5c7d2b8e4f10",
"accountNumber": "4010",
"name": "Revenue",
"category": "revenue",
"country": "US",
"isActive": true
},
{
"id": "d69c1e4a-3f5b-4c7d-0e8f-2a1b0c9d8e7f",
"entityId": "3f9c1e0a-8b2d-4e6f-9a01-5c7d2b8e4f10",
"accountNumber": "6110",
"name": "Software & Subscriptions",
"category": "expense",
"country": "US",
"isActive": true
}
]
}{
"error": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"reason": "<string>"
}Accounts
The chart of accounts
Every ledger account: number, name, category (asset/liability/equity/revenue/expense), and active flag. Account numbers are the vocabulary the rest of the API speaks — transaction categories and journal lines both resolve against this list. Small enough to return whole; not paginated.
GET
/
accounts
The chart of accounts
curl --request GET \
--url https://api.trycherry.ai/v1/accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trycherry.ai/v1/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trycherry.ai/v1/accounts', 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.trycherry.ai/v1/accounts",
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.trycherry.ai/v1/accounts"
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.trycherry.ai/v1/accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trycherry.ai/v1/accounts")
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{
"data": [
{
"id": "b47a9c2e-1d3f-4a5b-8c6d-0e9f8a7b6c5d",
"entityId": "3f9c1e0a-8b2d-4e6f-9a01-5c7d2b8e4f10",
"accountNumber": "1010",
"name": "Checking",
"category": "asset",
"country": "US",
"isActive": true
},
{
"id": "a36f8b1d-0c2e-4f4a-8b5c-7d6e5f4a3b2c",
"entityId": "3f9c1e0a-8b2d-4e6f-9a01-5c7d2b8e4f10",
"accountNumber": "3000",
"name": "Opening Balance Equity",
"category": "equity",
"country": "US",
"isActive": true
},
{
"id": "c58b0d3f-2e4a-4b6c-9d7e-1f0a9b8c7d6e",
"entityId": "3f9c1e0a-8b2d-4e6f-9a01-5c7d2b8e4f10",
"accountNumber": "4010",
"name": "Revenue",
"category": "revenue",
"country": "US",
"isActive": true
},
{
"id": "d69c1e4a-3f5b-4c7d-0e8f-2a1b0c9d8e7f",
"entityId": "3f9c1e0a-8b2d-4e6f-9a01-5c7d2b8e4f10",
"accountNumber": "6110",
"name": "Software & Subscriptions",
"category": "expense",
"country": "US",
"isActive": true
}
]
}{
"error": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"reason": "<string>"
}⌘I