---
title: "Create a journal entry in one call"
method: POST
path: "/journal-entries"
tags: ["Posting"]
---

# Create a journal entry in one call

`POST /journal-entries`

## Request

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

QBO-style journal entry endpoint for adjustments and corrections. Defaults to posted; use ordinary purchase, deposit, transfer, or bill-payment endpoints for normal register activity. Optional reviewToken must match a prior POST /journal-entries/preview.

## Headers

- `Idempotency-Key` string, required

## 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`

Idempotent replay

- PostingResponse
  - `data` PostingReceipt
    - `id` string, uuid, required
    - `resourceType` 'purchase' | 'deposit' | 'transfer' | 'bill_payment' | 'journal_entry', required
    - `status` 'draft' | 'posted', required
    - `journalEntryId` string, uuid, required
    - `bankTransactionIds` string[], required
    - `paymentId` string, uuid
    - `ruleResults` PostedTransactionRuleResult[]
      - `bankTransactionId` string, uuid, required
      - `status` 'created' | 'updated' | 'existing' | 'skipped' | 'failed', required
      - `created` boolean, required
      - `ruleId` string, uuid
      - `reason` string
      - `message` string
    - `affectedAccountIds` string[], required
    - `idempotentReplay` boolean, required
    - `createdAt` string, date-time, required

## Other responses

- `201`: Posting created
- `409`: Idempotency conflict
- `default`: Structured posting error

---

[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)
