# PUT /api/v1/journal-entries/{journal_entry_id}

> Update journal entry

- **Tag:** journal-entries
- **Operation ID:** `update_journal_entry_api_v1_journal_entries__journal_entry_id__put`

## Description

Update an existing journal entry's description, date, or line entries.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `journal_entry_id` (path, string, required)

## Request body

Schema: `JournalEntryUpdateRequest`

- `description` (string) — Updated description for the journal entry.
- `date` (string) — Updated date in ISO 8601 format (e.g., '2024-01-15').
- `line_entry_changes` (object) — Object containing arrays of line entry changes. Supports 'create' (new entries), 'update' (modify existing by ID), and 'delete' (remove by ID) operations.

## Responses

### 200 — Successful Response

Schema: `JournalEntryResponse`

- `id` (string · required) — Unique identifier for this journal entry (UUID7).
- `description` (string · required) — Human-readable description of the transaction.
- `currency` (string) — Currency for the journal entry (USD, CAD, AUD, EUR, or GBP).
- `entry_date` (string · date · required) — The date this transaction occurred.
- `invoice_id` (string) — UUID of linked invoice, if this entry relates to an invoice.
- `inventory_order_id` (string) — UUID of linked inventory order (PO), if this entry relates to a PO.
- `source` (string) — Backend origin: manual, invoice, bill, credit_memo, transaction, stripe, shopify, plaid, ramp, square, system, teal
- `creation_method` (string) — User-facing creation method: ai (system-generated) or manual (user-typed)
- `business_id` (string · required) — UUID of the business this entry belongs to.
- `line_entries` (array · LineEntryResponse) — The debit and credit line entries that make up this journal entry. Will be empty list if not expanded.
- `thread` (JournalEntryThreadResponse) — Comment thread information if this journal entry has comments. Contains thread_id, comments array, and comment_count.
- `created_at` (string · date-time) — When this journal entry was created.
- `updated_at` (string · date-time) — When this journal entry was last modified.

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X PUT 'https://api.ondayzero.com/api/v1/journal-entries/{journal_entry_id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "description": "string",
  "date": "string",
  "line_entry_changes": {}
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/journal-entries/{journal_entry_id}', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "description": "string",
  "date": "string",
  "line_entry_changes": {}
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "description": "string",
  "date": "string",
  "line_entry_changes": {}
}

response = httpx.put("https://api.ondayzero.com/api/v1/journal-entries/{journal_entry_id}", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/journal-entries/update-journal-entry
- OpenAPI slice: https://www.ondayzero.com/docs/reference/journal-entries/update-journal-entry/openapi.json
- Other endpoints in **journal-entries**: https://www.ondayzero.com/docs/reference/journal-entries
