List Ledger Accounts
/v1/ledger-accountsReturns a cursor-paginated list of ledger accounts for the active workspace. Read only, no side effects. Results are scoped by workspace via row-level security; for example the chart-of-accounts line for software subscriptions. Attributes mirror the records field set for this root. ## Filtering & sorting Filter via `POST /v1/records/query` (root `ledger_accounts`) or the `filters` model; operators are gated by each field's data type. See [Filtering & sorting](../filtering-and-sorting). **Filterable fields** | Field | Type | Allowed operators | |---|---|---| | `account_class` | number | `eq` `neq` `gt` `gte` `lt` `lte` `is_null` `is_not_null` | | `account_number` | text | `contains` `eq` `neq` `starts_with` `ends_with` `is_null` `is_not_null` | | `account_type` | enum | `eq` `neq` `in` `is_null` `is_not_null` | | `auxiliary_type` | enum | `eq` `neq` `in` `is_null` `is_not_null` | | `composite_invoice_items_list` | text | `contains` `eq` `neq` `starts_with` `ends_with` `is_null` `is_not_null` | | `composite_journal_entry_lines_list` | text | `contains` `eq` `neq` `starts_with` `ends_with` `is_null` `is_not_null` | | `composite_ledger_account_identity` | text | `contains` `eq` `neq` `starts_with` `ends_with` `is_null` `is_not_null` | | `composite_transactions_list` | text | `contains` `eq` `neq` `starts_with` `ends_with` `is_null` `is_not_null` | | `created_at` | date | `eq` `lt` `gt` `is_null` `is_not_null` | | `deleted_at` | date | `eq` `lt` `gt` `is_null` `is_not_null` | | `description` | text | `contains` `eq` `neq` `starts_with` `ends_with` `is_null` `is_not_null` | | `is_active` | boolean | `eq` | | `is_auxiliary` | boolean | `eq` | | `ledger_account_id` | text | `contains` `eq` `neq` `starts_with` `ends_with` `is_null` `is_not_null` | | `name` | text | `contains` `eq` `neq` `starts_with` `ends_with` `is_null` `is_not_null` | | `pk` | number | `eq` `neq` `gt` `gte` `lt` `lte` `is_null` `is_not_null` | | `updated_at` | date | `eq` `lt` `gt` `is_null` `is_not_null` | **Sortable fields:** `account_class`, `account_number`, `account_type`, `auxiliary_type`, `composite_invoice_items_list`, `composite_journal_entry_lines_list`, `composite_ledger_account_identity`, `composite_transactions_list`, `created_at`, `deleted_at`, `description`, `ledger_account_id`, `name`, `pk`, `updated_at` (via `orderBy` / `sort`, `asc`|`desc`).
Requires a bearer token: Authorization: Bearer <token>.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| cursor | string | No | Opaque pagination cursor returned as links.next on the previous page. Omit to fetch the first page.e.g. eyJwayI6MTI4N30 |
| limit | integer | No | Maximum number of records to return per page (1 to 200, defaults to 50).e.g. 50 |
| orderBy | string | No | Field to sort by, using the records dot path or column name (e.g. created_at).e.g. created_at |
| direction | string | No | Sort direction for orderBy. Defaults to desc.e.g. desc |
| workspaceId | string <uuid> | No | Explicit workspace scope. The authenticated user must hold an active membership in this workspace. Defaults to the session workspace when omitted.e.g. a1b2c3d4-0000-4000-8000-000000000001 |
Request
curl -X GET https://api.wellapp.ai/v1/ledger-accounts \
-H "Authorization: Bearer $WELL_API_TOKEN"Responses
200 — A page of ledger accounts.
{
"data": [
{
"type": "ledger_account",
"id": "b8c9d0e1-0000-4000-8000-0000000000a8",
"attributes": {
"ledger_account_id": "b8c9d0e1-0000-4000-8000-0000000000a8",
"account_number": "627800",
"name": "Software subscriptions",
"description": "SaaS and cloud tooling",
"account_type": "expense",
"account_class": 6,
"is_active": true,
"is_auxiliary": false,
"created_at": "2026-01-12T18:06:00Z",
"updated_at": "2026-01-12T18:06:00Z",
"deleted_at": null
},
"relationships": {
"parent_account": {
"data": {
"type": "ledger_account",
"id": "00000000-0000-4000-8000-000000000001"
}
},
"child_accounts": {
"data": [
{
"type": "ledger_account",
"id": "00000000-0000-4000-8000-000000000001"
}
]
}
}
}
],
"meta": {
"total": 1,
"count": 1
},
"links": {
"next": null
}
}400 — Bad request
{
"code": "BAD_REQUEST",
"status": 400,
"title": "Bad Request",
"message": "See title.",
"meta": {
"trace_id": "a1b2c3",
"log_id": "a1b2c3"
}
}401 — Unauthorized
{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "See title.",
"meta": {
"trace_id": "a1b2c3",
"log_id": "a1b2c3"
}
}Filtering & sorting on related objects
This resource's related objects (the ones you can include) and how to filter or sort on each:
| Relationship | Cardinality | Filter on a field | Sort by a field |
|---|---|---|---|
workspace | to-one (workspace) | { "workspace": { "name": { "_eq": … } } } | "field": "workspace.name" ✅ |
parent_account | to-one (ledger_account) | { "parent_account": { "name": { "_eq": … } } } | "field": "parent_account.name" ✅ |
child_accounts | to-many (ledger_account) | { "child_accounts": { "_some": { "name": { "_eq": … } } } } | aggregate proxy only ⚠️ |
source_workspace_connector | to-one (workspace_connector) | { "source_workspace_connector": { "name": { "_eq": … } } } | "field": "source_workspace_connector.name" ✅ |
Replace field_name with any field of the related object. See its object-reference page for the full field list.
Filter by a to-one relation (and sort by it):
{
"root": "ledger_accounts",
"whereClause": { "workspace": { "name": { "_ilike": "%acme%" } } },
"orderBy": { "field": "workspace.name", "direction": "asc" }
}Filter by a to-many relation (quantified — bare nesting is invalid):
{
"root": "ledger_accounts",
"whereClause": { "child_accounts": { "_some": { "name": { "_gt": 0 } } } }
}