Update a journal entry

Operation ID: updateJournalEntry

Group: Accounting › Journal Entries

Open in the interactive reference

PATCH /accounting/journal-entries/{id}

Retry-safe: A write that accepts Idempotency-Key: repeating a request with the same key replays the stored answer instead of executing twice.

Updates a journal entry with the fields you send. A field you leave out keeps its current value. Lines change through three lists: createJournalEntryLines adds lines, updateJournalEntryLines changes lines by id, and deleteJournalEntryLines deletes lines.

An update sets the journal entry back to unposted and pending approval, including a journal entry that was posted. The journal entry is then approved at once if no approval policy applies, or if your approval completes the approvals the policy requires. Approval posts the journal entry to the general ledger, and no new journal entry is created.

Only a manual journal entry can be updated. The request fails if the journal entry is pending approval and has a pending reversal, if it has amortizations that have started, or if its accounting period is closed. A request an accounting rule rejects answers VALIDATION_FAILED, with the rule's message in reason and, where known, the rule's name in rule.

Parameters

Name In Type Required Description
Api-Version header string · v1 yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.
id path string yes The unique identifier for the journal entry to update.

Request body

Required, application/json: updateJournalEntryInput.

Field Type Required Description
name string no The display name of the journal entry.
description string no A free-form description of the journal entry.
postingDate date no The date the entry posts to the general ledger. Use format YYYY-MM-DD.
reversalDate date no The reversal date recorded on the header. Use format YYYY-MM-DD.
reversalReason string no The reason recorded on the header for a later reversal. Accepted values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'. Any other value fails with INVALID_REVERSAL_REASON.
reversalDescription string no A free-form reversal description recorded on the header.
url string no A link to the source document this entry comes from.
createJournalEntryLines array<object> no The lines to add to the entry. Each is a new line with no id.
createJournalEntryLines[].accountId string yes The general ledger account this line posts to. See id on GET accounting/accounts/:id.
createJournalEntryLines[].entityId string yes The legal entity this line posts to. See id on GET base/entities.
createJournalEntryLines[].transactionalCurrency string yes The currency of this line's amount. Format ISO 4217, for example 'USD'.
createJournalEntryLines[].description string no A free-form description of the line.
createJournalEntryLines[].intercompanyPartnerId string no The intercompany counterparty for this line. Set on intercompany lines.
createJournalEntryLines[].debit decimal no The debit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both.
createJournalEntryLines[].credit decimal no The credit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both.
createJournalEntryLines[].exchangeRate decimal no The exchange rate from the line's transactionalCurrency to the entity's functional currency. It applies only when the two currencies differ. For a same-currency line it is 1 and any value you send is ignored.
createJournalEntryLines[].reportingTags array<object> no The reporting tags for this new line, one per reporting dimension. Each tag pairs a dimensionCode with a modelId, and the referenced record must exist and be active. A line has at most one tag per dimensionCode. Omit or send an empty array for an untagged line.
createJournalEntryLines[].reportingTags[].dimensionCode string yes The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'.
createJournalEntryLines[].reportingTags[].modelId string yes The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a department record when dimensionCode is 'department'. It must be an existing, active record. For a custom dimension, send the value's modelUuid from listCustomDimensionValues, not its integer modelId.
updateJournalEntryLines array<object> no The existing lines to change, each matched by its id. Only the fields you send on a line change.
updateJournalEntryLines[].id string yes The line to change. It must belong to this entry.
updateJournalEntryLines[].accountId string no The general ledger account this line posts to. See id on GET accounting/accounts/:id.
updateJournalEntryLines[].entityId string no The legal entity this line posts to. See id on GET base/entities.
updateJournalEntryLines[].intercompanyPartnerId string no The intercompany counterparty for this line. Set on intercompany lines.
updateJournalEntryLines[].description string no A free-form description of the line.
updateJournalEntryLines[].debit decimal no The debit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both.
updateJournalEntryLines[].credit decimal no The credit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both.
updateJournalEntryLines[].transactionalCurrency string no The currency of this line's amount. Format ISO 4217, for example 'USD'.
updateJournalEntryLines[].exchangeRate decimal no The exchange rate from the line's transactionalCurrency to the entity's functional currency. It applies only when the two currencies differ. For a same-currency line it is 1 and any value you send is ignored.
updateJournalEntryLines[].reportingTags array<object> no The reporting tags for the line, one per reporting dimension. Each tag pairs a dimensionCode with a modelId referencing an existing, active record, at most one per dimensionCode. Omit to keep the current tags. Send an empty array to clear them. Send a list to replace them.
updateJournalEntryLines[].reportingTags[].dimensionCode string yes The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'.
updateJournalEntryLines[].reportingTags[].modelId string yes The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a department record when dimensionCode is 'department'. It must be an existing, active record. For a custom dimension, send the value's modelUuid from listCustomDimensionValues, not its integer modelId.
deleteJournalEntryLines array<string> no The lines to delete from the entry, each by its id. Deleting a line also deletes its reporting tags.
{
  "name": "<name>",
  "description": "<description>",
  "postingDate": "2026-01-15",
  "reversalDate": "2026-01-15",
  "reversalReason": "<reversalReason>",
  "reversalDescription": "<reversalDescription>",
  "url": "<url>",
  "createJournalEntryLines": [
    {
      "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "transactionalCurrency": "<transactionalCurrency>",
      "description": "<description>",
      "intercompanyPartnerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "debit": "19.99",
      "credit": "19.99",
      "exchangeRate": "19.99",
      "reportingTags": [
        {
          "dimensionCode": "<dimensionCode>",
          "modelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        }
      ]
    }
  ],
  "updateJournalEntryLines": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "intercompanyPartnerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "description": "<description>",
      "debit": "19.99",
      "credit": "19.99",
      "transactionalCurrency": "<transactionalCurrency>",
      "exchangeRate": "19.99",
      "reportingTags": [
        {
          "dimensionCode": "<dimensionCode>",
          "modelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        }
      ]
    }
  ],
  "deleteJournalEntryLines": [
    "<deleteJournalEntryLines>"
  ]
}

Response

200 Success

Under data (updateJournalEntryOutput):

Field Type Required Description
id string yes The unique identifier for the updated journal entry.
{
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Response headers

Errors

Code Status
INVALID_REVERSAL_REASON 400
NOT_FOUND 400
REFERENCED_RECORD_NOT_FOUND 400
VALIDATION_FAILED 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses