kassenbuch.add_entry
Add a single cash entry (income or expense) to the ledger. Type is 'income' or 'expense' (note: English, not 'einnahme'/'ausgabe'). If entryDate is omitted, today is used. amount must be > 0. reservationId links the entry to a stay UUID; reservationCode is the human-readable booking code (e.g. 'HM54KEHW5X'). Mutating — requires _confirm: true.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
type | enum | yes | One of: income, expense |
description | string | yes | |
amount | number | yes | |
category | string | yes | |
entryDate | string | no | |
reservationId | string · nullable | no | |
reservationCode | string · nullable | no | |
guestName | string · nullable | no |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
entryId | string | yes | |
sequenceNumber | number | yes |
kassenbuch.balance
Aggregate cash-book balance: total income + expense over all-time, today's income + expense subtotal, and the timestamp of the most-recent entry. Use for 'wie viel ist drin?' summaries. Read-only.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
total_income | number | yes | |
total_expense | number | yes | |
today_income | number | yes | |
today_expense | number | yes | |
last_entry | string · nullable | yes |
kassenbuch.categories
Valid income + expense category labels accepted by the cash-book. Pre-context for any add-entry prompt — pick from these values. Read-only.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
income | array of object | yes | |
income.value | string | yes | |
income.label | string | yes | |
expense | array of object | yes | |
expense.value | string | yes | |
expense.label | string | yes |
kassenbuch.closings
List the cash book's day-closings (Tagesabschlüsse / Festschreibung). Each closing locks every entry up to its date and carries a SHA-256 hash chained to the previous one, so a later change to a locked period is detectable. Read-only.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
limit | integer | no | Default: 60 |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
lastClosedDate | string · nullable | yes | |
closings | array of object | yes | |
closings.abschlussDate | string | yes | |
closings.income | string | yes | |
closings.expense | string | yes | |
closings.entryCount | integer | yes | |
closings.hash | string | yes | |
closings.previousHash | string · nullable | yes |
kassenbuch.list_for_date
Cash-book entries for a single date (YYYY-MM-DD). Read-only. Useful for 'was war am 15.04.?' lookups.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
date | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
entries | array | yes |
kassenbuch.list_today
Today's cash-book entries plus aggregated income / expense / net total for the day. Date is computed against the server's CURRENT_DATE (UTC in the DB; convert to Europe/Berlin client-side if needed). Read-only.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
entries | array | yes | |
totals | object | yes | |
totals.income | number | yes | |
totals.expense | number | yes | |
totals.net | number | yes |
kassenbuch.report
Cash-book report for a date range (from/to inclusive, YYYY-MM-DD). Returns per-category breakdowns + period totals. Read-only.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
from | string | yes | |
to | string | yes |
Output fields
An object keyed by string. Each value is any.
kassenbuch.storno_entry
Reverse a cash entry by booking a COUNTER-ENTRY (German GoBD: the cash book is append-only, nothing is ever deleted). The original row stays; a new row with the inverted type, the same amount and a mandatory reason cancels it out. Booked to the first open day — never into a period that has already been locked by a day-closing. Mutating — requires _confirm: true.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
entryId | string | yes | |
reason | string | yes | Why the entry is being reversed. Goes into the journal. |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
stornoEntryId | string | yes | |
sequenceNumber | integer | yes | |
entryDate | string | yes |