Accounting Accounts
Company chart of accounts (CuentaContable / PGC)
📄️ Get accounting account by ID
Returns a single chart-of-accounts entry.
📄️ Update accounting account
Full replacement. The account number must keep the company's configured length.
📄️ Delete accounting account
Deletes a sub-account. Rollup (parent) accounts cannot be deleted. If-Match is accepted but ignored (CuentaContable is not versioned).
📄️ Merge-patch accounting account
RFC 7396 merge-patch over `application/merge-patch+json`. Send only the fields you want to change; include a field with value `null` to remove it. Use the `If-Match` header for optimistic concurrency control.
📄️ List accounting accounts
Paginated list with optional RSQL filter and sort (default lastModifiedAt:desc).
📄️ Create accounting account
Persists via the internal commands gateway. The full account number must match the company's configured length (typically 8 digits). Supply either `account` or `prefix`+`suffix`; when prefix/suffix are provided the server recomputes `account`.
📄️ Prototype an accounting account for a creation form
Non-persisted defaults: current company, enabled=true, blockType=null. Optional JSON hints: companyId, prefix, copyFromId.
📄️ List prefix hints while typing a new account code
Hierarchical chart-of-accounts hints mirroring the legacy JSF create dialog (`changeCuenta`). As each digit is typed, returns rollup accounts and sub-accounts whose prefix matches the typed hierarchy for the given company.