Skip to content

Domain models

These handwritten models are the supported results of client calls. They are separate from generated OpenAPI transport classes. SimplifiedTx represents a single split; its inherited equality compares date and absolute amount only.

SimplifiedItem dataclass

Date and amount used for candidate matching.

Equality compares the date and absolute amount. The amount's sign and every field added by subclasses are ignored; this is a candidate match, not proof that two records represent the same payment.

Attributes:

Name Type Description
date date

Transaction calendar date.

amount Decimal

Transaction amount as a decimal value.

SimplifiedTx dataclass

Bases: SimplifiedItem

Mapped single-split Firefly III transaction.

Inherits date and amount from SimplifiedItem. Equality uses only those two fields, comparing absolute amounts. Multipart groups cannot be represented by this model.

Attributes:

Name Type Description
id int

Firefly III transaction group ID.

description str

Split description.

tags list[str]

Tag names reported by Firefly III.

notes str | None

Optional split notes.

category SimplifiedCategory | None

Mapped category, if both its ID and name are available.

currency Currency

Currency used for amount.

fx FXContext | None

Original foreign amount and currency, when available.

type TxType

Withdrawal, deposit, or transfer.

source_account SimplifiedAccountRef | None

Source account when its reference can be mapped.

destination_account SimplifiedAccountRef | None

Destination account when it can be mapped.

external_id str | None

External identifier supplied by Firefly III, if any.

SimplifiedCategory dataclass

Category ID and name from Firefly III.

Attributes:

Name Type Description
id int

Firefly III category ID.

name str

Category name.

SimplifiedAccountRef dataclass

Account reference attached to a transaction split.

Attributes:

Name Type Description
id int

Firefly III account ID.

name str

Account name.

type AccountType

Mapped account type.

iban str | None

IBAN if present in the API response.

Currency dataclass

Currency details needed to display an amount.

Attributes:

Name Type Description
code str

ISO currency code, such as "EUR".

symbol str

Display symbol, such as "€".

decimals int

Number of decimal places to display.

FXContext dataclass

Original foreign amount when Firefly III reports a conversion.

Attributes:

Name Type Description
original_currency Currency

Currency of the original amount.

original_amount Decimal

Amount in that currency.

TxType

Bases: StrEnum

Supported simplified transaction types.

AccountType

Bases: StrEnum

Account types recognized by the transaction mapper.

SystemInfo dataclass

Version and environment information from get_about().

All fields are optional because the endpoint's schema permits them to be absent.

Attributes:

Name Type Description
version str | None

Firefly III application version.

api_version str | None

API version reported by Firefly III.

php_version str | None

PHP runtime version.

os str | None

Server operating system.

driver str | None

Database driver name.