> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trassets.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Accounting Data Model: Ledger and Budget Entities

> Explore the five accounting tables in the Trassets Data API covering accounts, booking headers, booking positions, budgets, and account-range mappings, with real field names.

The Accounting domain contains the general ledger and budget data for your portfolio. Use
these endpoints to retrieve chart-of-accounts information, individual bookings, budget
plans, and account-range mappings.

## accounts

`GET /accounting/accounts` — the chart of accounts.

<ResponseField name="property_id" type="integer" required>
  Unique property identifier.
</ResponseField>

<ResponseField name="account_hdr_id" type="integer" required>
  Internal account identifier. Referenced by `booking_positions` and `budgets` as
  `account_hdr_id`.
</ResponseField>

<ResponseField name="account_id" type="string">
  Account number.
</ResponseField>

<ResponseField name="account_name" type="string">
  Account name.
</ResponseField>

<ResponseField name="account_id_name_concat" type="string">
  Combined account number and name for display.
</ResponseField>

<ResponseField name="category" type="string">
  Account category.
</ResponseField>

<ResponseField name="account_type_name" type="string">
  Human-readable account type.
</ResponseField>

<ResponseField name="account_group" type="string">
  Account group assignment. Related to, but not derived through, `kontenmapping_ranges`.
</ResponseField>

<ResponseField name="account_balance_type" type="string">
  Balance-side code for the account.
</ResponseField>

<ResponseField name="account_balance_type_name" type="string">
  Human-readable balance side (assets vs. liabilities).
</ResponseField>

<ResponseField name="cashflow" type="string">
  Cashflow classification of the account.
</ResponseField>

## booking\_header

`GET /accounting/booking_header` — general ledger booking headers. Each header groups
related line items.

<ResponseField name="property_id" type="integer" required>
  Unique property identifier.
</ResponseField>

<ResponseField name="bko_hdr_id" type="integer" required>
  Unique identifier for the booking header. `booking_positions` references this as
  `booking_hdr_id`.
</ResponseField>

<ResponseField name="booking_nr" type="string">
  Booking number.
</ResponseField>

<ResponseField name="join_key" type="string">
  Bridges this booking to a cost centre or unit in `Property.property_structure`.
</ResponseField>

<ResponseField name="creditor_id" type="integer">
  Creditor linked to the booking. References `Stakeholder.creditor`.
</ResponseField>

<ResponseField name="person_id" type="string">
  Tenant or contact person linked to the booking.
</ResponseField>

<ResponseField name="booking_date" type="date">
  Date of the booking.
</ResponseField>

<ResponseField name="booking_value" type="number">
  Total value of the booking header.
</ResponseField>

<ResponseField name="m2" type="number">
  Floor area in square metres associated with the booking, if applicable.
</ResponseField>

<ResponseField name="booking_text" type="string">
  Free-text description of the booking.
</ResponseField>

## booking\_positions

`GET /accounting/booking_positions` — individual booking line items. Each position
belongs to exactly one booking header via `booking_hdr_id`.

<ResponseField name="booking_position_hdr_id" type="integer" required>
  Unique identifier for the line item.
</ResponseField>

<ResponseField name="booking_hdr_id" type="integer" required>
  Identifier of the parent booking header. Joins to `booking_header.bko_hdr_id`.
</ResponseField>

<ResponseField name="account_hdr_id" type="integer" required>
  Account the line item is posted to. Joins to `accounts.account_hdr_id`.
</ResponseField>

<ResponseField name="contra_account_id" type="string">
  Contra account for the posting.
</ResponseField>

<ResponseField name="property_id" type="integer" required>
  Unique property identifier.
</ResponseField>

<ResponseField name="property_id_person_id" type="integer">
  Composite key identifying the tenant this posting applies to.
</ResponseField>

<ResponseField name="creditor_id" type="integer">
  Creditor linked to the posting. References `Stakeholder.creditor`.
</ResponseField>

<ResponseField name="join_key" type="string">
  Bridges this posting to a cost centre or unit in `Property.property_structure`.
</ResponseField>

<ResponseField name="booking_sum_net" type="number">
  Net amount of the line item.
</ResponseField>

<ResponseField name="booking_sum_tax" type="number">
  Tax amount of the line item.
</ResponseField>

<ResponseField name="booking_sum_gross" type="number">
  Gross amount including tax.
</ResponseField>

<ResponseField name="net_m2" type="number">
  Net amount normalised per square metre.
</ResponseField>

<ResponseField name="gross_m2" type="number">
  Gross amount normalised per square metre.
</ResponseField>

<ResponseField name="booking_date" type="date">
  Date of the posting.
</ResponseField>

## budgets

`GET /accounting/budgets` — budget amounts, one row per property, account, and month.

<ResponseField name="property_id" type="integer" required>
  Unique property identifier.
</ResponseField>

<ResponseField name="account_hdr_id" type="integer" required>
  Account the budget applies to. Joins to `accounts.account_hdr_id`.
</ResponseField>

<ResponseField name="account_id" type="string">
  Account number.
</ResponseField>

<ResponseField name="date" type="date" required>
  Month the budget row applies to.
</ResponseField>

<ResponseField name="budget" type="number" required>
  Budget amount for the specific month and account.
</ResponseField>

## kontenmapping\_ranges

`GET /accounting/kontenmapping_ranges` — account-range-to-position mappings used to group
accounts for reporting.

<ResponseField name="property_min" type="integer" required>
  Lower bound of the property range this mapping applies to.
</ResponseField>

<ResponseField name="property_max" type="integer" required>
  Upper bound of the property range this mapping applies to.
</ResponseField>

<ResponseField name="start_konto" type="integer" required>
  Start of the account-number range (inclusive).
</ResponseField>

<ResponseField name="end_konto" type="integer" required>
  End of the account-number range (inclusive).
</ResponseField>

<ResponseField name="position" type="string">
  Reporting position the account range is grouped under.
</ResponseField>

<Note>
  This endpoint returns range definitions, not individual accounts. It answers "which
  reporting position does account X belong to for property Y" via a range lookup
  (`start_konto <= account <= end_konto` and `property_min <= property_id <= property_max`),
  not a direct foreign-key join.
</Note>
