# Accounting

Books, bank lines, bills, expenses, reports, tax packs and e-invoices.

Scopes for this area: `accounting:read`, `accounting:write` and `accounting:admin`.

81 operations.

## overview

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/overview` | Who owes you, what you owe, cash and profit this month, what needs attention. | read | `rivier accounting overview get` |

## customer

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/customers` | Customers with balances and what is overdue. | read | `rivier accounting customer list` |
| GET | `/accounting/customers/{key}` | One customer's account: balances, open invoices, open credit, limit and terms. | read | `rivier accounting customer get` |
| GET | `/accounting/customers/{key}/statement` | A customer's statement between two dates. | read | `rivier accounting customer statement` |
| GET | `/accounting/customers/{key}/credit-check` | Whether a new sale fits the customer's credit limit. | read | `rivier accounting customer credit check` |
| PATCH | `/accounting/customers/{key}` | Set a customer's credit limit, terms, hold and dunning. | write | `rivier accounting customer update` |
| POST | `/accounting/receipts-in` | Record money received from a customer, spread over invoices; the rest stays their credit. | write | `rivier accounting customer receive` |

## receivables

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/receivables/aged` | Aged receivables. | read | `rivier accounting receivables aged` |

## bill

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/bills/aged` | Aged payables. | read | `rivier accounting bill aged` |
| GET | `/accounting/bills` | Supplier bills by status. | read | `rivier accounting bill list` |
| GET | `/accounting/bills/{id}` | One supplier bill with its lines. | read | `rivier accounting bill get` |
| POST | `/accounting/bills` | Draft a supplier bill; it reaches the books when a person approves it. | write | `rivier accounting bill draft` |
| POST | `/accounting/bills/{id}/approve` | Approve a bill: it becomes a debt and the cost is booked. | write | `rivier accounting bill approve` |
| POST | `/accounting/bills/{id}/pay` | Pay a bill. | write | `rivier accounting bill pay` |
| POST | `/accounting/bills/{id}/void` | Void an unpaid bill. | write | `rivier accounting bill void` |

## expense

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/expenses` | Expenses, including proposals waiting for a person. | read | `rivier accounting expense list` |
| POST | `/accounting/expenses` | Record an expense (a person's is booked at once; a key's is a proposal a person confirms). | write | `rivier accounting expense create` |
| POST | `/accounting/expenses/{id}/confirm` | Confirm a proposed expense, with corrections. | write | `rivier accounting expense confirm` |
| POST | `/accounting/expenses/{id}/reject` | Reject a proposed expense. | write | `rivier accounting expense reject` |

## supplier

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/suppliers` | Suppliers and what is owed to each. | read | `rivier accounting supplier list` |
| POST | `/accounting/suppliers` | Add a supplier. | write | `rivier accounting supplier create` |

## journal

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/journal` | Entries in the books. | read | `rivier accounting journal list` |
| GET | `/accounting/journal/{id}` | One entry with its lines. | read | `rivier accounting journal get` |
| POST | `/accounting/journal` | Post a manual entry. | write | `rivier accounting journal post` |
| POST | `/accounting/journal/{id}/reverse` | Reverse an entry. | write | `rivier accounting journal reverse` |

## account

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/accounts` | The chart of accounts. | read | `rivier accounting account list` |
| POST | `/accounting/accounts` | Add an account to the chart. | admin | `rivier accounting account create` |
| PATCH | `/accounting/accounts/{id}` | Rename or switch off an account. | admin | `rivier accounting account update` |

## settings

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/settings` | Base currency, edition, closed-through date and the notice. | read | `rivier accounting settings get` |
| POST | `/accounting/setup` | Set up the books for an edition and a base currency. | admin | `rivier accounting settings setup` |

## trial balance

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/trial-balance` | Trial balance. | read | `rivier accounting trial balance get` |

## trail

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/trail` | What people did in the books, in order. | read | `rivier accounting trail list` |

## report

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/reports/profit-and-loss` | Profit and loss. | read | `rivier accounting report profit and loss` |
| GET | `/accounting/reports/balance-sheet` | Balance sheet as of a date. | read | `rivier accounting report balance sheet` |
| GET | `/accounting/reports/cash-flow` | Cash in and out by purpose. | read | `rivier accounting report cash flow` |
| GET | `/accounting/reports/forecast` | Weekly cash look-ahead (rule-based). | read | `rivier accounting report forecast` |
| GET | `/accounting/reports/tax` | Tax summary working paper. | read | `rivier accounting report tax` |
| GET | `/accounting/reports/margin` | Sales and margin by product, room and service. | read | `rivier accounting report margin` |
| GET | `/accounting/month-end/{month}` | What is open before a month can be closed. | read | `rivier accounting report month end` |

## tax

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/tax/packs` | Tax rule packs and which are applied and reviewed. | read | `rivier accounting tax packs` |
| POST | `/accounting/tax/packs/{key}/review` | Mark a tax rule pack reviewed by an accountant. | admin | `rivier accounting tax review` |
| POST | `/accounting/tax/packs/{key}/apply` | Apply a tax rule pack (it stays unverified until reviewed). | admin | `rivier accounting tax apply` |

## export

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/export` | A file for the accountant (journal, trial balance, sales or purchase documents, SIE 4). | read | `rivier accounting export get` |

