v1

latestOpenAPI 3.1.02026-07-241910582.8 KB

List Ledger Entries

get/ledger_entries

Query parameters

id[]string[]

If you have specific IDs to retrieve in bulk, you can pass them as query parameters delimited with id[]=, for example ?id[]=123&id[]=abc.

ledger_account_idstring

Shows all ledger entries on an account.

ledger_transaction_idstring

Shows all ledger entries on a transaction.

ledger_account_settlement_idstring

To retrieve the itemized Ledger Entries of an associated settlement, use this query parameter.

effective_atstring date

Use gt (>), gte (>=), lt (<), lte (<=), or eq (=) to filter by the transaction's effective at. Format ISO8601.

updated_atstring date-time

Use gt (>), gte (>=), lt (<), lte (<=), or eq (=) to filter by the posted at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use updated_at%5Bgt%5D=2000-01-01T12:00:00Z.

created_atstring

Use "gt" (>), "gte" (>=), "'lt" (<), "lte" (<=), or "eq" (=) to filter by the created at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use created_at%5Bgt%5D=2000-01-01T12:00:00Z.

as_of_lock_versioninteger

Shows all ledger entries that were present on a ledger account at a particular lock_version. You must also specify ledger_account_id.

ledger_account_category_idstring

Shows all ledger entries for ledger accounts in a particular ledger account category.

ledger_account_statement_idstring

Shows all ledger entries for a particular ledger account statement.

show_deletedboolean

If true, response will include ledger entries that were deleted. When you update a ledger transaction to specify a new set of entries, the previous entries are deleted.

direction'credit' | 'debit'

Get all ledger entries that match the direction specified.

statusstring

To query ledger entries by status, use this query parameter. Can be pending, posted, or archived.

status[]string[]

To query ledger entries by status, use this query parameter. Can be pending, posted, or archived. For multiple statuses, use status[]=pending&status[]=posted.

metadatastring

For example, if you want to query for records with metadata key Type and value Loan, the query would be metadata%5BType%5D=Loan. This encodes the query parameters.

after_cursorstring
per_pageinteger
order_bystring

Order by created_at or effective_at in asc or desc order. For example, to order by effective_at asc, use order_by%5Beffective_at%5D=asc. Ordering by only one field at a time is supported.

show_balancesboolean

If true, response will include the balances attached to the ledger entry. If there is no balance available, null will be returned instead.

ltinteger
lteinteger
eqinteger
gteinteger
gtinteger
not_eqinteger

Use gt (>), gte (>=), lt (<), lte (<=), eq (=), or not_eq (!=) to filter by the ledger entry amount.

Response

200

idstring
objectstring
live_modeboolean
amountinteger
directionstring
statusstring
ledger_account_idstring
ledger_account_currencystring
ledger_account_currency_exponentinteger
ledger_account_lock_versioninteger
ledger_transaction_idstring
{"stackTrail":"paths:/ledger_entries:get:responses:200:content:application/json:schema:items:properties:resulting_ledger_account_balances","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/ledger_entries:get:responses:200:content:application/json:schema:items:properties:discarded_at","oasType":"schema","type":"unknown"}
created_atstring
updated_atstring

Example response

[
  {
    "id": "a3c45984-aa05-4554-8c7d-eee9a8053fac",
    "object": "ledger_entry",
    "amount": 100,
    "direction": "credit",
    "status": "pending",
    "ledger_account_id": "641e4d45-7fff-4e7e-ae05-1db2614b4a1e",
    "ledger_account_currency": "USD",
    "ledger_account_currency_exponent": 2,
    "ledger_account_lock_version": 3,
    "ledger_transaction_id": "7f973ee9-597c-46e3-bcf1-359e0115d560",
    "created_at": "2022-11-01T21:29:56Z",
    "updated_at": "2022-11-01T21:29:56Z"
  }
]