---
title: "Edit a posted manual journal entry"
method: PATCH
path: "/entries/{id}"
tags: ["Accounting"]
---

# Edit a posted manual journal entry

`PATCH /entries/{id}`

## Request

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

Replaces the date, description, reference, and lines of a posted manual journal entry in place. The entry keeps its number and the before/after values are recorded in the audit log. Send every line of the corrected entry; amounts are integer cents and debits must equal credits. Entries created by invoices, bills, payments, bank-feed postings, or imports are corrected from their source record. Bank register rows created by the entry are updated to match; a reconciled bank line must keep its bank account, amount, and date. Closed fiscal years protect both the original and the new date. Sending the current values again changes nothing. Requires post:entries.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `date` string, date, required
  - `description` string, required
  - `reference` string, nullable
  - `lines` object[], required
    - `accountId` string, uuid, required
    - `description` string, nullable
    - `debitAmount` integer, required: Cents
    - `creditAmount` integer, required: Cents
    - `classId` string, uuid, nullable: Line class. Lines are replaced, so omitted or null leaves the line unassigned; resend classes from GET /entries/{id}.
  - `expectedUpdatedAt` string, date-time, nullable: Refuse the edit if the entry changed after this updatedAt

## Response `200`

Updated entry with lines

- object
  - `changed` boolean
  - `entry` object

## Other responses

- `409`: The entry changed since it was opened (entry_changed), is linked to a bank-feed transaction (feed_entry_requires_reversal_manifest), already has a posted reversal (journal_entry_already_corrected), or a reconciled bank line would change (reconciled_register_row).
- `422`: The entry is not posted, is owned by another record, has foreign-currency lines, or the new lines are invalid or unbalanced.
- `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/01c3e57d281f?raw)
