Contracts
Contracts with clients, suppliers and employees, with period, value and renewal.
Module: Contracts (contracts).
Endpoints
Section titled “Endpoints”GET /api/v1/contracts- List with filters, sorting and pagination (scopecontracts:read)GET /api/v1/contracts/{id}- A record by id (scopecontracts:read)POST /api/v1/contracts- Create a record (scopecontracts:write)PATCH /api/v1/contracts/{id}- Modify the submitted fields (scopecontracts:write)DELETE /api/v1/contracts/{id}- Delete or deactivate (scopecontracts:write)POST /api/v1/contracts/{id}/renew- Renews the contract. (scopecontracts:write)POST /api/v1/contracts/{id}/terminate- Ends the contract. (scopecontracts:write)POST /api/v1/contracts/{id}/set_billing_day- Invoicing day. (scopecontracts:write)POST /api/v1/contracts/{id}/set_project- The project contract. (scopecontracts:write)POST /api/v1/contracts/{id}/add_note- Note in the contract history. (scopecontracts:write)POST /api/v1/contracts/{id}/add_task- New task for the contract. (scopecontracts:write, tasks:write)
Fields
Section titled “Fields”id(string, uuid; read): Unique identifier (UUID).number(string; read)title(string; write, required): Titlekind(string; write, required): Typeparty_id(string, uuid; write): Clientsupplier_id(string, uuid; write): Supplieremployee_id(string, uuid; write): Employeecounterparty(string; write): Other contracting partystatus(string; write): Statusstart_date(string, date; write): Startend_date(string, date; write): Endauto_renew(boolean; write): Auto renewalrenew_months(number; write): Renewal (months)notice_days(number; write): Notice period (days)value(number; write): Valuecurrency(string; read): Currency (ISO code, e.g. RON).billing_period(string; write): Billingdescription(string; write): Descriptionterminated_at(string, date; read)terminated_reason(string; read)expiry_notified_at(string, date-time; read)custom_fields(object; read): Custom fields (key-value object). Definitions are created in the ERP; see the guide on docs.rivil.app.created_by(string; read)created_at(string, date-time; read): Creation date (ISO 8601).updated_at(string, date-time; read): Last modification date (ISO 8601).legal_entity_id(string, uuid; write, required): Companybilling_day(integer; read)billing_day_end(integer; read)project_id(string, uuid; read)
Events
Section titled “Events”contracts.createdcontracts.updatedcontracts.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.