Books

List line entries (general ledger activity) across ledgers

Changed on

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.

get/books/line-entries

Request

Query parameters

booksIdstring uuid

The Books instance to act on. Must be the token organization's own instance, which it defaults to.

startDatestring date required

Only return line entries posted on or after this date (inclusive, YYYY-MM-DD).

endDatestring date required

Only return line entries posted on or before this date (inclusive, YYYY-MM-DD). Must be on or after startDate.

ledgerIdsstring[]

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.

[
  "7JRNsKwy2Lw66caxVU7WGC"
]
opposingLedgerIdsstring[]

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.

[
  "7JRNsKwy2Lw66caxVU7WGC"
]
debitCredit'debit' | 'credit'

Only return debit ('debit') or credit ('credit') line entries.

minAmountnumber double

Only return line entries with an amount of at least this value.

maxAmountnumber double

Only return line entries with an amount of at most this value.

sortstring[]

Comma-separated list of sort keys, applied in order.

pageTokenstring

The nextPageToken or prevPageToken from a previous response, to fetch that page.

limitinteger

The maximum number of line entries to return per page, from 1 to 1000.

Response

nextPageTokenstring nullable

Token to fetch the next page of results

prevPageTokenstring nullable

Token to fetch the previous page of results

Example response

{
  "lineEntries": [
    {
      "datetime": "2016-07-22T00:00:00Z",
      "id": "7JRNsKwy2Lw66caxVU7WGC",
      "journalEntryId": "7JRNsKwy2Lw66caxVU7WGC",
      "ledgerId": "7JRNsKwy2Lw66caxVU7WGC",
      "opposingLedgerIds": [
        "7JRNsKwy2Lw66caxVU7WGC"
      ],
      "tags": [
        {
          "id": "7JRNsKwy2Lw66caxVU7WGC",
          "tagGroupId": "7JRNsKwy2Lw66caxVU7WGC"
        }
      ]
    }
  ]
}

Changes