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.
Glossary

A Trial Balance lists every ledger account's debit or credit balance as of a date.

The Trial Balance model

report_namestring or null

The name of the report as returned by the connector.

start_datestring or null

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.

end_datestring
required

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.

currencystring or null
Enum:UNKNOWN_CURRENCYAEDAFNALL

Indicates the associated currency for an amount of money. Values correspond to ISO 4217.

accountsobjects
required

One line per ledger account with a non-zero balance, plus any line the connector adds to make the report complete (see line_type).

total_debitnumber or null

The sum of the debit column.

Trial Balance example
{}

Get Trial Balance

get
https://unify.apideck.com/accounting/trial-balance

Get the trial balance as of a date. Read-only.

Authorizations:

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstringnon-empty
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

x-apideck-company-idstring

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

pass_throughobjectpass_through[example_downstream_property]=example_downstream_property

Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads

filterobjectfilter[end_date]=2025-12-31

Apply filters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

Responses

200Trial Balance
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Mapping coverage per connector

Campfire
Campfire
DATEV Unternehmen Online
DATEV Unternehmen Online
Dualentry
Dualentry
Exact Online
Exact Online
Exact Online NL
Exact Online NL
Exact Online UK
Exact Online UK
FreeAgent
FreeAgent
FreshBooks
FreshBooks
Intuit Enterprise Suite
Intuit Enterprise Suite
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Minox
Minox
Moneybird
Moneybird
NetSuite
NetSuite
Odoo
Odoo
Pennylane
Pennylane
QuickBooks
QuickBooks
Rillet
Rillet
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Sage Intacct
Sage Intacct
SnelStart
SnelStart
Spiris
Spiris
Twinfield
Twinfield
Visma eAccounting
Visma eAccounting
Visma Netvisor
Visma Netvisor
Xero
Xero
Zoho Books
Zoho Books
Access Financials
Access Financials
Request
Acumatica
Acumatica
Request
AFAS Software
AFAS Software
Request
Alegra
Alegra
Request
banqUP
banqUP
Request
Clear Books
Clear Books
Request
Digits
Digits
Request
e-Boekhouden.nl
e-Boekhouden.nl
Request
Fortnox
Fortnox
Request
Holded
Holded
Request
Intuit Bank Feeds
Intuit Bank Feeds
Request
Kashflow
Kashflow
Request
Lexware Office
Lexware Office
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
MYOB Acumatica
MYOB Acumatica
Request
Oracle Fusion Cloud
Oracle Fusion Cloud
Request
Plaid Core Exchange
Plaid Core Exchange
Request
Procountor
Procountor
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
Request
Sage Intacct REST
Sage Intacct REST
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
sevDesk
sevDesk
Request
Stripe
Stripe
Request
Wafeq
Wafeq
Request
Wave
Wave
Request
Workday
Workday
Request
Yuki
Yuki
Request

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": {}
}