Generate trial balance
POST
/partners/reports/trial-balanceGenerates a trial balance as of a date.
Filters are query parameters only. Required: endDate (YYYY-MM-DD).
HMAC signature + Bearer access token
Try this requestQuery parameters
endDatedaterequiredAs-of date for the trial balance.
startDatedateoptionalPeriod start. When omitted the trial balance runs as of endDate, with prior-year profit in a synthetic Retained Earnings row.
currencystringoptionalReport currency. Defaults to workspace currency.
transactionStatusenumoptionalFilter transactions by review/reconciliation state.
One of: all, reviewed, unreviewed, reconciled, unreconciled
accountUuidsstringoptionalComma-separated account UUIDs to include.
tagUuidsstringoptionalComma-separated tag UUIDs to filter by.
noTagsstringoptionalSet to true to include only entries with no tags.
accountTypeenumoptionalRestrict to a single account type.
One of: Assets, Liabilities, Equity, Income, Expenses
Responses
200Trial balance report generated. `data.accounts` holds one row per account with a net `debit` or `credit`; `data.totals` sums both columns.400Missing or invalid query parameters.401Missing or invalid HMAC signature, expired timestamp, or invalid Bearer token. Troubleshoot403The credential does not have access to this workspace or resource. Troubleshoot429Rate limit exceeded (100 requests per minute per user of each app, or 10,000 per minute per app). Retry after the Retry-After header. TroubleshootPOST
https://api.getcount.com/partners/reports/trial-balanceRequest
import crypto from 'node:crypto';
const BASE_URL = 'https://api.getcount.com';
const CLIENT_ID = process.env.COUNT_CLIENT_ID;
const CLIENT_SECRET = process.env.COUNT_CLIENT_SECRET;
const ACCESS_TOKEN = process.env.COUNT_ACCESS_TOKEN;
const method = 'POST';
const signingPath = '/reports/trial-balance';
const timestamp = Math.floor(Date.now() / 1000).toString();
const bodyString = '';
const bodyHash = '';
const baseString = `${method}:${signingPath}:${timestamp}:${bodyHash}`;
const signature = crypto.createHmac('sha256', CLIENT_SECRET).update(baseString).digest('hex');
const response = await fetch(`${BASE_URL}/partners/reports/trial-balance`, {
method,
headers: {
'x-client-id': CLIENT_ID,
'x-timestamp': timestamp,
'x-signature': signature,
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
});
console.log(await response.json());Response · 200
{
"status": "success",
"message": "Success on generating trail balance report.",
"data": {
"totals": {
"totalDebit": 54000,
"totalCredit": 54000
},
"accounts": [
{
"id": "c8d9e0f1-a2b3-4567-cdef-789012345678",
"type": "Assets",
"name": "Business Checking",
"originalName": "Business Checking",
"systemCreated": false,
"accountNumber": "1000",
"subType": {
"id": 1,
"type": "Assets",
"name": "Cash and Bank",
"code": "CASH_AND_BANK",
"anchorTier": "PHYSICAL_ACCOUNT"
},
"debit": 39500
},
{
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"type": "Assets",
"name": "Accounts Receivable",
"originalName": "Accounts Receivable",
"systemCreated": true,
"accountNumber": "1200",
"subType": {
"id": 2,
"type": "Assets",
"name": "Accounts Receivable",
"code": "ACCOUNTS_RECEIVABLE",
"anchorTier": null
},
"debit": 2500
},
{
"id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"type": "Liabilities",
"name": "Accounts Payable",
"originalName": "Accounts Payable",
"systemCreated": true,
"accountNumber": "2000",
"subType": {
"id": 13,
"type": "Liabilities",
"name": "Accounts Payable",
"code": "ACCOUNTS_PAYABLE",
"anchorTier": null
},
"credit": 900
},
{
"id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"type": "Income",
"name": "Consulting Revenue",
"originalName": "Consulting Revenue",
"systemCreated": false,
"accountNumber": "4000",
"subType": {
"id": 24,
"type": "Income",
"name": "Income",
"code": "INCOME",
"anchorTier": null
},
"credit": 45000
},
{
"id": "3c4d5e6f-7a8b-4c9d-8e0f-2a3b4c5d6e7f",
"type": "Expenses",
"name": "Office Rent",
"originalName": "Office Rent",
"systemCreated": false,
"accountNumber": "6100",
"subType": {
"id": 28,
"type": "Expenses",
"name": "Operating Expenses",
"code": "OPERATING_EXPENSES",
"anchorTier": null
},
"debit": 12000
},
{
"id": "retained-earnings-synthetic",
"type": "Equity",
"name": "Retained Earnings (through Dec 31, 2025)",
"originalName": "Retained Earnings",
"accountNumber": null,
"subType": {
"name": "Retained Earnings",
"code": "RETAINED_EARNINGS",
"type": "Equity"
},
"credit": 8100
}
],
"filters": {
"endDate": "2026-03-31",
"currency": "USD",
"transactionStatus": "all"
}
}
}