Appearance
Journal Transaction
Introduction
Journal transactions are the core bookkeeping entries in the accounting system, representing the double-entry bookkeeping principle where each transaction affects at least two accounts. They form the backbone of the Swiss KMU accounting structure.
Each journal transaction contains multiple journal entries that record the specific debits and credits to individual accounts. The transaction serves as the container that groups related entries together and ensures they balance (total debits equal total credits). This structure maintains the integrity of double-entry bookkeeping while providing a clear audit trail for each business event.
Manual Bookings
To create, update, or delete journal transactions through the API, use the Manual Booking resource. Direct manipulation of journal transactions via the API is not allowed to maintain accounting integrity.
Transaction Types
Type | Description |
---|---|
Single | Simple transaction with exactly two journal entries (one debit, one credit) |
Compound | Complex transaction with more than two journal entries |
Document Types
Journal transactions can be linked to various source documents:
Document Type | Description |
---|---|
invoice | Sales invoices |
invoice_payment | Invoice payment records |
expense | Expense records |
expense_payment | Expense payment records |
bank_transaction | Bank transaction records |
customer_transaction | Customer transaction records |
manual_booking | Manual accounting entries |
Allowed query parameters
Filters
Filter | Type | Description |
---|---|---|
number | String | Exact match on transaction number |
document_number | String | Exact match on document number |
document_type | String | Filter by document type: invoice , invoice_payment , expense , expense_payment , bank_transaction , customer_transaction , manual_booking |
search | String | Full-text search across transaction data |
date_range | String | Date range filter (format: YYYY-MM-DD,YYYY-MM-DD ) |
amount_range | String/Array | Amount range filter |
includes_account | String/Integer | Filter transactions that include a specific account |
includes_vat_rate | String | Filter transactions that include a specific VAT rate |
member | String | Filter by member ID |
Sorting
posted_at
, number_sequence
, document_number
Includes
document
, entries.account
, entries.vatRate
, fiscalYear
, media
, member.user.media
Appends
summary
- Transaction summary data (requires appropriate permissions)
Retrieve a journal transaction
get
/journal_transaction/{id}
Example response
json
// HTTP 200 OK
{
"id": "v7rnRjBn9o",
"number": "TX-1001",
"posted_at": "2024-03-15",
"document": {
"id": "abc123",
"type": "invoice",
"number": "INV-2024-001"
},
"document_id": "abc123",
"document_type": "invoice",
"document_number": "INV-2024-001",
"fiscal_year": {
"id": "fyxyz789",
"name": "2024",
"start_date": "2024-01-01",
"end_date": "2024-12-31"
},
"description": "Sales invoice payment",
"entries": [
{
"id": "entry1",
"account": {
"id": "acc1",
"number": "1020",
"name": "Bank Account"
},
"debit_amount": 1080.0,
"credit_amount": 0,
"type": "debit",
"currency": "CHF"
},
{
"id": "entry2",
"account": {
"id": "acc2",
"number": "3400",
"name": "Sales Revenue"
},
"debit_amount": 0,
"credit_amount": 1000.0,
"type": "credit",
"currency": "CHF"
}
],
"type": "single",
"amount": 1080.0,
"currency": "CHF",
"original_amount": 1080.0,
"is_locked": false,
"is_future": false,
"debit_account": {
"id": "acc1",
"number": "1020",
"name": "Bank Account"
},
"credit_account": {
"id": "acc2",
"number": "3400",
"name": "Sales Revenue"
},
"debit_vat_rate_id": null,
"credit_vat_rate_id": "vat123",
"member": {
"id": "mem1",
"name": "John Doe"
}
}
List journal transactions
get
/journal_transaction
The list endpoint accepts the same parameters as in Retrieve a journal transaction and returns a paginated array of the same transaction object in the data
property.
Read more about Pagination, Filtering, Sorting and Includes on the Introduction page.
Example response
json
// HTTP 200 OK
{
"data": [
{
// transaction object
}
],
"links": {
"first": "https://api.example.com/journal_transaction?page=1",
"last": "https://api.example.com/journal_transaction?page=10",
"prev": null,
"next": "https://api.example.com/journal_transaction?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 10,
"per_page": 15,
"to": 15,
"total": 150
},
"summary": {
"total": 125430.5
}
}