Skip to content

Accounting ​

Journal entries, chart of accounts, periods and determination rules. Requires authentication.

See Resource template.

Journal entries ​

MethodPathDescription
GET/journal-entriesList
GET/journal-entries/:idOne entry + lines
POST/journal-entriesCreate manual entry
POST/journal-entries/:id/postPost draft
POST/journal-entries/:id/reverseReverse
POST/journal-entries/:id/printPDF
GET/journal-entries/ledgerGeneral ledger

Create manual entry ​

FieldRequiredNotes
dateyesYYYY-MM-DD
linesyesAt least 2 lines; debits = credits
statusnodraft or omit → posted
currency / exchangeRatenoHN: 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-default
json
{
  "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/reopen

Common errors ​

json
{
  "message": "El asiento debe tener al menos dos partidas"
}
HTTPWhen
400Missing date, < 2 lines, imbalance, closed period
401Invalid auth
403No permission / DELETE with API key
404Entry or account not found

Documents · API index