---
title: "Get general ledger"
method: GET
path: "/accounting/generalLedger"
tags: ["General Ledger"]
---

# Get general ledger

`GET /accounting/generalLedger`

## Request

- Base URL: `https://api.clearbooks.co.uk/v1`
- URL: `https://api.clearbooks.co.uk/v1/accounting/generalLedger`
- Auth: OAuth 2 (authorization code, authorization URL `https://secure.clearbooks.co.uk/account/action/oauth/`, token URL `https://api.clearbooks.co.uk/oauth/token`, scopes: `accounting.transactions:read`)

## Query parameters

- `transactionId` integer
- `accountCodeId` integer
- `accountingDateFrom` string, date
- `accountingDateTo` string, date
- `sortBy` 'transactionId' | 'accountingDate' | 'accountCodeId' | 'amount'
- `sortDirection` 'ascending' | 'descending'
- `limit` integer
- `page` integer

## Headers

- `X-Business-ID` integer

## Response `200`

An array of general ledger lines

- GeneralLedgerLine[]
  - `transactionId` integer
  - `accountingDate` string, date
  - `accountCodeId` integer
  - `amount` number, float

## Other responses

- `400`: The request was malformed or missing required parameters
- `401`: A valid authorisation token is required to perform this action
- `403`: No permission was granted to perform this action
- `429`: The application is making too many requests and has been rate limited

---

[API](https://skmtc.dev/clearbooks/apis/clear-books-api.md) · [All operations](https://skmtc.dev/clearbooks/apis/clear-books-api/llms.txt) · [OpenAPI document](https://skmtc.dev/clearbooks/apis/clear-books-api/revisions/5e46fa6863a7?raw)