## bank

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/bank/accounts` | Bank accounts with the ledger balance and what is left to reconcile. | read | `rivier accounting bank accounts` |
| GET | `/accounting/bank/lines` | Bank lines with suggested matches. | read | `rivier accounting bank lines` |
| GET | `/accounting/bank/feed` | Where the bank feed stands: what is connected, which accounts are linked, the last read and the last error. | read | `rivier accounting bank feed` |
| GET | `/accounting/bank/feed/accounts` | The accounts the connected bank offers, and which bank account each is linked to. | read | `rivier accounting bank feed accounts` |
| POST | `/accounting/bank/transfer` | Move money between two of your bank accounts. | write | `rivier accounting bank transfer` |
| POST | `/accounting/bank/lines/{id}/pair` | Settle two bank lines as the two ends of one transfer. | write | `rivier accounting bank pair` |
| POST | `/accounting/bank/accept-confident` | Accept every bank suggestion Rivier is very sure of. | write | `rivier accounting bank accept confident` |
| POST | `/accounting/bank/lines/{id}/match` | Accept a bank line as the payment of an invoice or bill. | write | `rivier accounting bank match` |
| POST | `/accounting/bank/lines/{id}/post` | Accept a bank line as an entry against an account. | write | `rivier accounting bank post` |
| POST | `/accounting/bank/lines/{id}/payout` | Accept a bank line as a payout from the payment provider. | write | `rivier accounting bank payout` |
| POST | `/accounting/bank/lines/{id}/ignore` | Ignore a bank line. | write | `rivier accounting bank ignore` |
| POST | `/accounting/bank/accounts` | Add a bank account. | admin | `rivier accounting bank create` |
| POST | `/accounting/bank/accounts/link` | Link an account at the connected bank to a bank account in the books. | admin | `rivier accounting bank link` |
| POST | `/accounting/bank/accounts/{id}/sync` | Fetch new lines from the bank feed. | admin | `rivier accounting bank sync` |
| POST | `/accounting/bank/accounts/{id}/unlink` | Stop reading a bank account from the bank. The account and its lines stay; statements are imported from then on. | admin | `rivier accounting bank unlink` |
| POST | `/accounting/bank/accounts/{id}/import` | Import pasted statement lines. | admin | `rivier accounting bank import` |

## stock

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/stock/valuation` | Stock at cost by variant, next to what the books say. | read | `rivier accounting stock valuation` |
| POST | `/accounting/stock/receipts` | Record what received stock cost. | write | `rivier accounting stock receive` |

## einvoice

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/e-invoice/{id}` | The invoice or credit note as UBL 2.1 (EN 16931, Peppol BIS Billing 3.0 identifiers). | read | `rivier accounting einvoice get` |
| GET | `/accounting/e-invoice/{id}/check` | Which e-invoice rules a document fails, in plain words. | read | `rivier accounting einvoice check` |
| GET | `/accounting/e-invoice/{id}/history` | Where a document was sent as an e-invoice. | read | `rivier accounting einvoice history` |
| GET | `/accounting/e-invoicing` | Whether this workspace can send e-invoices, and through which connection. | read | `rivier accounting einvoice state` |
| POST | `/accounting/e-invoice/{id}/send` | Send a document as an e-invoice through the connection of the workspace; a test workspace sends through the test provider. | write | `rivier accounting einvoice send` |
| POST | `/accounting/e-invoice/{id}/refresh` | Ask the provider what became of the e-invoices sent for a document. | write | `rivier accounting einvoice refresh` |

## accountant

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/accounting/accountant` | Accountant invitations and the files taken. | read | `rivier accounting accountant list` |
| POST | `/accounting/accountant` | Invite an accountant for a time. | write | `rivier accounting accountant invite` |
| POST | `/accounting/accountant/{id}/revoke` | End an accountant's access. | write | `rivier accounting accountant revoke` |

## receipt

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/accounting/receipts` | Read a receipt into a proposed expense (marked as read by a model). | write | `rivier accounting receipt capture` |

## revalue

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/accounting/revalue` | Restate open foreign-currency items at a date's rate. | write | `rivier accounting revalue run` |

## dunning

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/accounting/dunning/run` | Send the payment reminders that are due now. | write | `rivier accounting dunning run` |

## credit

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/accounting/credit/apply` | Use a customer's credit to pay an invoice. | write | `rivier accounting credit apply` |

## invoice

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/accounting/invoices/{id}/write-off` | Write an invoice off as uncollectible. | write | `rivier accounting invoice write off` |

## period

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/accounting/periods/close` | Close the books through a date. | write | `rivier accounting period close` |
| POST | `/accounting/periods/reopen` | Reopen the last closed period. | write | `rivier accounting period reopen` |

## post

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/accounting/post` | Post what has happened in invoices, refunds and provider fees. | write | `rivier accounting post run` |

## notice

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/accounting/notice` | Accept the notice that Rivier is software, not an accountant. | write | `rivier accounting notice accept` |

## costing

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| PUT | `/accounting/costing` | Choose how stock is costed (locked after the first costed sale). | admin | `rivier accounting costing set` |

## rate

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| PUT | `/accounting/rates` | Set an exchange rate for a day. | admin | `rivier accounting rate set` |
