Skip to main content
GET
/
v0
/
ledgers
List all Ledgers
curl --request GET \
  --url https://api.sandbox.teal.dev/v0/ledgers \
  --header 'Authorization: Bearer <token>' \
  --header 'teal-instance-id: <teal-instance-id>'
{
  "next_page_token": "ikal0NEVfMhF8dJf4yQ6KQZmGD",
  "prev_page_token": "vuA7JeKI5c6FLnPt5JfRcZcJxW",
  "records": [
    {
      "id": "<string>",
      "name": "<string>",
      "debit_credit": "debit",
      "editable": true,
      "is_required": true,
      "parent_id": null,
      "report_cash_flow": true,
      "sort_code": "<string>",
      "sub_type": "current_assets",
      "type": "asset",
      "created_at": "2023-11-07T05:31:56Z",
      "financial_account_type": "bank_account",
      "parent": "<unknown>"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

teal-instance-id
string
required

The Teal instance ID The Teal instance ID

Query Parameters

type
enum<string> | null

Optional ledger type used for filtering. Optional ledger type used for filtering.

Available options:
asset,
liability,
equity,
revenue,
expense
sub_type
enum<string> | null

Optional ledger sub type used for filtering. Optional ledger sub type used for filtering.

Available options:
current_assets,
non-current_assets,
transfers_between_accounts,
uncategorized_assets,
current_liabilities,
non-current_liabilities,
equity,
operating_revenues,
other_income,
cost_of_goods_sold,
operating_expenses,
other_expenses
financial_account_type
enum<string> | null

Optional financial account type used for filtering. Optional financial account type used for filtering.

Available options:
bank_account,
credit_card,
payments,
payroll,
loan,
prepaid_card,
accounts_receivable,
accounts_payable
debit_credit
enum<string> | null

Optional ledger debit/credit used for filtering. Optional ledger debit/credit used for filtering.

Available options:
debit,
credit
sort
enum<string>[] | null

A comma separated list of sort orders for the results. A comma separated list of sort orders for the results.

Available options:
name,
-name,
type,
-type,
sub_type,
-sub_type,
debit_credit,
-debit_credit
expand
enum<string>[] | null

Comma-separated list of Ledger expand paths. Comma-separated list of Ledger expand paths.

Available options:
parent,
parent.parent,
details
limit
integer | null
default:50

The number of records to return. Max limit is 1000. The number of records to return. Max limit is 1000.

Required range: 1 <= x < 1001
page_token
string | null

Response

Successful Response

next_page_token
string | null
required

The token to use to request the next page

Example:

"ikal0NEVfMhF8dJf4yQ6KQZmGD"

prev_page_token
string | null
required

The token to use to request the previous page

Example:

"vuA7JeKI5c6FLnPt5JfRcZcJxW"

records
Ledger · object[]
required

List of ledgers