---
title: "List line entries (general ledger activity) across ledgers"
method: GET
path: "/books/line-entries"
tags: ["Books"]
---

# List line entries (general ledger activity) across ledgers

`GET /books/line-entries`

## Request

- Base URL: `https://api.mercury.com/api/v1`
- URL: `https://api.mercury.com/api/v1/books/line-entries`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/mercurytechnologies/apis/mercury-api/docs/books/line-entries/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns line-level general ledger (GL) activity for a date range. Each line entry is one debit or credit posted by a journal entry to one ledger, i.e. a general ledger account in the organization's chart of accounts. Each line entry includes its ledger ID and name, its journal entry ID and description, when it was posted, its amount and whether it is a debit or a credit, its own description, its opposing ledger IDs (the ledgers on the other side of the journal entry, e.g. the bank account that paid an expense), and its tags. startDate and endDate are required. Filter with ledgerIds to read activity in specific accounts (omit it to search every ledger), with opposingLedgerIds to find lines whose other side hit specific accounts, and with debitCredit, minAmount, and maxAmount. Results are paginated: pass a response's nextPageToken as pageToken to fetch the next page. To discover ledger IDs, use getBooksLedgers; to read one ledger, use getBooksLedger; to read whole journal entries with all of their lines, use getBooksJournalEntries.

## Query parameters

- `booksId` string, uuid: The Books instance to act on. Must be the token organization's own instance, which it defaults to.
- `startDate` string, date, required: Only return line entries posted on or after this date (inclusive, YYYY-MM-DD).
- `endDate` string, date, required: Only return line entries posted on or before this date (inclusive, YYYY-MM-DD). Must be on or after startDate.
- `ledgerIds` string[]: Comma-separated list of at most 100 distinct ledger IDs. Only return line entries posted to one of these ledgers. Omit to return line entries from every ledger.
- `opposingLedgerIds` string[]: Comma-separated list of at most 100 distinct ledger IDs. Only return line entries whose opposing ledgers (the other side of the journal entry) include one of these ledgers.
- `debitCredit` 'debit' | 'credit': Only return debit ('debit') or credit ('credit') line entries.
- `minAmount` number, double: Only return line entries with an amount of at least this value.
- `maxAmount` number, double: Only return line entries with an amount of at most this value.
- `sort` string[]: Comma-separated list of sort keys, applied in order.
- `pageToken` string: The nextPageToken or prevPageToken from a previous response, to fetch that page.
- `limit` integer: The maximum number of line entries to return per page, from 1 to 1000.

## Response `200`

- GetBooksAPILineEntriesResponse: Response containing a paginated list of line entries.
  - `lineEntries` BooksAPILineEntry[], required: The line entries on this page
    - `amount` number, double, required: The unsigned amount of the line entry, in dollars.
    - `datetime` string, yyyy-mm-ddThh:MM:ssZ, required: When the line entry was posted, in UTC.
    - `debitCredit` 'debit' | 'credit', required: Whether the amount is a debit or a credit to the ledger.
    - `description` string, size < 4001, nullable: The line entry's own description, if any.
    - `id` string, base58 (max length 22), required: The unique identifier for the line entry.
    - `journalEntryDescription` string, size < 513, required: The description of the journal entry the line entry belongs to.
    - `journalEntryId` string, base58 (max length 22), required: The identifier of the journal entry the line entry belongs to.
    - `ledgerId` string, base58 (max length 22), required: The identifier of the ledger (general ledger account) the line entry is posted to.
    - `ledgerName` string, required: The display name of the ledger the line entry is posted to.
    - `opposingLedgerIds` string[], required: The identifiers of the ledgers on the other side of the journal entry, i.e. its lines with the opposite debit or credit.
    - `tags` BooksTag[], required: The tags applied to the line entry.
      - `id` string, base58 (max length 22), required: Unique identifier for the tag.
      - `name` string, required: Display name of the tag.
      - `tagGroupId` string, base58 (max length 22), required: unique id for a tag group; emitted as base-58, but a base-16 UUID is also accepted
  - `nextPageToken` string, nullable: Token to fetch the next page of results
  - `prevPageToken` string, nullable: Token to fetch the previous page of results

## Other responses

- `400`: Invalid `limit` or `pageToken` or `sort` or `maxAmount` or `minAmount` or `debitCredit` or `opposingLedgerIds` or `ledgerIds` or `endDate` or `startDate` or `booksId`

## Changes

- **2026-11-03** `95c77a617769`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mercurytechnologies/apis/mercury-api/changes/books/line-entries/get.md)

---

[API](https://skmtc.dev/mercurytechnologies/apis/mercury-api.md) - [All operations](https://skmtc.dev/mercurytechnologies/apis/mercury-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mercurytechnologies/apis/mercury-api/revisions/95c77a617769?raw)
