---
title: "Get the trial balance"
method: GET
path: "/api/external/v2/trial_balance"
tags: ["Trial balance"]
---

# Get the trial balance

`GET /api/external/v2/trial_balance`

## Request

- Base URL: `https://app.pennylane.com`
- URL: `https://app.pennylane.com/api/external/v2/trial_balance`
- Auth: OAuth 2
  - Authorization code: `https://app.pennylane.com/oauth/authorize`
  - Token URL: `https://app.pennylane.com/oauth/oauth/token` scopes: `trial_balance:readonly`

This endpoint returns the trial balance of the current company
for the given period.

> ℹ️
> This endpoint requires the following scope: `trial_balance:readonly`

## Query parameters

- `period_start` string, date, required
- `period_end` string, date, required
- `is_auxiliary` boolean
- `cursor` string
- `limit` integer

## Headers

- `X-Company-Id` string

## Response `200`

Returns a list of balances grouped by ledger accounts.

- object
  - `items` object[], required
    - `number` string, required: Ledger account number
    - `formatted_number` string, required: Ledger account number with padded
    - `label` string, required: Ledger account label
    - `debits` string, required: Ledger account debits
    - `credits` string, required: Ledger account credits
  - `has_more` boolean, required: Indicates whether additional results are available beyond this set. Use this flag to determine if another request is needed.
  - `next_cursor` string, nullable, required: Cursor to retrieve the next set of results. Include this value in the cursor parameter of your next request to fetch subsequent items. A `null` `next_cursor` in the response indicates no further results.

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: Access to this resource forbidden

## Changes

- **2026-11-03** `871f863307e5`: 1 info
  - added the new optional `header` request parameter `X-Company-Id`

[Operation history](https://skmtc.dev/pennylane/apis/company-v2/changes/api/external/v2/trial_balance/get.md)

---

[API](https://skmtc.dev/pennylane/apis/company-v2.md) - [All operations](https://skmtc.dev/pennylane/apis/company-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/pennylane/apis/company-v2/revisions/871f863307e5?raw)
