---
title: "Bank Journal Preview"
method: POST
path: "/companies/{company_id}/journal-entry-files/preview"
tags: ["journal-export"]
---

# Bank Journal Preview

`POST /companies/{company_id}/journal-entry-files/preview`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/companies/{company_id}/journal-entry-files/preview`
- Auth: none declared

Editable preview of a bank journal-entry export (CompanyMember).

Collects the same way the legacy endpoint does (resolve → accountant fan-out →
normalize), then maps each entry to an editable shape with the company's configured
header fields resolved, the embedded chart of accounts + VAT codes, summary and live
validation warnings. 422/503 exactly like the legacy endpoint — **and the same 409
``conflict.documentDateFiscalYearNotOpen``** (ZET-316) when a selected movement's date
has no bookable fiscal year.

## Path parameters

- `company_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- JournalEntryFileRequest: POST body for ``/companies/{company_id}/journal-entry-files``. ``bank_entry_ids`` is the selection of bank entries to export (≥1). Duplicates are rejected (not deduped) by the selection layer.
  - `bank_entry_ids` string[], required

## Response `200`

Successful Response

- EditableJournalPreview: The structured, editable preview a preview endpoint returns (plan §5.1).
  - `source` string, required
  - `company_id` string, required
  - `company_name` string, required
  - `accounting_solution` string, required
  - `generated_at` string, required
  - `period` string, required
  - `default_format` string, required
  - `available_formats` string[], required
  - `header_field_config` HeaderFieldConfigOut[]
    - `key` string, required
    - `label` string, required
    - `scope` string
    - `enabled` boolean
    - `source_type` string, required
    - `constant_value` string, nullable
    - `derived_token` string, nullable
    - `accountant_field` string, nullable
  - `chart_accounts` PreviewChartAccount[]
    - `id` string, required
    - `account_number` string, required
    - `account_name` string, nullable
    - `category` string, nullable
    - `fiscal_year` integer, required
  - `vat_codes` PreviewVatCode[]
    - `code` string, required
    - `label` string, nullable
    - `rate_bps` integer, nullable
  - `summary` object
  - `entries` EditableEntry[]
    - `entry_id` string, required
    - `source_invoice_id` string, nullable
    - `status` string, nullable
    - `confidence` number, nullable
    - `risk_flags` unknown[]
      - unknown
    - `unresolved_questions` unknown[]
      - unknown
    - `has_lines` boolean
    - `fiscal_year` integer, nullable
    - `header_fields` PreviewHeaderField[]
      - `key` string, required
      - `label` string, required
      - `scope` string
      - `value` string, nullable
      - `source_type` string, required
      - `editable` boolean
    - `posting_date` string, nullable
    - `document_date` string, nullable
    - `reference` string, nullable
    - `description` string, nullable
    - `lines` EditableLine[]
      - `line_id` string, required
      - `side` string, required
      - `account` string, required
      - `amount` string, required
      - `currency` string, required
      - `vat_code` string, nullable
      - `line_header_fields` PreviewHeaderField[]
        - `key` string, required
        - `label` string, required
        - `scope` string
        - `value` string, nullable
        - `source_type` string, required
        - `editable` boolean
      - `vat_rate` string, nullable
      - `vat_amount` string, nullable
      - `text` string, nullable
  - `warnings` PreviewWarning[]
    - `entry_id` string, nullable
    - `line_id` string, nullable
    - `code` string, required
    - `message` string, required
    - `severity` string

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
