Skip to main content
GET
Find ledger entries

Finding ledger entries

A ledger entry is a single booking in the ledger: one amount, posted from a debit to a credit account on a date. You get one object per booking — the VAT that Infinity books alongside an entry is part of that entry, not a result of its own. Entries are returned newest first. For example, the following request returns the entries posted to the bank account in January 2025:
A response with a single entry booked with VAT looks like this:
All amounts are integer amounts in cents (108100 = CHF 1081.00), and amount and netAmount are always in CHF. amount is the gross amount of the entry, netAmount the part of it that is booked between the debit and the credit account. Without VAT, the two are the same.

VAT

The vat object is present for every entry that carries a tax code, and describes the VAT exactly as it stands in the ledger:
  • rate and amount are the figures that were booked. With the simplified method (Saldosteuersatz), rate is the organisation’s own simplified rate, and statutoryRate additionally tells you the statutory rate that the tax code stands for — for example a rate of 5.3% booked for a statutory rate of 8.1%.
  • amount is 0 when no VAT was booked after all, for example because the VAT amount rounded to zero. In that case debitAccount and creditAccount are absent as well.
  • rate is absent only for tax codes that are no longer defined.
  • With reverse charge tax codes (acquisition tax, BZB… and BZM…), the VAT is booked on top of the entry rather than being contained in it. The entry’s amount therefore equals its netAmount, and both vat.debitAccount and vat.creditAccount are VAT accounts.

Foreign currencies

Entries that were posted in a currency other than CHF carry an fx object with the original amount, its currency, and the exchange rate that was used to convert it:
The exchange rate is the value of one unit of the foreign currency in CHF, so fx.amount × fx.exchangeRate is the amount booked in CHF. It is absent only for legacy entries that were posted without a rate.

Sources, receipts and reversals

  • source tells you which part of Infinity the entry comes from, for example manual, customer-invoice or bank. See ledger entry sources for what each value means.
  • reviewState tells you whether a person stands behind the entry. See review state below.
  • receiptIds contains the ids of the receipts attached to the entry. Use them with the receipts endpoints to attach further documents.
  • reversedBy is present if the entry was reversed (Storno) and holds the id of the reversing entry. On the reversing entry itself — which has the source reversal — reverses points back at the original.

Review state

With AI accounting, Infinity posts entries from synchronised bank transactions on its own and asks the organisation to review them afterwards. reviewState tells you how far an entry has come: Entries that AI accounting never touched — posted by hand, through this API, or by another part of Infinity such as an invoice or the VAT settlement — are always reviewed. Most ai-proposed entries have the source bank, but not all of them: when AI accounting matches a bank transaction to an invoice, the resulting customer-invoice or vendor-invoice payment entry awaits review as well. Treat ai-proposed entries as provisional when you copy the ledger elsewhere. Once a person reviews an entry, it is reported as reviewed, and its updatedAt moves, so synchronising changes with updatedSince picks the transition up.

Filtering

All filters are optional and can be combined:
  • from and to limit the results to a date range, inclusive. Either can be used on its own.
  • account returns entries in which the account appears as debit or as credit account, debitAccount and creditAccount only one side of the booking.
  • description searches the description text of the entries.
  • taxCode returns the entries booked with one tax code. Use the literal value none for entries booked without a tax code.
  • source returns the entries from one source.
  • reviewState returns the entries in one review state, for example the entries that still await review.
  • hasReceipt returns the entries with at least one receipt attached (true) or without any (false).
  • updatedSince returns the entries created or changed since a point in time.
For example, to find the expenses booked to the office supplies account, and the entries that still need a receipt:
To list the entries AI accounting posted that nobody has reviewed yet:
Entries without VAT can be listed with taxCode=none:

Synchronising changes

To keep a copy of the ledger up to date, remember the highest updatedAt you have seen and pass it as updatedSince on your next run. Entries that were posted or changed since then are returned, newest first:
Deletions are not reported by updatedSince. If entries may be deleted in Infinity, reconcile your copy periodically against a full listing of the relevant period instead of relying on incremental changes alone.

Pagination

Results are paginated with limit (default 30, at most 200) and skip, counting ledger entries. To page through all results, increase skip by the limit until fewer results than the limit are returned.

Authorizations

x-api-token
string
header
required

API token for authentication. Obtain from your Infinity account settings.

Query Parameters

from
string<date>

Only return ledger entries dated on or after this date (YYYY-MM-DD).

to
string<date>

Only return ledger entries dated on or before this date (YYYY-MM-DD).

account
integer

Only return ledger entries posted to this account number, either as debit or as credit account.

Required range: 1000 <= x <= 9999
debitAccount
integer

Only return ledger entries whose debit account is this account number.

Required range: 1000 <= x <= 9999
creditAccount
integer

Only return ledger entries whose credit account is this account number.

Required range: 1000 <= x <= 9999
description
string

Only return ledger entries whose description contains this text.

Maximum string length: 128
taxCode
string

Only return ledger entries booked with this tax code, either a statutory code such as UN81 or a simplified code such as SS53. Set to none to only return entries that were booked without a tax code. Use GET /v1/tax-codes to list the codes available to the organisation.

source
enum<string>

Only return ledger entries that originate from this source. Which part of Infinity a ledger entry originates from:

  • manual: posted by hand in Infinity, or through this API
  • customer-invoice: posted by a customer invoice (Forderung), for example its positions, payments, discounts or rebates
  • vendor-invoice: posted by a vendor invoice (Kreditor), for example its positions or payments
  • bank: posted from a synchronised bank transaction in Live Accounting
  • vat: posted by a VAT settlement or a VAT payment
  • closing: posted when a fiscal year is opened or closed, for example accruals, depreciation or the profit appropriation
  • reversal: posted to reverse another ledger entry (Storno)
  • salary: posted by a salary payment
Available options:
manual,
customer-invoice,
vendor-invoice,
bank,
vat,
closing,
reversal,
salary
Example:

"manual"

reviewState
enum<string>

Only return ledger entries in this review state. Use ai-proposed to find the entries that AI accounting posted and nobody has reviewed yet. Whether a person stands behind a ledger entry:

  • ai-proposed: AI accounting posted the entry from a synchronised bank transaction, and nobody has reviewed it yet. Treat it as provisional: reviewing may still change or remove it.
  • reviewed: a person posted the entry, or reviewed one that AI accounting had posted. Entries posted by hand, through this API, or by another part of Infinity are always reviewed.
Available options:
ai-proposed,
reviewed
Example:

"reviewed"

hasReceipt
boolean

Set to true to only return ledger entries with at least one receipt attached, or to false to only return entries without any receipt.

updatedSince
string<date-time>

Only return ledger entries that were created or changed at or after this point in time, given as an ISO 8601 date-time with an offset. Deleted entries are not reported.

limit
number
default:30

Pagination limit for the results. Defaults to 30 if not specified. Maximum allowed value is 200.

Required range: x <= 200
skip
number

Pagination offset for the results

Response

Successfully returns the matching ledger entries, newest first.

ledgerEntries
LedgerEntry · object[]
required

The ledger entries matching the query, newest first.