---
title: "Ledger"
method: POST
path: "/v1/matters/{matter_id}/cash-book/ledger/search"
tags: ["cash-book"]
---

# Ledger

`POST /v1/matters/{matter_id}/cash-book/ledger/search`

## Request

- Base URL: `https://api.ender.au` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ender.au/v1/matters/{matter_id}/cash-book/ledger/search`
- Auth: HTTP bearer

## Path parameters

- `matter_id` string, uuid, required

## Request body

- LedgerSearch: Ledger filters. Search text travels in the body so it never reaches URLs.
  - `bank_account_id` string, uuid, required
  - `start` string, date, nullable
  - `end` string, date, nullable
  - `ledger_account_id` string, uuid, nullable
  - `cursor` string, nullable
  - `view` 'cash_book' | 'journal'
  - `q` string

## Response `200`

Successful Response

- JournalPage
  - `lines` LedgerLine[], required
    - `id` string, uuid, required
    - `journal_entry_id` string, uuid, required
    - `transaction_id` string, uuid, required
    - `entry_date` string, date, required
    - `description` string, required
    - `entry_description` string, required
    - `reference` string, nullable, required
    - `sequence` integer, required
    - `code` string, required
    - `name` string, required
    - `entry_type` 'posting' | 'reversal', required
    - `debit` string, required
    - `credit` string, required
    - `balance` string, nullable, required
    - `related_accounts` RelatedLedgerAccount[], required
      - `ledger_account_id` string, uuid, required
      - `code` string, required
      - `name` string, required
      - `debit` string, required
      - `credit` string, required
  - `next_cursor` string, nullable, required
  - `opening_balance` string, required
  - `closing_balance` string, required
  - `ledger_account_id` string, uuid, nullable, required
  - `period_debits` string, nullable, required
  - `period_credits` string, nullable, required
  - `entry_count` integer, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ender/apis/ender-backend.md) - [All operations](https://skmtc.dev/ender/apis/ender-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/ender/apis/ender-backend/revisions/bf4373130521?raw)
