> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vinmake.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Journal Entries

> Post balanced double-entry journal entries

# Journal Entries

Post balanced journal entries to the General Ledger. Every entry must have at least two lines, where **total debits equal total credits**. Most entries are created automatically when bills, invoices, and payments post — but you can also post manual entries for adjustments, accruals, and corrections.

## List Journal Entries

```bash theme={null}
GET /api/v1/gl/journal-entries
Authorization: Bearer <access_token>
```

## Post Journal Entry

<ParamField body="date" type="string" required>
  Entry date in YYYY-MM-DD format
</ParamField>

<ParamField body="memo" type="string">
  Description of the journal entry
</ParamField>

<ParamField body="lines" type="array" required>
  Array of debit/credit lines (minimum 2, must balance)
</ParamField>

```bash theme={null}
POST /api/v1/gl/journal-entries
Authorization: Bearer <access_token>

{
  "date": "2026-03-15",
  "memo": "Office supplies purchase",
  "lines": [
    { "account_code": "5100", "debit": 500000, "credit": 0 },
    { "account_code": "1000", "debit": 0, "credit": 500000 }
  ]
}
```

**Response (201):**

```json theme={null}
{
  "id": "uuid",
  "date": "2026-03-15",
  "memo": "Office supplies purchase",
  "lines": [
    { "account_code": "5100", "debit": 500000, "credit": 0 },
    { "account_code": "1000", "debit": 0, "credit": 500000 }
  ]
}
```

<Warning>
  Journal entries must balance — total debits must equal total credits. Unbalanced entries return `422 Unprocessable Entity`.
</Warning>

## Get Journal Entry

```bash theme={null}
GET /api/v1/gl/journal-entries/:entry_id
Authorization: Bearer <access_token>
```

## Reverse Journal Entry

Create an offsetting entry that cancels a previously posted entry — used for corrections without deleting history.

```bash theme={null}
POST /api/v1/gl/journal-entries/:entry_id/reverse
Authorization: Bearer <access_token>
```

**Response (201):** the new reversing entry, with debits and credits swapped from the original.

<Tip>
  Prefer reversing entries over edits. Reversals keep a complete, auditable trail in the ledger.
</Tip>

<Info>
  For recurring entries (rent, depreciation, accruals), see the recurring-templates endpoints in the **API Reference** tab.
</Info>
