Skip to content

Journal Entry

Introduction

Journal entries are the individual line items within journal transactions that implement double-entry bookkeeping principles. Each journal entry represents either a debit or credit to a specific account, and together they form the complete transaction record in the Swiss KMU accounting system.

A journal transaction is the container that holds multiple journal entries and ensures they balance according to double-entry bookkeeping rules. While a transaction represents the complete business event (like a purchase or sale), each journal entry within that transaction records the specific impact on individual accounts. Every transaction must have at least two entries with balanced debits and credits.

Allowed query parameters

Filters

FilterTypeDescription
searchStringFull-text search across descriptions, account names, and transaction data
accountStringFilter by Account ID (hashed)
transactionStringFilter by Journal Transaction ID (hashed)
date_rangeStringDate range filter (format: YYYY-MM-DD,YYYY-MM-DD)
amount_rangeString/ArrayAmount range filter for debit/credit amounts

Sorting

posted_at (via related transaction)

Includes

transaction, transaction.document, transaction.entries.account, transaction.entries.vatRate, transaction.fiscalYear, account, vatRate, relatedEntries.account

Appends

current_account_balance - Account balance at the time of this entry (requires MANAGE_ACCOUNTING permission)

Retrieve a journal entry

get
/journal_entry/{id}

Example response

json
// HTTP 200 OK
{
    "id": "v7rnRjBn9o",
    "transaction": {
        "id": "txn123",
        "number": "TX-1001",
        "posted_at": "2024-03-15",
        "description": "Office equipment purchase",
        "document_type": "manual_booking",
        "document_number": "MB-001",
        "is_locked": false,
        "amount": 1080.0
    },
    "related_entries": [
        {
            "id": "entry2",
            "account": {
                "id": "acc_bank",
                "number": "1020",
                "name": "Bank Account"
            },
            "debit_amount": null,
            "credit_amount": 1080.0,
            "type": "credit"
        }
    ],
    "account_id": "acc_equipment",
    "account": {
        "id": "acc_equipment",
        "number": "1500",
        "name": "Office Equipment",
        "type": "active",
        "normal_balance_type": "debit_normal"
    },
    "is_tax_booking": false,
    "type": "debit",
    "amount": 1000.0,
    "debit_amount": 1000.0,
    "credit_amount": null,
    "vat_rate_id": "vat_77",
    "vat_rate": {
        "id": "vat_77",
        "name": "Standard VAT Rate",
        "rate": 7.7,
        "label": "Standard VAT Rate 7.7%",
        "is_currently_valid": true
    },
    "currency": "CHF",
    "original_amount": 1000.0,
    "conversion_rate": 1.0,
    "current_account_balance": 15750.0,
    "description": "Office equipment - computers and printers"
}

List journal entries

get
/journal_entry

The list endpoint accepts the same parameters as in Retrieve a journal entry and returns a paginated array of the same journal entry object in the data property.

Read more about Pagination, Filtering, Sorting and Includes on the Introduction page.

Example response

json
// HTTP 200 OK
{
    "data": [
        {
            // journal entry object
        }
    ],
    "links": {
        "first": "https://api.example.com/journal_entry?page=1",
        "last": "https://api.example.com/journal_entry?page=25",  
        "prev": null,
        "next": "https://api.example.com/journal_entry?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 25,
        "per_page": 15,
        "to": 15,
        "total": 367
    },
    "summary": {
        "total_debit": 45230.75,
        "total_credit": 45230.75
    }
}