Journals
Optional sub-ledgers. Tag transactions with a journal to group and report on them.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /journals | List all journals |
| POST | /journals | Create a new journal |
| GET | /journals/{journalId} | Get a specific journal |
| PUT | /journals/{journalId} | Update a journal |
| DELETE | /journals/{journalId} | Delete a journal |
| GET | /journals/{journalId}/statistics | Get journal statistics |
Create a journal
curl -X POST https://ledga.io/api/v1/journals \
-H "Authorization: Bearer sk_xxxxxxxx_your_secret" \
-H "Content-Type: application/json" \
-d '{ "code": "SALES", "name": "Sales journal" }'$journal = $ledga->journals->create(['code' => 'SALES', 'name' => 'Sales journal']);Pass journal_id on POST /transactions to file a posting under it.
Rules
statusisactiveorclosed; set it withPUT /journals/{id}.GET /journals/{id}/statisticsreturns transaction counts by status, accounts affected and the last transaction date.- Deleting a journal returns
204.