# Update journal entry

> Updates the given draft journal entry. Only the fields present in the request body are modified; fields set explicitly to null are cleared.

`PATCH https://api.light.inc/v1/journal-entries/{journalEntryId}`

## Note

The "null clears" rule in the description holds for valuationDate , documentNumber , description , currency , businessPartnerName , businessPartnerId and the FX overrides only; companyEntityId , ledgerName , postingDate , documentDate , areLinesWithTax and customProperties cannot be cleared. Lines cannot be changed at all (there is no lines field). On anything but a DRAFT , only customProperties may change; sending any other field fails with JOURNAL_ENTRY_CANNOT_BE_MODIFIED .

## Authorization

- API key
- Bearer token

See https://light.inc/docs/getting-started/authentication.

## Path parameters

- `journalEntryId` (string, uuid, required)

## Header parameters

- `X-Idempotency-Key` (string)

## Request body

`application/json;charset=UTF-8`

- `customProperties.valueIds` — Catalogue value ids for this group. Required; send `[]` (with an empty `inlineValues`) to clear the group. `SINGLE_SELECT` and `MULTI_SELECT` groups accept nothing else. See [Custom properties on writes](/docs/getting-started/pagination-filtering-errors#custom-properties-on-writes).
- `customProperties.inlineValues` — Literal values for `TEXT`, `NUMERIC`, `BOOLEAN` and `DATE` groups, as strings (`yyyy-MM-dd` for dates). Rejected on select groups with `CUSTOM_PROPERTY_VALUE_TYPE_MISMATCH`. See [Custom properties on writes](/docs/getting-started/pagination-filtering-errors#custom-properties-on-writes).

```json
{
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ledgerName": "PRIMARY",
  "postingDate": "2026-01-15",
  "documentDate": "2026-01-15",
  "areLinesWithTax": true,
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "valueIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "inlineValues": [
        "string"
      ]
    }
  ],
  "valuationDate": "2026-01-15",
  "localCurrencyFxRateOverride": 0,
  "groupCurrencyFxRateOverride": 0,
  "documentNumber": "string",
  "businessPartnerName": "string",
  "businessPartnerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "string",
  "currency": "USD"
}
```

Values above are generated from the schema: the shapes and types are real, the values are placeholders, and fields that exclude each other are all shown. Do not send it unchanged.

## Response

- `id` — The journal entry id, also its accounting document id.
- `companyId` — Your company id.
- `documentNumber` — Your own free-text reference for the entry. Not the number Light assigns; that is `documentSequenceId`.
- `companyEntityId` — The entity whose books the entry posts to.
- `createdBy` — The principal that created the entry: a user or an API key.
- `updatedBy` — The principal that last changed it.
- `documentSequenceId` — `null` until the entry is posted.
- `description` — The entry's description.
- `currency` — The currency of the line amounts.
- `postingDate` — The ledger date; the accounting period covering it must be open to post.
- `documentDate` — The date on the underlying document, informational.
- `valuationDate` — The date whose exchange rate converted the lines to local and group currency; resolved at posting when not set.
- `localCurrencyFxRate` — Echoes the override you sent; `null` when Light applied its own rate, not the rate that was applied.
- `groupCurrencyFxRate` — Echoes the override you sent; `null` when Light applied its own rate, not the rate that was applied.
- `areLinesWithTax` — Whether line amounts were entered gross of tax (`true`) or net (`false`, the default).
- `failureContext` — The error of the last failed posting attempt, typically from the approval workflow; cleared on the next successful post. The description about vendor onboarding is a copy-paste from another model.
- `lines` — The lines as entered. The ledger lines Light derived (tax, rounding) are not here; read them from ledger transaction lines.
- `lines.id` — The line id.
- `lines.journalEntryId` — The entry the line belongs to.
- `lines.netTransactionAmount` — The line amount excluding tax, unsigned with `dcSign`, in the entry's currency.
- `lines.netTransactionAmount.amount` — Unsigned integer in minor units. The direction is in `dcSign`; a negative value is rejected.
- `lines.grossTransactionAmount` — The line amount including tax.
- `lines.grossTransactionAmount.amount` — Unsigned integer in minor units. The direction is in `dcSign`; a negative value is rejected.
- `lines.taxTransactionAmount` — The tax portion; `null` without a tax code.
- `lines.taxTransactionAmount.amount` — Unsigned integer in minor units. The direction is in `dcSign`; a negative value is rejected.
- `lines.description` — The line description.
- `lines.targetCompanyEntityId` — For an intercompany line, the entity on the other side ("To entity" in the product). `null` on ordinary lines.
- `lines.ledgerTaxId` — Tax code id. Other documents call the same id `taxCodeId`.
- `lines.ledgerAccountId` — The ledger account the line posts to.
- `lines.costCenterId` — Cost center on the line; `null` when none.
- `lines.customProperties` — Custom property values on the line.
- `lines.createdAt` — When the line was created.
- `lines.updatedAt` — When it was last changed.
- `lines.amortizationTemplateId` — Release template id when the line is spread over a schedule instead of hitting the account at once; `null` otherwise.
- `lines.amortizationStartDate` — First date of that schedule.
- `lines.amortizationEndDate` — Last date of that schedule.
- `customProperties` — Custom property values on the entry header.
- `businessPartnerName` — Optional vendor or customer shown on the entry.
- `businessPartnerId` — Id of that vendor or customer.
- `createdAt` — When the entry was created.
- `updatedAt` — When it was last changed.
- `totalNetTransactionAmount` — Sum of the lines' net amounts as one directed figure. Read the magnitude as the entry's size; its `dcSign` carries no accounting meaning on a balanced entry.
- `totalNetTransactionAmount.amount` — Unsigned integer in minor units. The direction is in `dcSign`; a negative value is rejected.
- `totalTaxTransactionAmount` — Sum of the lines' tax amounts, read like the net total.
- `totalTaxTransactionAmount.amount` — Unsigned integer in minor units. The direction is in `dcSign`; a negative value is rejected.
- `totalGrossTransactionAmount` — Sum of the lines' gross amounts, read like the net total.
- `totalGrossTransactionAmount.amount` — Unsigned integer in minor units. The direction is in `dcSign`; a negative value is rejected.
- `multiJournalEntryId` — Set when this entry is one entity's part of a multi-entity journal entry made in the product; entries sharing the id were entered together. `null` for entries created through the API.

```json
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "documentNumber": "string",
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ledgerName": "PRIMARY",
  "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "documentSequenceId": "string",
  "status": "DRAFT",
  "description": "string",
  "currency": "USD",
  "postingDate": "2026-01-15",
  "documentDate": "2026-01-15",
  "valuationDate": "2026-01-15",
  "localCurrencyFxRate": 0,
  "groupCurrencyFxRate": 0,
  "areLinesWithTax": true,
  "failureContext": {
    "name": "string",
    "type": "BAD_REQUEST",
    "errors": [
      {
        "type": "string",
        "message": "string",
        "path": [
          "string"
        ],
        "context": null
      }
    ]
  },
  "lines": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "journalEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "netTransactionAmount": {
        "amount": 100000,
        "dcSign": "D"
      },
      "grossTransactionAmount": {
        "amount": 100000,
        "dcSign": "D"
      },
      "taxTransactionAmount": {
        "amount": 100000,
        "dcSign": "D"
      },
      "description": "string",
      "targetCompanyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "ledgerTaxId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "ledgerAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "costCenterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "customProperties": [
        {
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "string",
          "values": [
            {}
          ]
        }
      ],
      "createdAt": "2026-01-15T09:30:00Z",
      "updatedAt": "2026-01-15T09:30:00Z",
      "amortizationTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amortizationStartDate": "2026-01-15",
      "amortizationEndDate": "2026-01-15"
    }
  ],
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "groupInternalName": "string",
      "values": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "string",
          "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "internalName": "string",
          "label": "string",
          "context": "string",
          "createdAt": "2026-01-15T09:30:00Z",
          "updatedAt": "2026-01-15T09:30:00Z"
        }
      ]
    }
  ],
  "businessPartnerName": "string",
  "businessPartnerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2026-01-15T09:30:00Z",
  "updatedAt": "2026-01-15T09:30:00Z",
  "totalNetTransactionAmount": {
    "amount": 100000,
    "dcSign": "D"
  },
  "totalTaxTransactionAmount": {
    "amount": 100000,
    "dcSign": "D"
  },
  "totalGrossTransactionAmount": {
    "amount": 100000,
    "dcSign": "D"
  },
  "multiJournalEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
```

Values above are generated from the schema: the shapes and types are real, the values are placeholders.

## Code

```bash
curl -X PATCH "https://api.light.inc/v1/journal-entries/3c90c3cc-0d44-4b50-8888-8dd25736052a" \
  -H "Authorization: Basic YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ledgerName": "PRIMARY",
  "postingDate": "2026-01-15",
  "documentDate": "2026-01-15",
  "areLinesWithTax": true,
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "valueIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "inlineValues": [
        "string"
      ]
    }
  ],
  "valuationDate": "2026-01-15",
  "localCurrencyFxRateOverride": 0,
  "groupCurrencyFxRateOverride": 0,
  "documentNumber": "string",
  "businessPartnerName": "string",
  "businessPartnerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "string",
  "currency": "USD"
}'
```

---

Full page: https://light.inc/docs/api-reference/v1--journal-entries/update-journal-entry · Index: https://light.inc/docs/llms.txt
