Skip to main content
Version: 1.0.0

Finance API

Treasury of the association (replaces Abby): customers and suppliers, quotes, invoices and credit notes, payments and bank reconciliation, purchases, expense claims, budgets and the accounting journal.

Money: integer cents (EUR); quantities in milli-units (2500 = 2.5); VAT rates and discounts in basis points (2000 = 20 %, accepted rates 2000, 1000, 550, 210, 0). Totals are always computed by the server: each line net amount is rounded to the cent (half away from zero), the VAT of each rate is computed once on the sum of its line nets (totals.breakdown), the document VAT is the sum of the per-rate VAT. The VAT shown on each line is informative.

Invoices: draft → issued → partially_paid → paid (paid = settled by payments and credit notes). Issuing (finance.invoice.issue, sensitive) assigns in one MongoDB transaction the next number of the gap-free sequence of the site and civil year (Europe/Paris) — F-<SITE>-<YYYY>-<NNNN>, credit notes A-… — freezes the seller (authz organisation settings + finance settings) and buyer identities, computes the due date and the mandatory mentions, and posts the sales journal entry. Issued invoices are immutable and never deleted (10-year archive): corrections are credit notes. The Factur-X PDF (EN 16931 CII XML embedded, PDF/A-3B, validated offline) is rendered deterministically and archived through the files service (owner atl:finance:<site>:invoice/<id>); failures are retried by a background job.

Capabilities: quote, invoice, purchase, expense and budget responses (single documents and list items) carry capabilities, the actions the caller may perform now, computed per request from authz decisions (one CheckMany per response, cached for the request) and the document state; authz failures count as denied. Clients gate action buttons on them (creation stays gated on permissions).

Access: documents linked to a project are visible to the project roles holding the matching project-scoped permissions (finance.quote.*, finance.invoice.read/create/update/delete, finance.purchase.read/request, finance.payment.read); issuing, approvals, recording payments, bank data, budgets and exports need global (site or organisation) permissions. Unreadable documents answer 404. Payments are read with finance.payment.read (a payment whose settled documents all belong to one project carries its project_id and is visible to that project's roles), recorded with finance.payment.record (site, sensitive); bank transactions are read and matched with finance.payment.confirm (site, sensitive).

ARNs: atl:finance:<site>:<type>/<id> (customer and supplier: site *).

Events: finance.invoice.v1, finance.quote.v1, finance.payment.v1, finance.purchase.v1 (incl. finance.purchase.received for inventory), finance.expense.v1, finance.budget.v1, finance.customer.v1, finance.supplier.v1 (identity of individuals encrypted). Consumes bank.transaction.v1 (bank.transaction.imported).

Authentication​

Security Scheme Type:

apiKey

Cookie parameter name:

atl_session