GET /v1/transactions

Transactions, newest first

Auth. Send the token in the X-Ledger-Token header.

Parameters

NameInTypeRequiredDescription
sincequerystring (date)optionalOnly rows on or after this date
untilquerystring (date)optionalOnly transactions posted before this date (exclusive)
account_idquerystringoptional
categoryquerystringoptional
merchantquerystringoptionalCase-insensitive text inside the bank's merchant name
qquerystringoptionalCase-insensitive text search across merchant, payee, memo and note
min_amountqueryintegeroptionalIn cents. Negative values are money out.
max_amountqueryintegeroptionalIn cents
limitqueryintegeroptional
cursorquerystringoptionalOpaque position from the X-Next-Cursor header of the previous page. Preferred over offset: pages stay stable when new rows arrive. Use either cursor or offset, not both.
offsetqueryintegeroptionalNumber of rows to skip. Prefer cursor.

Responses

StatusMeaningBody
200Matching transactions. X-Next-Cursor is present when more rows follow.Transaction[]
400Request rejectedError
429Too many requests from this client address. Wait the number of seconds in Retry-After, then try again.Error

Example response

[
  {
    "id": 0,
    "source": "manual",
    "external_id": "string",
    "account_id": "string",
    "posted": "2026-10-11",
    "transacted_at": "2026-10-11T00:00:00Z",
    "amount_cents": 0,
    "merchant": "string",
    "payee": "string",
    "memo": "string",
    "category": "string",
    "category_source": "manual",
    "rule_id": 0,
    "note": "string"
  }
]

Code samples

Set KEY to your own token first.

curl

curl \
  -H X-Ledger-Token:$KEY \
  "https://api.sasek.org/ledger/v1/transactions"

JavaScript

const res = await fetch("https://api.sasek.org/ledger/v1/transactions", {
  headers: { "X-Ledger-Token": KEY },
});
const data = await res.json();

Python

import json
import os
import urllib.request

request = urllib.request.Request(
    "https://api.sasek.org/ledger/v1/transactions",
    method="GET",
    headers={
        "X-Ledger-Token": os.environ["KEY"],
    },
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))