Trial Balance
Trial Balance endpoints for the Accounting API
Key terms for this page
- Unified API
- A common interface and data model for a category of services, such as accounting.
- Consumer
- An Apideck record representing the customer or isolated customer account whose integrations you access.
- Connector
- Apideck’s integration with a downstream service, such as QuickBooks, Xero or NetSuite.
A Trial Balance lists every ledger account's debit or credit balance as of a date.
The Trial Balance model
The name of the report as returned by the connector.
The date income and expense balances accumulate from: the start of the fiscal year containing end_date, unless the connector notes say otherwise. Null when the connector does not report it.
The date the balances are reported as of. Connectors that only report per period round the requested date up to the end of its period; this field returns the date actually used.
Indicates the associated currency for an amount of money. Values correspond to ISO 4217.
One line per ledger account with a non-zero balance, plus any line the connector adds to make the report complete (see line_type).
The sum of the debit column.
{}Get Trial Balance
Get the trial balance as of a date. Read-only.
Header parameters
ID of the consumer which you want to get or push data from
The ID of your Unify application
Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.
Query parameters
Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads
Apply filters
Include raw response. Mostly used for debugging purposes
Responses
Mapping coverage per connector
Request example
package main
import(
"context"
"os"
sdkgo "github.com/apideck-libraries/sdk-go"
"github.com/apideck-libraries/sdk-go/models/components"
"github.com/apideck-libraries/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithConsumerID("test-consumer"),
sdkgo.WithAppID("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"),
sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
)
res, err := s.Accounting.TrialBalance.Get(ctx, operations.AccountingTrialBalanceOneRequest{
ServiceID: sdkgo.Pointer("quickbooks"),
CompanyID: sdkgo.Pointer("12345"),
PassThrough: map[string]any{
"search": "San Francisco",
},
Filter: &components.TrialBalanceFilter{
EndDate: sdkgo.Pointer("2025-12-31"),
AccountingMethod: components.TrialBalanceFilterAccountingMethodAccrual.ToPointer(),
},
})
if err != nil {
log.Fatal(err)
}
if res.GetTrialBalanceResponse != nil {
// handle response
}
}Response example
{
"status_code": 200,
"status": "OK",
"service": "quickbooks",
"resource": "TrialBalance",
"operation": "one",
"data": {
"report_name": "Trial Balance",
"start_date": "2025-01-01",
"end_date": "2025-12-31",
"currency": "USD",
"accounts": [
{
"line_type": "account",
"account_id": "123456",
"code": "1100",
"name": "Current assets",
"debit": 1250.5,
"credit": 0,
"balance": 1250.5
}
],
"total_debit": 98250,
"total_credit": 98250,
"custom_mappings": {}
},
"meta": {
"items_on_page": 50,
"cursors": {
"previous": "em9oby1jcm06OnBhZ2U6OjE=",
"current": "em9oby1jcm06OnBhZ2U6OjI=",
"next": "em9oby1jcm06OnBhZ2U6OjM="
},
"total_count": 1,
"warnings": [
{
"type": "downstream_request_failed",
"status_code": 429,
"error": "string",
"operation": "getManager",
"message": "string"
}
]
},
"_raw": {}
}