---
title: "Preview a journal entry without writing"
method: POST
path: "/journal-entries/preview"
tags: ["Posting"]
---

# Preview a journal entry without writing

`POST /journal-entries/preview`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/journal-entries/preview`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Validates a journal entry payload, projects affected account balances and total equity/P&L effects, and returns a short-lived reviewToken bound to the exact lines. Writes nothing.

## Request body

- JournalEntryPostRequest
  - `date` string, date, required
  - `description` string, required
  - `reference` string, nullable
  - `status` 'draft' | 'posted'
  - `basisTreatment` 'both' | 'accrual_only': Whether this manual entry affects both bases or accrual only
  - `reviewToken` string: Optional short-lived token from POST /journal-entries/preview; when set the posted payload must match the preview
  - `metadata` object
  - `lines` object[], required
    - `accountId` string, uuid, required
    - `postingType` 'debit' | 'credit', required
    - `amountCents` integer, required: Integer cents. Example: 1250 means $12.50.
    - `description` string
    - `classId` string, uuid, nullable: Optional class UUID from GET /classes; tags the income or expense line for Profit & Loss by Class
    - `currencyCode` string
    - `exchangeRate` integer: Exchange rate as an integer; 1000000 means 1.0

## Response `200`

Valid preview with reviewToken

## Other responses

- `422`: Invalid preview with validation errors
- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
