Accounting
Journal entries, chart of accounts, periods and determination rules. Requires authentication.
See Resource template.
Journal entries
| Method | Path | Description |
|---|---|---|
| GET | /journal-entries | List |
| GET | /journal-entries/:id | One entry + lines |
| POST | /journal-entries | Create manual entry |
| POST | /journal-entries/:id/post | Post draft |
| POST | /journal-entries/:id/reverse | Reverse |
| POST | /journal-entries/:id/print | |
| GET | /journal-entries/ledger | General ledger |
Create manual entry
| Field | Required | Notes |
|---|---|---|
date | yes | YYYY-MM-DD |
lines | yes | At least 2 lines; debits = credits |
status | no | draft or omit → posted |
currency / exchangeRate | no | HN: HNL/USD; SV: USD only; FX rate required if header ≠ local |
json
{
"date": "2026-11-03",
"description": "Adjustment via API",
"status": "posted",
"currency": "HNL",
"lines": [
{
"chartOfAccountId": 1,
"debit": 1000.00,
"credit": 0,
"lineDescription": "Debit to cash"
},
{
"chartOfAccountId": 2,
"debit": 0,
"credit": 1000.00,
"lineDescription": "Credit to revenue"
}
]
}Balance
Total debits must equal total credits. Closed period for that date → 400.
GET /journal-entries/:id (simplified)
json
{
"id": 501,
"date": "2026-11-03",
"description": "Adjustment via API",
"status": "posted",
"entryType": "manual",
"lines": [
{ "chartOfAccountId": 1, "debit": 1000.00, "credit": 0 },
{ "chartOfAccountId": 2, "debit": 0, "credit": 1000.00 }
]
}Chart of accounts
GET /chart-of-accounts
POST /chart-of-accounts
PUT /chart-of-accounts/:id
POST /chart-of-accounts/import-defaultjson
{
"code": "1101",
"name": "Cash",
"parentId": null,
"isTitleAccount": false
}DELETE only from the web app (API key → 403).
Accounting periods
json
{
"name": "November 2026",
"startDate": "2026-11-01",
"endDate": "2026-11-30"
}POST /accounting-periods/:id/close
POST /accounting-periods/:id/reopenCommon errors
json
{
"message": "El asiento debe tener al menos dos partidas"
}| HTTP | When |
|---|---|
| 400 | Missing date, < 2 lines, imbalance, closed period |
| 401 | Invalid auth |
| 403 | No permission / DELETE with API key |
| 404 | Entry or account not found |