Expenses
Expenses, allocated by category, cost center and project.
Module: Finance (finance).
Endpoints
Section titled “Endpoints”GET /api/v1/expenses- List with filters, sorting and pagination (scopefinance:read)GET /api/v1/expenses/{id}- A record by id (scopefinance:read)POST /api/v1/expenses- Create a record (scopefinance:write)PATCH /api/v1/expenses/{id}- Modify the submitted fields (scopefinance:write)DELETE /api/v1/expenses/{id}- Delete or deactivate (scopefinance:write)POST /api/v1/expenses/{id}/add_receipt- Attaches a receipt or an invoice to the expense. (scopefinance:write)POST /api/v1/expenses/{id}/remove_receipt- Deletes the receipt and its file. (scopefinance:write)
Fields
Section titled “Fields”id(string, uuid; read): Unique identifier (UUID).cost_center_id(string, uuid; write): Cost centertitle(string; write, required): Descriptionamount(number; write, required): Amount (RON)currency(string; read): Currency (ISO code, e.g. RON).spent_at(string, date; write, required): Datecreated_at(string, date-time; read): Creation date (ISO 8601).project_id(string, uuid; write): Projectvendor(string; write): Supplier / beneficiarynote(string; write): Notecreated_by(string; read)category(string; write): Categorypayment_method(string; write): Paymentupdated_at(string, date-time; read): Last modification date (ISO 8601).custom_fields(object; read): Custom fields (key-value object). Definitions are created in the ERP; see the guide on docs.rivil.app.legal_entity_id(string, uuid; write, required): Companyvat_amount(number; write): Of which VAT
Events
Section titled “Events”expenses.createdexpenses.updatedexpenses.deleted
Accepts custom fields in custom_fields. docs.rivil.app documents the capability; the list for your company is in the ERP, under Settings, API.