> ## 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.

# General Ledger

> Trial balance, account balances, and fiscal periods

# General Ledger

Query the General Ledger for trial balances, financial statements, and account activity. Every posted bill, invoice, payment, and journal entry rolls up into these reports.

## Trial Balance

Returns debit and credit totals for all accounts as of a given date.

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

**Response (200):**

```json theme={null}
{
  "as_of": "2026-03-15",
  "accounts": [
    {
      "code": "1000",
      "name": "Cash",
      "debit": 1500000,
      "credit": 500000,
      "balance": 1000000
    }
  ],
  "total_debit": 1500000,
  "total_credit": 1500000
}
```

<Info>
  In a properly maintained ledger, total debits always equal total credits.
</Info>

## Financial Statements

The GL also exposes the standard primary statements:

```bash theme={null}
GET /api/v1/gl/balance-sheet
GET /api/v1/gl/income-statement
Authorization: Bearer <access_token>
```

The balance sheet reports assets, liabilities, and equity at a point in time; the income statement reports revenue and expenses over a period.

## Fiscal Periods

Fiscal periods define the accounting calendar and control which dates accept new postings. Once a period is closed, postings dated within it are locked.

### List Fiscal Periods

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

**Response (200):**

```json theme={null}
[
  {
    "id": "uuid",
    "name": "2026-03",
    "start_date": "2026-03-01",
    "end_date": "2026-03-31",
    "status": "open"
  }
]
```

### Create Fiscal Period

<ParamField body="name" type="string" required>
  Period label (e.g. "2026-03")
</ParamField>

<ParamField body="start_date" type="string" required>
  Period start in YYYY-MM-DD format
</ParamField>

<ParamField body="end_date" type="string" required>
  Period end in YYYY-MM-DD format
</ParamField>

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

{
  "name": "2026-03",
  "start_date": "2026-03-01",
  "end_date": "2026-03-31"
}
```

<Note>
  Closing a fiscal period is part of the [period-close](/finindex/finance/period-close) workflow. See that page for the full sequence.
</Note>

<Info>
  See the **API Reference** tab for additional GL reports including AP aging and management P\&L.
</Info>
