---
title: "Chart of Accounts & Periods"
description: "Create and manage your chart of accounts, accounting periods, numbering sequences, and exchange rates via the API."
url: "https://bareledger.app/guides/api-accounting"
category: "Developers & API"
updated: "2026-10-23"
publisher: "BareLedger (Syneria Technologies OPC)"
---

# Chart of Accounts & Periods

> Create and manage your chart of accounts, accounting periods, numbering sequences, and exchange rates via the API.

## Chart of Accounts

| Method & Path | Permission | Purpose | Side effects |
|---|---|---|---|
| `GET accounts` | `coa.view` | List accounts, annotated with a ledger-usage flag | — |
| `GET accounts/export` | `coa.view` | CSV export | Streams file |
| `POST accounts` | `coa.manage` | Create account | Audit `coa.account_created` |
| `POST accounts/import` | `coa.manage` | All-or-nothing CSV import | Creates accounts in dependency order; audit |
| `PATCH accounts/{account}` | `coa.manage` | Update account | Blocks type/postable/currency/control changes once the account is used, or for system/engine accounts; audit |
| `DELETE accounts/{account}` | `coa.manage` | Delete (or deactivate if used) | Audit |

`Account::ENGINE_CODES` (see Database — Accounting) are protected from renumbering once in use, regardless of `coa.manage` permission.

## Accounting Periods

| Method & Path | Permission | Purpose | Side effects |
|---|---|---|---|
| `GET periods` | `period.view` | List periods, optionally filtered by fiscal year | — |
| `POST periods/generate` | `period.manage` | Generate periods for a fiscal year | **202** change request |
| `PATCH periods/{period}/status` | `period.manage` | Change status (open/soft-closed/hard-closed) | **202** change request |
| `GET periods/year-end/preview` | `period.manage` | Preview the year-end closing entry | Response includes `pending_entry` (`{id, status}` of a closing entry awaiting sign-off or a rejected draft, else `null`) |
| `POST periods/year-end/close` | `period.manage` | Prepare the year-end closing entry (P&L → Retained Earnings) and **submit it for review** | Posts nothing yet; response includes `entry_id`, `status`. Approval in the journal workflow (reviewer ≠ approver ≠ preparer) posts it into the 13th adjustment period and hard-closes the fiscal year; approval is refused if anything posted into that year after preparation (delete the draft and close again). Not editable; a draft can only be deleted |

## Exchange Rates / FX (`feature:multi_currency`)

| Method & Path | Permission | Purpose | Side effects |
|---|---|---|---|
| `GET exchange-rates` | `fx.view` | List exchange rates | — |
| `POST exchange-rates` | `fx.manage` | Upsert rate for currency/date | Audit |
| `DELETE exchange-rates/{exchangeRate}` | `fx.manage` | Delete rate | Audit |
| `GET fx/revaluation/preview` | `fx.manage` | Preview unrealized FX revaluation | — |
| `POST fx/revaluation` | `fx.manage` | Prepare the period-end FX revaluation entry and **submit it for review** | Posts nothing yet; response includes `entry_id`, `status`. Approval in the journal workflow posts it together with its next-day auto-reversal. If one is already pending (or posted) for the date, the existing entry is returned. A rejected one can't be edited — delete the draft and run again |
