Skip to content

Clients

The people and organizations you work with, with contact details and custom fields.

Module: Clients (parties).

  • GET /api/v1/clients - List with filters, sorting and pagination (scope parties:read)
  • GET /api/v1/clients/{id} - A record by id (scope parties:read)
  • POST /api/v1/clients - Create a record (scope parties:write)
  • PATCH /api/v1/clients/{id} - Modify the submitted fields (scope parties:write)
  • DELETE /api/v1/clients/{id} - Delete or deactivate (scope parties:write)
  • POST /api/v1/clients/{id}/set_record_profile - The client record following a template. (scope clinical:write)
  • POST /api/v1/clients/{id}/generate_document - A copy of a template file in the client’s documents. (scope documents:write)
  • POST /api/v1/clients/{id}/record_agreement - Fills in an agreement for the client. (scope parties:write)
  • POST /api/v1/clients/{id}/agreement_link - Link to fill in the agreement on a tablet: single use, 30 minutes. (scope parties:write)
  • POST /api/v1/clients/{id}/set_fiscal - The client’s tax details. (scope invoices:write)
  • POST /api/v1/clients/{id}/draft_from_items - Draft invoice or proforma from the selected completed appointments, packages and services added at the cashier desk (client_services). (scope invoices:write)
  • POST /api/v1/clients/{id}/cashier - From the cashier desk: payment slip, collecting the balance of a slip (pay), advance, proforma or draft invoice. location_id (the branch) sets the issuing company of the document and the branch cash register. (scope invoices:write)
  • POST /api/v1/clients/{id}/add_shop_credit - Shop credit for the client. (scope shop:write)
  • id (string, uuid; read): Unique identifier (UUID).
  • display_name (string; write, required): Name
  • email (string, email; write): Email
  • phone (string; write): Phone
  • party_kind (string; write, required): Client type
  • custom_fields (object; read): Custom fields (key-value object). Definitions are created in the ERP; see the guide on docs.rivil.app.
  • created_at (string, date-time; read): Creation date (ISO 8601).
  • updated_at (string, date-time; read): Last modification date (ISO 8601).
  • deleted_at (string, date-time; read): Deletion date; empty for active records.
  • price_list_id (string, uuid; write): Price list
  • blocked (boolean; write): Blocked
  • blocked_reason (string; write): Block reason
  • messages_opt_out (boolean; write): No promotional messages
  • acquisition_source (string; write): How they heard about us
  • referred_by_party_id (string, uuid; write): Referred by client
  • referred_by_employee_id (string, uuid; write): Referred by employee
  • client_status (string; write): Status
  • clients.created
  • clients.updated
  • clients.deleted

A deletion is “soft”: the record disappears from the list, and the clients.deleted webhook is sent on deletion.

Accepts custom fields in custom_fields. docs.rivil.app documents the capability; the list for your company is in the ERP, under Settings, API.