Transaktionen API
Hallo, ich bin Sophie! 👋 Mit der Transaktionen-API kannst Sie alle Buchungsvorgänge verwalten - von Einnahmen über Ausgaben bis hin zu Umbuchungen. Alles automatisch nach dem Prinzip der doppelten Buchführung!
Die Transaktionen-API ermöglicht Ihnen die Verwaltung aller Buchungsvorgänge. Alle Transaktionen werden automatisch nach dem Prinzip der doppelten Buchführung (UGB §189) verarbeitet und erstellen automatisch die entsprechenden Journaleinträge.
Endpunkte
| Methode | Endpunkt | Beschreibung |
|---|---|---|
GET | /v1/transactions | Alle Transaktionen auflisten |
GET | /v1/transactions/:id | Einzelne Transaktion abrufen |
POST | /v1/transactions | Neue Transaktion erstellen |
POST | /v1/transactions/:id/reverse | Transaktion stornieren |
GET | /v1/transactions/summary | Zusammenfassung abrufen |
Transaktion - JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Transaction",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Eindeutige Transaktions-ID",
"example": "txn_abc123"
},
"type": {
"type": "string",
"enum": ["income", "expense", "transfer"],
"description": "Transaktionstyp"
},
"amount": {
"type": "number",
"description": "Betrag in EUR"
},
"currency": {
"type": "string",
"default": "EUR"
},
"description": {
"type": "string",
"description": "Buchungstext"
},
"category": {
"type": "string",
"description": "Buchungskategorie"
},
"date": {
"type": "string",
"format": "date",
"description": "Buchungsdatum"
},
"account_id": {
"type": "string",
"description": "Bankkonto-ID"
},
"reference": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["invoice", "receipt", "contract"] },
"id": { "type": "string" },
"number": { "type": "string" }
}
},
"vat_rate": {
"type": "number",
"enum": [20, 13, 10, 0]
},
"vat_deductible": {
"type": "boolean",
"description": "Vorsteuerabzugsberechtigt"
},
"reconciled": {
"type": "boolean",
"default": false
},
"journal_entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"account_code": { "type": "string" },
"account_name": { "type": "string" },
"debit": { "type": "number" },
"credit": { "type": "number" }
}
}
},
"tags": {
"type": "array",
"items": { "type": "string" }
},
"notes": { "type": "string" },
"created_at": { "type": "string", "format": "date-time" }
}
}Transaktionen auflisten
GET /v1/transactions
Ruft eine paginierte Liste aller Transaktionen ab.
Query-Parameter
| Parameter | Typ | Beschreibung |
|---|---|---|
type | string | income, expense, transfer |
category | string | Buchungskategorie |
account_id | string | Bankkonto-ID |
from_date | string | Startdatum (ISO 8601) |
to_date | string | Enddatum (ISO 8601) |
min_amount | number | Mindestbetrag |
max_amount | number | Höchstbetrag |
reconciled | boolean | Nur abgestimmte Transaktionen |
page | number | Seitennummer |
per_page | number | Einträge pro Seite (Max: 100) |
Beispiel
cURL
curl -X GET "https://buchhaltgenie.at/api/v1/transactions?type=income&from_date=2026-01-01" \
-H "Authorization: Bearer sk_live_xxxx" \
-H "Content-Type: application/json"Antwort
{
"data": [
{
"id": "txn_abc123",
"type": "income",
"amount": 1560.00,
"currency": "EUR",
"description": "Zahlungseingang RE-2026-0001",
"category": "revenue",
"account": {
"id": "acc_bank01",
"name": "Geschäftskonto"
},
"reference": {
"type": "invoice",
"id": "inv_abc123",
"number": "RE-2026-0001"
},
"date": "2026-01-09",
"reconciled": true,
"journal_entries": [
{
"account_code": "2000",
"account_name": "Forderungen",
"debit": 0,
"credit": 1560.00
},
{
"account_code": "2800",
"account_name": "Bank",
"debit": 1560.00,
"credit": 0
}
],
"created_at": "2026-01-09T11:00:00Z"
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total_pages": 10,
"total_count": 195
}
}Einzelne Transaktion abrufen
GET /v1/transactions/:id
Ruft die vollständigen Details einer einzelnen Transaktion inkl. Journaleinträge ab.
Beispiel
cURL
curl -X GET "https://buchhaltgenie.at/api/v1/transactions/txn_abc123" \
-H "Authorization: Bearer sk_live_xxxx"Transaktion erstellen
POST /v1/transactions
Erstellt eine neue Transaktion mit automatischen Journaleinträgen.
Request Body Schema
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
type | string | Ja | income, expense, oder transfer |
amount | number | Ja | Betrag in EUR |
description | string | Ja | Buchungstext |
date | string | Ja | Buchungsdatum (ISO 8601) |
category | string | Nein | Buchungskategorie |
account_id | string | Nein | Bankkonto-ID |
reference | object | Nein | Verknüpfung zu Rechnung/Beleg |
vat_rate | number | Nein | MwSt-Satz (für Ausgaben) |
vat_deductible | boolean | Nein | Vorsteuerabzugsberechtigt |
receipt_id | string | Nein | Verknüpfter Beleg |
notes | string | Nein | Interne Notizen |
tags | array | Nein | Schlagwörter |
Beispiel: Zahlungseingang (Einnahme)
cURL
curl -X POST "https://buchhaltgenie.at/api/v1/transactions" \
-H "Authorization: Bearer sk_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"type": "income",
"amount": 900.00,
"description": "Zahlungseingang Kunde Musterfirma",
"category": "revenue",
"account_id": "acc_bank01",
"date": "2026-01-09",
"reference": {
"type": "invoice",
"id": "inv_def456"
},
"payment_method": "bank_transfer"
}'Beispiel: Ausgabe
cURL
curl -X POST "https://buchhaltgenie.at/api/v1/transactions" \
-H "Authorization: Bearer sk_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"type": "expense",
"amount": 250.00,
"description": "Büromaterial",
"category": "office_supplies",
"account_id": "acc_bank01",
"date": "2026-01-08",
"vat_rate": 20,
"vat_deductible": true,
"receipt_id": "rec_xyz789"
}'Beispiel: Umbuchung
cURL
curl -X POST "https://buchhaltgenie.at/api/v1/transactions" \
-H "Authorization: Bearer sk_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"type": "transfer",
"amount": 5000.00,
"description": "Umbuchung auf Sparkonto",
"from_account_id": "acc_bank01",
"to_account_id": "acc_savings01",
"date": "2026-01-09"
}'Antwort (201 Created)
{
"data": {
"id": "txn_new456",
"type": "expense",
"amount": 250.00,
"currency": "EUR",
"description": "Büromaterial",
"category": "office_supplies",
"date": "2026-01-08",
"vat_rate": 20,
"vat_amount": 41.67,
"net_amount": 208.33,
"vat_deductible": true,
"journal_entries": [
{
"account_code": "6815",
"account_name": "Bürobedarf",
"debit": 208.33,
"credit": 0
},
{
"account_code": "2500",
"account_name": "Vorsteuer",
"debit": 41.67,
"credit": 0
},
{
"account_code": "2800",
"account_name": "Bank",
"debit": 0,
"credit": 250.00
}
],
"reconciled": false,
"created_at": "2026-01-08T14:00:00Z"
}
}Buchungskategorien
Einnahmen-Kategorien
| Kategorie | Beschreibung | Konto |
|---|---|---|
revenue | Umsatzerlöse | 4000-4999 |
interest | Zinserträge | 8100 |
other_income | Sonstige Einnahmen | 4900 |
grants | Förderungen | 4700 |
refunds | Rückerstattungen | 4600 |
Ausgaben-Kategorien
| Kategorie | Beschreibung | Konto |
|---|---|---|
office_supplies | Büromaterial | 6815 |
travel | Reisekosten | 6700 |
rent | Miete | 6200 |
utilities | Betriebskosten | 6300 |
insurance | Versicherungen | 6400 |
professional_services | Fremdleistungen | 6600 |
marketing | Werbung | 6800 |
software | Software-Lizenzen | 6840 |
telecommunications | Telefon/Internet | 6820 |
bank_fees | Bankgebühren | 7300 |
other_expense | Sonstige Ausgaben | 6850 |
Sophie’s Tipp: Sie können auch eigene Kategorien anlegen. Beim Erstellen einer Transaktion mit einer unbekannten Kategorie wird diese automatisch angelegt.
Transaktion stornieren
POST /v1/transactions/:id/reverse
Storniert eine Transaktion durch eine Gegenbuchung (gemäß österreichischem Handelsrecht - keine Löschung!).
Request Body
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
reason | string | Ja | Stornogrund |
Beispiel
cURL
curl -X POST "https://buchhaltgenie.at/api/v1/transactions/txn_abc123/reverse" \
-H "Authorization: Bearer sk_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"reason": "Doppelte Buchung korrigiert"
}'Antwort
{
"data": {
"original_transaction": {
"id": "txn_abc123",
"status": "reversed"
},
"reversal_transaction": {
"id": "txn_rev456",
"type": "reversal",
"amount": -1560.00,
"description": "Storno: Zahlungseingang RE-2026-0001",
"reason": "Doppelte Buchung korrigiert",
"journal_entries": [
{
"account_code": "2800",
"account_name": "Bank",
"debit": 0,
"credit": 1560.00
},
{
"account_code": "2000",
"account_name": "Forderungen",
"debit": 1560.00,
"credit": 0
}
],
"created_at": "2026-01-09T14:00:00Z"
}
}
}Zusammenfassung abrufen
GET /v1/transactions/summary
Ruft eine Zusammenfassung der Einnahmen und Ausgaben ab.
Query-Parameter
| Parameter | Typ | Beschreibung |
|---|---|---|
period | string | day, week, month, quarter, year |
from_date | string | Startdatum |
to_date | string | Enddatum |
Beispiel
cURL
curl -X GET "https://buchhaltgenie.at/api/v1/transactions/summary?period=month&from_date=2026-01-01" \
-H "Authorization: Bearer sk_live_xxxx"Antwort
{
"data": {
"period": {
"from": "2026-01-01",
"to": "2026-01-31"
},
"income": {
"total": 15420.00,
"count": 23,
"by_category": {
"revenue": 14500.00,
"interest": 120.00,
"other_income": 800.00
}
},
"expenses": {
"total": 4250.00,
"count": 45,
"by_category": {
"office_supplies": 350.00,
"software": 1200.00,
"rent": 1500.00,
"utilities": 450.00,
"other_expense": 750.00
}
},
"balance": 11170.00,
"vat": {
"collected": 2570.00,
"paid": 708.33,
"due": 1861.67
}
}
}Doppelte Buchführung (UGB §189)
Alle Transaktionen generieren automatisch Journaleinträge nach dem Prinzip der doppelten Buchführung:
Einnahme-Beispiel
Buchungssatz: Bank an Forderungen
┌─────────────────┬──────────┬──────────┐
│ Konto │ Soll │ Haben │
├─────────────────┼──────────┼──────────┤
│ 2800 Bank │ 1.560,00 │ │
│ 2000 Forderungen│ │ 1.560,00 │
└─────────────────┴──────────┴──────────┘Ausgabe-Beispiel (mit Vorsteuer)
Buchungssatz: Büromaterial + Vorsteuer an Bank
┌─────────────────┬──────────┬──────────┐
│ Konto │ Soll │ Haben │
├─────────────────┼──────────┼──────────┤
│ 6815 Bürobedarf │ 208,33 │ │
│ 2500 Vorsteuer │ 41,67 │ │
│ 2800 Bank │ │ 250,00 │
└─────────────────┴──────────┴──────────┘Fehler-Codes
| Code | HTTP Status | Beschreibung |
|---|---|---|
TRANSACTION_NOT_FOUND | 404 | Transaktion wurde nicht gefunden |
INVALID_ACCOUNT | 400 | Ungültige Konto-ID |
INSUFFICIENT_BALANCE | 400 | Nicht genügend Guthaben (bei Transfer) |
ALREADY_RECONCILED | 400 | Transaktion bereits abgestimmt |
CANNOT_REVERSE | 400 | Stornierung nicht möglich |
ALREADY_REVERSED | 400 | Bereits storniert |
INVALID_DATE | 400 | Buchungsdatum in gesperrter Periode |
MISSING_REQUIRED_FIELD | 400 | Pflichtfeld fehlt |
INVALID_CATEGORY | 400 | Ungültige Kategorie |
INVALID_VAT_RATE | 400 | Ungültiger MwSt-Satz |
Nächste Schritte
- Rechnungen API - Rechnungen erstellen und verknüpfen
- Sophie AI - Automatische Kategorisierung
- Webhooks - Benachrichtigungen bei neuen Transaktionen